PDA

View Full Version : Tutorial - Making Shadows



Skaven
Jun 10 2007, 17:43
I was asked to wright a tutorial about making shadows for Arma and so I took the opportunity to paste it here, I know this as been explained before, however, this is a dedicated thread and will be easier for future searches.



1 - Open a 10000 distance view LOD (note it's 10000 not 10.000)

2 - Make the model to use as a shadow inside the 10000 LOD ( for example a weapon should be like 200/300 polys tops, of course the less the better).

PS: Don't forget to delete the textures applied on the Shadows model (if you have any) since it's all black you don't need it mapped.

3 - Open a property inside your 10000 Lod and call it Lodnoshadow the value is 0

4 - Open the same property (Lodnoshadow) in all the other Lods but this time give it a value of 1.

5 - Inside the Shadow Lod (10000) with the entire model selected go to Structure/Topology/Find non-Closed and check if you have any opened point/faces (they get red if you do and below on your left O2 tells you the amount of them).

6 - If you do have any opened points/faces you must close them, you may try O2 to close them for you, for that go to Structure/Topology/Close, this should close the model for you, however, sometimes you need to do it by hand since this feature inside O2 as some limitations.

PS: Be sure that all points/faces are closed, the best way to know this is by doing the step I wrote you before Structure/Topology/Find non-Closed and see if it gives you 0/0 on the left part below, if you miss this than not only the shadows won't work as most of the times the game will crash while loading the model.

7 - Finnaly with all points/faces closed, select the entire model and go to Structure/Triangulate \ .

That's it, now try your shadow in game, good luck http://forums.bistudio.com/oldsmileys/wink_o.gif


MODERATORS: Please fix me the name of the thread http://forums.bistudio.com/oldsmileys/whistle.gif

Farles
Jun 10 2007, 21:43
Good stuff.

Not sure about that LodNoShadow property thing, never had to deal with it and I got working ingame shadows. You know the specific use for it?

Skaven
Jun 10 2007, 22:00
Well I never tried it without it, and since OFP used it I use it also, I didn't knew it wasn't necessary http://forums.bistudio.com/oldsmileys/tounge2.gif

Thanks for the tip http://forums.bistudio.com/oldsmileys/wink_o.gif

raedor
Jun 10 2007, 22:08
Very cool, thanks. Would you mind adding it to the biki? http://forums.bistudio.com/oldsmileys/welcome.gif

Skaven
Jun 10 2007, 22:19
Quote[/b] ]Very cool, thanks. Would you mind adding it to the biki? http://forums.bistudio.com/oldsmileys/welcome.gif

Sure, it's being done, please fix my topic name I made a mistake and called it MakinK instead of making.


ty.

VXR
Jun 10 2007, 22:40
Very cool, thanks. Would you mind adding it to the biki? http://forums.bistudio.com/oldsmileys/welcome.gif
http://community.bistudio.com/wiki/Category:ArmA:_Modelling

How can I add an aticle to the page? I looked on the Wiki but was not able to find the Create article button.

raedor
Jun 10 2007, 22:54
Very cool, thanks. Would you mind adding it to the biki? http://forums.bistudio.com/oldsmileys/welcome.gif
http://community.bistudio.com/wiki/Category:ArmA:_Modelling

How can I add an aticle to the page? I looked on the Wiki but was not able to find the Create article button.
[OT on]
Just take http://community.bistudio.com/wiki/ and add the name of the page you want to create.

To add it to the mentioned category, write this at the end of the page:
Quote[/b] ][[Category:ArmA: Modelling]]

I created an empty page with category for now:

http://community.bistudio.com/wiki/Creating_Shadow_LODs
[OT off]

MehMan
Jun 13 2007, 07:21
Also, do the shadow models have to be trianguliazed?

NZXSHADOWS
Jun 13 2007, 07:31
Quote[/b] ]7 - Finnaly with all points/faces closed, select the entire model and go to "Structure - " Triangulate \"

yeap, Do it after everthing is closed.  http://forums.bistudio.com/oldsmileys/thumbs-up.gif
An Lod 10000 is your shadow.

raedor
Jun 13 2007, 15:13
Moving to appropiate place.

MehMan
Jun 13 2007, 15:42
Bah damn it! I meant sharp edges but typed triangulized.

Ian Malcolm
Jun 13 2007, 16:22
Bah damn it! I meant sharp edges but typed triangulized.
Model needs to be closed, triangulated AND sharp edged http://forums.bistudio.com/oldsmileys/wink_o.gif

