Jump to content
Sign in to follow this  
Αplion

3D Scopes lighting issue

Recommended Posts

Well I'm trying to make my own 3d scope (optic) views for my sniper rifles and I'm facing an issue .... my final result seems to be much darker than BIS default ... I'm not using anything but plain .ca (transparent) textures and one of them is BIS default texture (base texture).

This is my result in game ... http://prntscr.com/1qbjg6 (left one is mine and the right one is BIS default) ... it is easy to see that there is a lighting issue here and I can't figure out why !!

My optics p3d is quite simple ... http://prntscr.com/1qblbr ... (the middle square is the reticle texture).

Any help will be much appreciated.

Aplion

Share this post


Link to post
Share on other sites

Not too sure what might be causing this problem for you.

The model you've made looks largely similar to the one I made myself, and we're both using the same scope_view4_ca.paa from BIS' own .pbos for the eye shroud. The only thing I can think of is perhaps the alpha channel in the reticle texture you are using isn't 100% black, so any slight opacity to the reticle texture is amplified by overlaying the dark semi-transparent scope_view4_ca.paa over the top

The model and reticle textures I made seemed to work fine in my game. I've uploaded what I did so you can have a look and compare, or use whatever you need from it (change the reticle part for your texture or whatever):

http://da12thmonkey.rkslstudios.info/RKSL/da12th/FILES/RKSL_A3optic.rar

Edited by da12thMonkey

Share this post


Link to post
Share on other sites
Not too sure what might be causing this problem for you.

The model you've made looks largely similar to the one I made myself, and we're both using the same scope_view4_ca.paa from BIS' own .pbos for the eye shroud. The only thing I can think of is perhaps the alpha channel in the reticle texture you are using isn't 100% black, so any slight opacity to the reticle texture is amplified by overlaying the dark semi-transparent scope_view4_ca.paa over the top

The model and reticle textures I made seemed to work fine in my game. I've uploaded what I did so you can have a look and compare, or use whatever you need from it (change the reticle part for your texture or whatever):

http://downloads.rkslstudios.info/RKSL/da12th/FILES/RKSL_A3optic.rar

I've tried also the default reticle_sniper_ca.paa texture with same results so I don't believe that it is transparency issue ... looking your model I saw this value "#(argb,8,8,3)color(0,0,0,0.58,co)" as difference ... I'll check and I'll come back with results.

Thanks for your assistance mate.

---------- Post added at 20:27 ---------- Previous post was at 19:59 ----------

I've made all possible actions and the problem still occurs ... I've check your model replacing the textures and everything was fine ... I must see once more time my model and textures placement I guess ...

Again thanks for the help mate.

Share this post


Link to post
Share on other sites

The #(argb,8,8,3)color(0,0,0,0.58,co) bit is applied to the area surrounding the face with scope_view4_ca.paa applied. On Arma 2 optics models (and things like the Nightstalker's optics model in Arma 3) this area is coloured black #(argb,8,8,3)color(0,0,0,1).

I've done that to make sure that on wide-screen monitors, the wider area of the scope view has the same semi-transparent shading as is found outside the scope-ring on the texture scope_view4_ca.paa. In the BIS texture, the centre lens is roughly 0% opacity with a few details like smudges and scratches, then the black scope ring has 100% opacity so that it appears as a solid object, then outside that there is an area with ~58% opacity that makes the peripheral vision darker than the view through the lens part of the texture - so I've tried to match the wider peripheral area of the optics model with this outer region of the texture.

Share this post


Link to post
Share on other sites
The #(argb,8,8,3)color(0,0,0,0.58,co) bit is applied to the area surrounding the face with scope_view4_ca.paa applied. On Arma 2 optics models (and things like the Nightstalker's optics model in Arma 3) this area is coloured black #(argb,8,8,3)color(0,0,0,1).

I've done that to make sure that on wide-screen monitors, the wider area of the scope view has the same semi-transparent shading as is found outside the scope-ring on the texture scope_view4_ca.paa. In the BIS texture, the centre lens is roughly 0% opacity with a few details like smudges and scratches, then the black scope ring has 100% opacity so that it appears as a solid object, then outside that there is an area with ~58% opacity that makes the peripheral vision darker than the view through the lens part of the texture - so I've tried to match the wider peripheral area of the optics model with this outer region of the texture.

I believe these infos are valuable for any modder mate .... furthermore using the default BIS texture seems very strange that this "dark" result occurs ... basically I believe that this is matter of texture placement on these planes and has nothing to do with opacity as far as anyone is using the default BIS external texture (scope_view4_ca.paa) following by a reticle texture ... as far as I can understand the reticle texture transparency affects only the central area (where the reticle is placed).

Share this post


Link to post
Share on other sites

@da12thMonkey ...

