Jump to content
Sign in to follow this  
Alwarren

How to get the Collimator sights to work?

Recommended Posts

Hey all..

I am trying to get the collimator sights on my attachments to work like the default ones (i.e. working collimator), but I have no idea how that works. There doesn't seem to be anything in the configs that indicates how this is done, I am wondering if this is an animation in model.cfg or if there is some other way to do it?

Developer info would be very much appreciated. Maybe you guys could release one weapon model and the accompanying attachments for us to look at? That would be a tremendous help really !

Share this post


Link to post
Share on other sites
Hey all..

I am trying to get the collimator sights on my attachments to work like the default ones (i.e. working collimator), but I have no idea how that works. There doesn't seem to be anything in the configs that indicates how this is done, I am wondering if this is an animation in model.cfg or if there is some other way to do it?

Developer info would be very much appreciated. Maybe you guys could release one weapon model and the accompanying attachments for us to look at? That would be a tremendous help really !

It is an alpha material trick, not done it in A3 but used the same thing in some mods I made for GTSA ages ago.

You could actually spot it by swimming with a holosight equiped EBR until a recent update.

You create like a long cylinder from the sight towards the barrel and have the sight picture on the face at the end of it. It is then a case of setting alpha material layers priorities so that they hide the sight picture (also on an alpha material) when it is fully hidden within the tunnel at an angle outside of the holosight's frame.

Share this post


Link to post
Share on other sites
You create like a long cylinder from the sight towards the barrel and have the sight picture on the face at the end of it. It is then a case of setting alpha material layers priorities so that they hide the sight picture (also on an alpha material) when it is fully hidden within the tunnel at an angle outside of the holosight's frame.

Now that's interesting. How do you set the priorities, is that an RVMat setting? I can't remember having seen that before.

Thanks for the info, something to ponder :)

Share this post


Link to post
Share on other sites

so it's the same old trick people used to use in Arma 1 then? Just without the visual bugs on certain hardware, in vehicles etc. where the transparent tube would show up

Share this post


Link to post
Share on other sites
Now that's interesting. How do you set the priorities, is that an RVMat setting? I can't remember having seen that before.

Thanks for the info, something to ponder :)

Not really messed with O2 but it is usually just done by moving one part higher or lower in the hierarchy.

The end face and the cylinder (or whatever shape it needs to be to match the sight frame) have to be separate objects usualy

Share this post


Link to post
Share on other sites

This was how it used to be done in Arma:

SLX Example Weapons <- Guess the models can still be loaded in O2 even though they're old

Sounds pretty similar to the method that Liquidpinky describes. IIRC it's a matter of using the alpha sorting tools in the 'Faces' tab of O2 (Move Top etc.) to arrange the alpha textures into the correct hierarchy to occlude the face that has your collimator reticle texture on, when viewed through the transparent cylinder (the reticle being placed at the far end of the cylinder), but not occlude it when looking through the glass on your optics.

Edited by da12thMonkey

Share this post


Link to post
Share on other sites

I am slowly going crazy with this.

I compared my model with the SLX weapon model, and my setup now is very similar. There is a long tube on the end of the aimpoint, with the red dot at the (open) end of the tube. If I move the transparent tube to the bottom in the hierarchy, the red dot in the viewport disappears and is only visible through the scope. The samegoes for the SLX XMS. However, the SLX XMS shows this behavior in Bulldozer as well, while with my model the red dot is still visible. The same goes for in-game.

I don't understand this. I have verified that the material setup, face flags and vertex flags are identical. It should work if I move the tube faces to bottom, but it doesn't.

Anyone got an idea? This is driving me nuts, it doesn't seem to make any difference.

Also, what do "Move to next alpha" and "move to previous alpha" do?

Thanks!

Share this post


Link to post
Share on other sites

Have you compared the textures for the materials themselves and the texture types, eg alpha layers?

Share this post


Link to post
Share on other sites