Jahve
Jun 14 2007, 16:11
Bah damn it! I meant sharp edges but typed triangulized.
Model needs to be closed, triangulated AND sharp edged http://forums.bistudio.com/oldsmileys/wink_o.gif
Yep, in that order.

RN Malboeuf
Jun 14 2007, 17:00
Quote[/b] ]I was asked to wright a tutorial about making shadows for Arma
...
for example a weapon should be like 200/300 polys tops
400 is maximum afaik. You did _ofp_ shadows tutorial. They work well in arma, but thye are not arma ones (arma shadows are much more detailed). I guess you have to change the board http://forums.bistudio.com/oldsmileys/wink_o.gif

MehMan
Jun 15 2007, 15:28
You can have more than 400 polies in the shadow LOD. I've expirmented with a 1000 poly model up to 4000 poly. It worked but with varying loading results. So it's best to keep it low to keep preformance up.

vilas
Jun 26 2007, 08:45
i found that shadows on vehicles works no matter if triangulated or not no matter LOD 30 or 10000
but on my weapons i get really stupid results
i don't know why, but soemtimes my weapons (after close, triangulate, 10000) look like zebra
so i decided not to give shadows, now i work on making jnew low-poly models for shadows, but what if shadow model is diffenent than LOD models ?
inner shadow can cause sick effects on weapons ?

i get best results when shadow lod was almost copy of pilot view
why shadows behave different ?
i have my graphic options on LOW, maybe this ?
but i really get zebra effects

this is exapmle of "not so bad" looking shadow (http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?act=ST;f=70;t=56764;st=555)

but other weapons look horrible, when i use existing models, make them lower poly (removing details, sights and etc),
after triangulation my shadows lods have over 1000 polys (if shape of weapon has 600 without triangulation)
or maybe you made completly new models just for shadows

edit there are 2 triangulations in oxygen, left and right

and i made some new models as shadow models, and really stupid looking, for example scope or magazine do not give shadow , i really tried and shadows are not working in my case

Armored_Sheep
Jul 3 2007, 11:58
The LODNoShadow property is not necessary. This property is used in other lods to disable shadow projection on too coplex meshes. Wiki page updated.

[APS]Gnat
Aug 11 2007, 07:21
Any tips for reducing the annoying way the Shadow LOD casts a shadow (or darkening) on its own Resolution LOD ?
Seems the Shadow LOD (10000) can't be in the same plane as the Resolution LOD, which sort of means you need to copy every contour of the resolution LOD and then scale to like 97%
And windows are a pain because you end up with tinting of the dark-side windows of a vehicle ....

Synide
Aug 11 2007, 08:06
confusing...

you should not have a 'shadow' set of polygons in a 'resolution' lod.

it should be a set of similar shaped poly's in a lod all of it's own and that lod's 'resolution' should be 10,000.

in the 'resolution' lods 1.0 to 999.0 you should have the property 'lodnoshadow=1' set.

in your 'shadow' lod (10,000) you shouldn't have any poly's where the windows are... well, apparently it seems this is the case...

http://i198.photobucket.com/albums/aa15/sbeetham/10000.jpg

hmmm....

as you can see in this pic the 'shadow lod' tire is smaller or within the dimensions of the 1.0 lod tire (wireframe image) but in shadow lods i've been producing up till now i would not have guessed that the poly's for tires should be reversed like this...

http://i198.photobucket.com/albums/aa15/sbeetham/10000-2.jpg





edit: I share your sentiment though... it would be really 'nice' if someone could tells us 'exactly' what a shadow lod should consist of, what a 10010 lod is, what a 11,000 & 11010 lod is when to use them and when/what circumstances should there be more or less poly's used in a shadow.

unfortunately, i suspect that people are 'busy' working and do not have the time atm to impart information of this caliber.

[APS]Gnat
Aug 11 2007, 17:11
No I dont have anything in my Res LODs for shadows, only a low poly model at 10,000.
And I'm not using the lodnoshadow=1, I still get a ground shadow but where ever the low poly model is outside the High res Res model surfaces, you get dark bits (almost like dark transparent bumps).
But the model will also cast a shadow on itself as it should.

But I have 2 other models where I'm just using 0.00 LOD and the 6.0 Res LOD for the low poly model.
If I just put lodnoshadow=1 in the 0.00 LOD, in;

Model A - I'm getting a lovely ground shadow, nice self-shadow cast on itself and no discoloured bits where the low poly model doesn't surface match the 0.00 LOD