I have another question which slightly differs than my previous subject (not completely irrelevant) ...

Is about 3D scopes again but this time I'm not talking about sniper scopes but something like BIS HAMR scope view ... basically I have an ACOG and I'd like to make it have a 3D scope view.

In fact I'm only getting this http://prntscr.com/1qg98w ... which is not the desired result ofcourse.

I've read these possible sources so far ...

http://forums.bistudio.com/showthread.php?153485-How-to-get-the-Collimator-sights-to-work

http://community.bistudio.com/wiki/Arma_3_Weapon_Collimator_Sights

http://forums.bistudio.com/showthread.php?157292-New-Scope-Question

... but to be honest I'm stuck (the tube matter is something I haven't completely understood, plus I'm not sure of the reticle model I must use).

Is it possible to help me on that ?

Thanks in advance.

Edited by Aplion

Share this post


Link to post
Share on other sites

ok I made some progress ... http://prntscr.com/1qi53x ... the fact is that I'm not sure if I've followed the right path to achive this result, as it looks more like as an aimpont device than an ACOG scope ....

Share this post


Link to post
Share on other sites

Sorry for the late reply. What you're doing looks along the right lines since basically you need to get rid of the old opaque lens from your ACOG model and replace it with a transparent one. Then do some extra modelling work so that the view through the lens looks good - this involves removing any parts of the mesh that obstruct the view through the middle of the sight, and building a tube inside the sight to prevent and nasty effects from looking through backfaces.

I've written a tutorial of sorts below which might indicate a couple of useful tips:

Starting out I have this ACOG model (not my model, it was made by Panda and Scubaman for ACE and they let me use it for a UKF project in Arma 2, but it's the only decent ACOG model I have to provide this example)

[Fig1] [Fig2]

As you can see, the front and back lenses are both opaque, so we wouldn't be able to look through the sight if we used it as a 3D scope in Arma 3. Therefore it needs some modification.

I start by selecting the faces that make up the eyepiece lens

[Fig3]

Then press the [D] key to remove just these face. After you've done this you may want to run Points\Select Isolated to select any vertexes that were previously part of that lens mesh, but are now not connecting any faces, then hit [Delete] to get rid of them.

Now we see that I can look more or less right through this scope model when I align myself with the eyepiece.

[Fig4]

The objective lens at the front of the model is still opaque but I can see through its backfaces, however, there are a couple of objects in this model that cross through the field of view through the eyepiece, so I need to remodel a few bits of the sight to fix this.

Here we see the model with a couple of quick adjustments to remove the obstructions (it's not perfect because I did a really quick job of it for the sake of this tutorial - if I was doing this properly, I'd take more time to remodel the parts properly)

[Fig5]

Now I have to go about replacing the eyepiece's lens with a transparent one. To do this I select the outer ring of vertexes where my old lens was and press [C] to centre the pin at this point, then [Shift+C] to activate the pin (should turn the cross into a cross with a circle when the pin is active)

[Fig6]

Now I have to do a quick bit of measuring to work out how big the lens I'm going to replace the old one with, needs to be. I do this by measuring the diameter of the eyepiece; selecting only the topmost and bottommost vertex in this ring of vertexes then pressing [Shift+E] to bring up the vertex properties window.

[Fig7]

Here I see that one vertex has a Y coordinate of 0.043 and the other has a Y coordinate of 0.064. Since they are otherwise aligned in the X and Z axis this means they are separated by a distance of 0.021 (0.064 - 0.043 = 0.021), so I need a lens of diameter 0.021 (give or take a small distance due to rounding errors in the coordinates only being given to 3 decimal places).

Now, since my pin is still centred on the outer edge of the eyepiece and I know roughly how big it needs to be, I should be able to create the new lens in a way where it aligns pretty directly with this edge. I start by making the Left (or right) viewport in O2, my active workspace by clicking the viewport (a black edge should appear around the viewport you are working in), then go to Create\Spehere to create a Sphere (Sphere is misspelled as "Spehere" in the O2 toolbar).

[Fig8]

As you see I create a sphere with Size X/Y/Z equal to the diameter of my eyepiece (0.021) and Segments horizontal equal to the number of sides that my eyepiece has (24 sides - count them in Fig6). Segments Vertical is set to a number that makes the curvature of the lens as smooth as I need it to be - this number kind of has to be a multiple of 4 (8, 12, 16 etc.) because we're going to cut the sphere in half and having it as a multiple of 4 means the vertical axis of the sphere will be formed by a nice edge that we can cut along, but the exact number is up to you.

The resulting sphere fills the eyepiece quite nicely, but you might have to use the scale tool to make it slightly larger is you see a gap (due to the rounding errors I mentioned before).

[Fig9]

Now we delete the half of the sphere that we don't need to form a hemisphere.

[Fig10]

And with the pin still aligned with the eyepiece ring, we need to scale the hemisphere down a fair bit along the X-axis to give the lens a more suitable curvature. Make sure the Relative to pin option is checked in the scale tool, as this will keep the edge of our lens hemisphere aligned with the edge of the eyepiece.

[Fig11] [Fig11b]

Now we need to texture the lens with something transparent. Personally I'm using the lens textures that BIS made for their 3D scopes: a3\weapons_f\acc\data\optic_endpart_ca.paa and a3\weapons_f\acc\data\fake_optics2.rvmat. So I just path to these in the Face Properties window:

[Fig12]

I provided an example of a 32-sided lens that uses BIS' textures and materials in this thread that people can use to work out how the UV layout works on those BIS textures. But I'll explain how to adapt the default UV layout for a sphere created in O2, to fit the required UV layout for those textures and materials directly.

We open the UV editor and use Filter\optic_endpart_ca.paa to show the lens' UV layout applied to the texture as it is currently:

[Fig13]

Select the lens' UV [Ctrl+A] then press the UV Manual Transform button (15th button from the left, it's the yellow one at the end of the block of 7 buttons, next to the green "flip vertical" button). A window like this should open up:

[Fig14]

Assign Selection Bottom as the 'Center' of transformation (bottom left part of the transform window) and rotate the UVs by 90 degrees so that the layout changes to be like above.

Then we need to shift the UVs to the left slightly. Change the Manual Transform window to 'Offset' mode and apply a -0.08 offset to the U-axis. It should move the layout slightly to the left as shown below:

[Fig15]

The result should look like this:

[Fig16]

Then after the lens is done you can add a tube inside the sight behind the lens and add a plane with your reticle texture applied. There is a space on the leftmost side of a3\weapons_f\acc\data\optic_endpart_ca.paa that can be used to texture the inside of the tube black, or since it doesn't really require any detail, one can apply a procedural texture to it such as #(argb,8,8,3)color(0,0,0,1).

Edited by da12thMonkey

Share this post


Link to post
Share on other sites

Very detailed tutorial and I must thank you for this. But my problem isn't so much the lens moddeling part as the "tube" which should be probably used for reticle appliance on in-game 3d view of the scope. This is the main part troubles me even if, as I said above, I believe that I made some progress but still the result (in-game) it is very similar to an "aimpoint device" instead of an ACOG Scope (here is my progress so far http://prntscr.com/1qi53x ).

For sure I must use some textures mentioned in your tutorial above for better results on my model lenses, so I'll give it a better try tommorow and I'll post any progress.

Thanks again for your help mate, appreciated.

Share this post


Link to post
Share on other sites
the result (in-game) it is very similar to an "aimpoint device" instead of an ACOG Scope (here is my progress so far http://prntscr.com/1qi53x ).

That's basically what all the 3D scopes are though. They function the same as collimator optics did in Arma 2, just zoomed in a lot more. Doing that seems to just be a mix of placing the eye memory point fairly close to the optics, and using a narrow FOV settings to 'magnify' the view in general - it's a matter of finding the right balance between those two variables I think.

The difficult part then is scaling your reticle texture in the magnified scope so that the lines are calibrated to the bullet drop. This seems to be much more tricky in developing 3D scopes than it was with the old 2D ones.

Any other visual effects in BIS' 3D optics just look like nice textures overlays to me.

Share this post


Link to post
Share on other sites
That's basically what all the 3D scopes are though. They function the same as collimator optics did in Arma 2, just zoomed in a lot more. Doing that seems to just be a mix of placing the eye memory point fairly close to the optics, and using a narrow FOV settings to 'magnify' the view in general - it's a matter of finding the right balance between those two variables I think.

The difficult part then is scaling your reticle texture in the magnified scope so that the lines are calibrated to the bullet drop. This seems to be much more tricky in developing 3D scopes than it was with the old 2D ones.

Any other visual effects in BIS' 3D optics just look like nice textures overlays to me.

This explains a lot (I'm talking about that the 3d scopes practically are collimator optics) ... so everything make sense now and my optics seems to be fine ...

The only thing, as you said, that needs to be more carefull is the calibration of the reticle texture ... but this again is a trial an error procedure I guess.

Furthermore I must say that normally the area out of the scope sight should not been zoomed, as it is not logical to have the same look as into the magnified scope area ... I don't know if I'm right and if there is some "work in progress" about that.

Share this post


Link to post
Share on other sites

ok ... following instructions and after many hours of reading - trying - modding - "crying" - shouting - etc ... I've managed to turn my scopes to 3d (I want to believe) ... here is the result on two of them http://prntscr.com/1qotoi

Thanks again da12thMonkey for all this help provided ... let me know if sometime you pass by from Greece ... I owe you some beers :)

Cheers

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×