The only difference there is that SLX uses an I8A8 texture, while I use a DXT5, but I also tried to use SLX' texture with the same effect.

Share this post


Link to post
Share on other sites

I now had a look at the strings contained with the BIS holo sight to get an idea of what they might be using for the tunnel. There is no reference to an all-alpha texture, but I saw this:

#(argb,8,8,3)color(0,0,0,0.01,co)

Which looks like an ideal candidate with a low alpha that would get culled away in alpha testing.

However, when I use that I get a weird effect seen here. Namely, the CompM4 appears "behind" the weapon (you can see the top rail fully instead of having the aimpoint ON it), plus the red dot will vanish behind (see here), plus parts of it disappear when zooming.

I am doing something inherently wrong, but I have no idea what or why.

EDIT: maybe a BIS developer can comment? Do I need the new tools for that?

Edited by Alwarren

Share this post


Link to post
Share on other sites

I'm sharing the same questioning and issues with my attempts, there's always something wrong on my Eotech (invisible collimator, always visible, artifact on glass...)

I have a noob question about your comment: "If I move the transparent tube to the bottom in the hierarchy"

What kind of hierarchy are you referring to ?

I Will try the very low alpha instead of slx_hide.paa just to be sure.

Share this post


Link to post
Share on other sites

Okay I got it to work. Here's how:

  • The tunnel has to have a texture or procedural color with a very low, non-zero alpha
  • Select the tunnel faces in O2, and select Faces->Move Top
  • With the tunnel faces still selected, press E to get the face properties, set "Lighting and Shadow" to "Position" and uncheck "Enable Shadow".
  • Select the red dot/colimator faces and select Faces->Move Top
  • Go to the first (!) LOD in your model, and add the named property "forcenotalpha" with value 1.

That should do the trick :)

Thanks guys for all the help. That's why this community is so great :)

Edited by Alwarren

Share this post


Link to post
Share on other sites

Great stuff Al! I PMed Vespa a link to this thread yesterday (seems he might be the guy to ask). It appears he hasn't logged in for a few days previously, but maybe he'll drop by at some point with some confirmation or additional advise.

Is forcenotalpha in the model of the sight or the weapon the sight will be placed on?

Nanucq, the hierarchy we're on about is the alpha sorting of faces in the model. Under the 'Faces' tab in O2 there are a set of options to move selected faces around in the alpha sorting order such as 'Move Top' (moves the faces to the top of the sorting pile), Move Bottom (moves the selected faces to the bottom) and Move to Next/Previous Alpha (moves the selected face one place up or down the order - useful if you're sorting more than three alpha textures)

Edited by da12thMonkey

Share this post


Link to post
Share on other sites
Great stuff Al! I PMed Vespa a link to this thread yesterday (seems he might be the guy to ask). It appears he hasn't logged in for a few days previously, but maybe he'll drop by at some point with some confirmation or additional advise.

Great. Any additional information would be very welcome :)

In that respect, I'd also like to point out two issues I have reported on the tracker that I think are quite important in that respect

  1. There should be an anim source for the optic mode, to allow things like the G33 scope to function correctly. See here.
  2. A brightness control for collimtor dots would be great. See here.

Is forcenotalpha in the model of the sight or the weapon the sight will be placed on?

It's on the sight. The weapon doesn't need it apparently, but it has to be on the first LDO of the sight, the pilot view isn't enough.

Share this post


Link to post
Share on other sites

Superb Alwarren :yay:, can't wait to try this !

Thank you so much da12thMonkey , i realize i've never used this (shame on me...)

Share this post


Link to post
Share on other sites

[*]There should be an anim source for the optic mode, to allow things like the G33 scope to function correctly. See here.

Not sure having one would work anyway, since you AFAIK can't animate proxy objects, which the G33 magnifier would inevitably be as part of the EOTech+Magnifier attachment. I'd venture a guess that this is why we don't have grenade launchers as attachments, because bits like the animated quadrant sight zeroing (zeroing2 source) and flip-up ladder sights (weaponMuzzle source) wouldn't work, as they are dependant on memory point axes and selections for those rotations being in the weapon model itself.