Model B - Lovely ground shadow, no surface discolouration, but no shadow onto itself !!! http://forums.bistudio.com/oldsmileys/crazy_o.gif

There is definely more than 1 way to cast shadows, but recreating consistency is a problem.

Synide
Aug 12 2007, 05:41
yeah, true, be nice to know what the 10010 LOD does/is and the 11,000 and 11010 - all four are shadow related but in what context should they be used and what features they should have are a mystery.

most of the ArmA viewed so far seem to have the 10000 LOD with outward facing poly's and the 11,000 LOD with the poly's reversed. (facing inward)

i haven't seen any 'wizzy' new property that one should magically add to a 'shadow' LOD.

one thing that could be a problem is MLOD models....

ODOL v40 models have extra array's of vertices information that MLOD doesn't support.
One of the extra arrays may specify on a per vertex basis certain properties or characteristics that make shadows perform properly in ArmA - but with MLOD models we might not be able to 'replicate' these features.
I reckon they will probably upgrade the current MLOD format to support the new data structures - but that's something that is 'in-the-wind'.


edit: Oh, btw, the only models i'm seeing with 0.0 resolution LOD's are the 'optic' model files. haven't come across a 'proper' model that has had a Res below 1.0.

[APS]Gnat
Aug 12 2007, 05:56
Gnat @<hidden> Aug. 12 2007,01:11)]... Model B - Lovely ground shadow, no surface discolouration, but no shadow onto itself &#33;&#33;&#33;  http://forums.bistudio.com/oldsmileys/crazy_o.gif
Bzzzzt ... mistake by me, that was me testing on my "Modin" computer where I have the Shadows set to Normal
When you switch Shadows to above "normal" you get the model casting a shadow on itself.

So it does works without the 10,000 lod, just a low poly 6.0 LOD and a "lodnoshadow" .....
I&#39;ll increase the number from 6.0 up (because thats a bit low for the low poly model with no textures) and test some more.

@<hidden>
I&#39;ve no idea what the significance of using 0.0 or 1.0 or 1.12 etc etc for that matter ..... some people say theres a formula vs poly (or vertex count) but stuffed if I see the difference.
If I was a paid developer working on an offical addon I guess I might take it a little more serious. http://forums.bistudio.com/oldsmileys/wink_o.gif

Pathetic_Berserker
Jan 18 2008, 04:54
Hmm this thread hasn&#39;t quite answered my questions yet, but I think I can add a few observations that will relate.

After studying BIS models i noticed that shadow lods 0.000 and 10.000 (atleast) are always within and bounded by the first resolution lod.

The flipping of faces in shadow lods is to prevent the shadow lod from showing through the res lod if it happens to be too close spacialy, to the res lod. And will only produce faults on the shaded side of the model. This is a great short cut if you dont have time to check every light angle.

Though the flipping of faces is a fast and effective way of screening the shaddow lod it will produce deteriorated shadows around complex shapes.

Although a model will self shadow with out the shadow lods, Ive found that much detail could be lost or distorted without them.

Oh, my question was about how textures behave in shadows. The model Im playing with at the moment develops streaks, like a badly graded shade map on a color chart. when the texture falls under shadow. the effect is less noticable at distance

Panda[PL]
Jan 18 2008, 09:38
Oh, my question was about how textures behave in shadows. The model Im playing with at the moment develops streaks, like a badly graded shade map on a color chart. when the texture falls under shadow. the effect is less noticable at distance
Screenshots? I didn&#39;t understand what you mean by "streaks".
Other than possible artefacts when shadow LOD is not closed.

Pathetic_Berserker
Jan 19 2008, 15:25
So right there Panda[PL]

http://img138.imageshack.us/img138/1359/arma2008012002243237fx5.jpg

as you can see on the weapon pylons and just in front of the pilot there are lines in the shadow.

It has reduced a bit since I increased the texture size.

I was fortunate Rico form the ADF MOD let me have a go at this esp&#39; as its my first real jump into textures.I had to change the originals as the ol&#39;OFP highlights were interfering with me seeing the effectivness of the shadow lods (still looks a little rough around the edges)

There are two other bugs that you might spot.That I have no idea about.
One of the gunners windows has dropped a texture though its still visable from the gunners position.
And the windows on the end of the hellfires have created an xray vision effect on the model. though I guess thats because they dont have view lods

Also any advice on how to improve the textures would be appreciated

[IC]Wedge
Jan 20 2008, 21:34
does anyone else get shadows when inside a custom building??