FishMan

Some fun with acog scope.

82 posts in this topic

I've recently played Arma 3, and have noticed new scope effect (black parallax effect on the edges when you move your camera)...

 

So I desided to do the same effect in Squad...

 

And this is what I've got:

I don't want to dig some information about how to release this to everybody as well as I don't want to push it further, instead I'll hope that community or devs will pick it and made something descent from it.

 

So here some instruction about how to do the same...

It's pretty easy - all this took me just one evening...

 

First of all we need to make some adjustments in the scope texture (which called acogreticletest), we need a add blured circle in it (I bet that there is a way to generate it proceduraly, but anyway in my case we are gonna use a texture) which we gonna put in the blue channel:

acogreticl_5635093_22517420.jpg

We also don't want any tiling, we want the edges to be repeated. So we need to set up the properties correctly:

clampjpg_3510747_22517436.jpg

To see this option you should press on the eye icon in the top-right corner and select "Show all advanced details"

Next we should adjust our material:

shaderjpg_7792464_22517489.jpg

We are just add the BumpOfset node (which do a parallax effect) and some parameters to adjust shader settings.

So this is pretty much everything that you need to do... 

 

The problem is that the devs are allready using different model for ADS. This model has reticle that was modeled. So you have to make some adjustmens in BP_Attachment_ACOG_v2 blueprint (u can just change the adsmesh to one that is using texture for reticle)

meshjpg_7031297_22517520.jpg

By the way it is a good idea to use material instances to make some adjustments (for height and ratio) because it will change it on the fly.

 

Thats all...

Good luck and let me know if there will be any questions.

Edited by FishMan

Share this post


Link to post
Share on other sites

I loved this feature in Red Orchestra! It was my only reason to use the Sturmgewehr (shitty gun) and I hope that it's incorporated without the affixed reticle. 

Share this post


Link to post
Share on other sites
3 hours ago, Chap said:

Very cool effect!It can be added to any optics?

Yep. To any surface to be precise.

 

3 hours ago, Carlos said:

Good job... this is one of those small details that should be in game.

Well I am pretty sure we will never see it in game.

Edited by FishMan

Share this post


Link to post
Share on other sites

It's a really nice effect. I showed the powers that be a video not so long ago funnily enough.

 

 

 

Ah FishMan, you never fail to be a miserable bastard :P

Share this post


Link to post
Share on other sites

By the way. There is node called "Sphere Mask" in UE4 which can be used to precedurally generate the black blured circle...

For example like this:

pic5.jpg

Edited by FishMan

Share this post


Link to post
Share on other sites

Wow, good job man!


I haven't seen this since Red Orchestra 2!
Hopefully this will get into the game! 
Thanks for showing us this.

Share this post


Link to post
Share on other sites
On 04.07.2016 at 1:42 AM, Sebastian said:

Wow, good job man!


I haven't seen this since Red Orchestra 2!
Hopefully this will get into the game! 
Thanks for showing us this.

Thanks for kind words mate :) 

Share this post


Link to post
Share on other sites

Wow this rly makes the game look more realistic, such a cool effect! I would never have thought of it, but now i cant stop thinking about it! xD

When will we be able to download this and use in-game?

Share this post


Link to post
Share on other sites

I wasn't planning to do any downloadable files. But there are detailed instructions in the first post how you can do it by your self.

 

As for "use in-game", it is not possible for the moment, the only chance to see it in the game is that if developers do it.

But I am pretty sure that they will say something like: "it is not a priority for the moment", which translated into Russian means "idite na hui suka blyet".

For now modding is like:

picjpg_4245616_22805293.jpg

Edited by FishMan

Share this post


Link to post
Share on other sites

It may not be a priority right now, but it sure is a nice effect. I do think we'll see it in the game at some point, even if they might delay doing it until they do bigger related tasks like redoing weapon systems or something similar. (Fixing scope issues? float stuff?)

Share this post


Link to post
Share on other sites

This really should be added by the devs as its a beauty of a feature and its already been concept proven by FishMan, and UE has the feature already there.

 

On 03/07/2016 at 0:26 AM, FishMan said:

By the way. There is node called "Sphere Mask" in UE4 which can be used to precedurally generate the black blured circle...

For example like this:

pic5.jpg

 

Share this post


Link to post
Share on other sites

Having some fun with PSO-1...

No textures are used. Im using vertexcolors to make the reticle to be smooth. Here is the comparison screenshot:

pic.jpg

 

And here what you should do with the geometry to make it real:

pic.jpg

 

I've come to this idea after I read this arcticle.

 

To make it compatible with Temporary AA and Motion Blur "Responsive AA" should be checked in material options.

Basically you can make many things using the same trick with vertex colors, for example you can add blured effect inside diopter sight for example without using DOF, it's cheaper, but 100% fake.

 

I moved it a little bit futher after all...

It is now possible to make reticle backlighting, you even can define a key to switch it on or off ingame.

 

 

I am using blend modulate shader for this. The problem is that it's not work well with matarials with Separate Translucency (such as smoke for example) and this is pretty painful:

rqUEJNSk_Nc.jpg

 

Currently I am looking for walkaround.

Basically I have two ideas:

1) Divide it to two materials.

2) Switch to post-processing shader.

Edited by FishMan

Share this post


Link to post
Share on other sites
19 hours ago, RevolT said:

If only those things were implemented...

The whole weapon handling system is being reworked right now so who knows

Share this post


Link to post
Share on other sites

Ok. Here is a small update about what I've working on right now...

 

As you all might know there is an issue with sopes in Squad. The problem is that the recile is a 3D mesh placed in the center of the scope. Why its a problem? Because when you look up or down the angle between the scope normal and camera postion is changing, but the reticle stay at the same place. 

 

Here is the video that explaining the problem (Red is the original retilcle made by 3d mesh, and blue is the corrected reticle made by a texture):

 

 

As you can see in 90% of the cases when you look up or down you'll not gonna be able to hit anything with the original reticle.

 

But also you can't use textures for this, because it become very blury when you scale it, or if you change the texture settings. You can compensate this little bit if you change the texture format to for examle userinterface, but not all the problems will be solved by that.

 

So this is the problem Im trying to fix right now.

 

If you look at the real world reference:

You will notice that the scope retile act almoust the same as collimator reticle.

 

I have an idea that it can be fixed by vertex shader.

You can easily fix that problem with textures, just use the camera vector node converted to a local space add (0,5;0,5) vector to it, and connect the result to UV input of the texture. Here is the example code:

pic.jpg

 

With this code your retile will be allways pointig in the direction where your barrel is looking.

But as I said textures is not the best choice.

 

I am trying to do the same with vertex shader and by "vertex shader" I mean "world position offset".

 

After some experiments I've found out how you can get the same vector as camera vector (you cant use camera vector node in world position offset math), here is the code:

pic.jpg

 

But at this point I've stuck. I just cant figure how I can shift the damn vertices so they match the same posion as camera vector in local space.

They are just flying enywhere but not in the place where I want to place them, here is the example:

 

I feel that the solution is near by, but I just cant reach it, my knowledge is seems not enough, I need some one who is descent with the vector math. And noone wants to help me.

 

So yes, guys if some one have any ideas - please post them...

I really hope that I will find the solution for this.

Edited by FishMan

Share this post


Link to post
Share on other sites

I ****ing did it!!!

I fixed the scope! Shit it took me 3 weeks to understand this shit! Omg!

 

 

Here is the code...

 

pic.jpg

 

You can add effects to this and sphere mask as an opacity so the reticle would not fly through scope.

 

I still not sure what is the nature of this constant vector (0.153; 4,32; 0) maybe it is the shift from weapon blueprint or difference between the attachment and optics position, I will investigate this later...

 

UPD: Ah yeah! It is the local position of the scope center.

Here is the screenshot from 3ds max:

pic.jpg

 

Dont forger that mesh reticle is also shifted (by developers) you should move it back at the center of the scope to force it work right.

 

You know what? You can even force the scope to remain the same scale no matter the distance I will show you tomorrow how to do this.

 

 

Edited by FishMan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now