Share this post


Link to post
Share on other sites
Not sure having one would work anyway, since you AFAIK can't animate proxy objects, which the G33 magnifier would inevitably be as part of the EOTech+Magnifier attachment. I'd venture a guess that this is why we don't have grenade launchers as attachments, because bits like the animated quadrant sight zeroing (zeroing2 source) and flip-up ladder sights (weaponMuzzle source) wouldn't work, as they are dependant on memory point axes and selections for those rotations being in the weapon model itself.

Hm, that might be possible. I had thought the grenade launchers aren't attachments because they add magazine capability to a weapon, which doesn't happen with optics.. But, your explanation might also explain why this happens, namely hiddenSelection and animations not working when a weapon is put on the ground. Even the BIS weapons, when you attach a scope and put the weapon on the ground (like this), the sights will flip up into "neutral" position since they are no longer properly animated.

---------- Post added at 16:59 ---------- Previous post was at 16:04 ----------

I've taken the liberty to add a page to the Biki with a short tutorial on how to do this. It's available here.

Share this post


Link to post
Share on other sites

It sounds like not keeping track of animation states and hidden selections on weapons that are not being used is some kind of optimization.

Share this post


Link to post
Share on other sites
It sounds like not keeping track of animation states and hidden selections on weapons that are not being used is some kind of optimization.

Yes, very well possible, but it means the weapons look wrong when on the floor.

On another note, I am getting reports that the tunnel-and-transparency method might not work in the latest dev build. I have tried it myself and things work perfectly fine for me, but I have heard from some people they always see the red dot. I'd really appreciate some input from a BIS developer on the topic.

Share this post


Link to post
Share on other sites

Tested and approved, it works just fine.

I quote:

  • The tunnel has to have a texture or procedural color with a very low, non-zero alpha
  • Select the tunnel faces in O2, and select Faces->Move Top
  • With the tunnel faces still selected, press E to get the face properties, set "Lighting and Shadow" to "Position" and uncheck "Enable Shadow".
  • Select the red dot/colimator faces and select Faces->Move Top
  • Go to the first (!) LOD in your model, and add the named property "forcenotalpha" with value 1

.

Thanks Alwarren :)

Share this post


Link to post
Share on other sites

Vespa got back to me and confirmed that this method is the same as for what he's done on the BIS weapons.

Al, I noticed in the FHQ Accessories Pack thread you mentioned that the method you used for your EOTech and Aimpoint were slightly different from one another after some users experienced problems on the aimpoint but not the EOTech. Mind telling what the difference with the Aimpoints was so we can avoid making that mistake?

Share this post


Link to post
Share on other sites
Vespa got back to me and confirmed that this method is the same as for what he's done on the BIS weapons.

Great, good to know :)

Al, I noticed in the FHQ Accessories Pack thread you mentioned that the method you used for your EOTech and Aimpoint were slightly different from one another after some users experienced problems on the aimpoint but not the EOTech. Mind telling what the difference with the Aimpoints was so we can avoid making that mistake?

The difference is that the EoTech uses a procedural texture for the tunnel that I spotted in the strings of the BIS Eotech model, which is a CO type texture. The other models in my pack use a texture hidden_ca.paa, which apparently causes the trouble on the latest build for some people. I couldn't reproduce any of it personally, but since the procedural texture requires less effort anyway, it's obviously the better idea to go for that :)

Basically, following the description I posted on the Biki is going to get a working result for everybody.

Share this post


Link to post
Share on other sites

Okay, that's what I thought the difference might be.

I couldn't reproduce any of it personally

Might be GPU/hardware related, in which case you probably can't repo it yourself. I think I said before that Solus' addon for Arma 1 wasn't consistent across all GPUs either. But I guess it doesn't really matter so long as the procedural alpha texture works, and people stick to that.

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
Sign in to follow this  

×