arma:modeling:shadows
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
arma:modeling:shadows [2008/06/28 10:19] – more data added and some formatting snakeman | arma:modeling:shadows [2024/08/01 10:00] (current) – links added. snakeman | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Shadows ====== | + | ====== |
+ | |||
+ | [[https:// | ||
+ | |||
+ | **ArmA 1** aka Armed Assault (ArmA) | ||
Used for HW shadow casting. The shadows are cast from this LOD on resolution LOD surfaces. The shadow volume area is made by extruding the lit faces of the shadow LOD (faces that have normals oriented towards the light) in the light direction. | Used for HW shadow casting. The shadows are cast from this LOD on resolution LOD surfaces. The shadow volume area is made by extruding the lit faces of the shadow LOD (faces that have normals oriented towards the light) in the light direction. | ||
- | LOD should be as simple as possible, to represent the 1st LOD shape and all its important parts. The shape should not exceed 1st LOD volume. Maximum | + | LOD should be as simple as possible, to represent the 1st LOD shape and all its important parts. The shape should not exceed 1st LOD volume. Maximum |
All components must be Closed (each edge must have 2 neighbor polygons) – check with Structure -> Topology -> findNonClosed. Normals can be oriented both ways, depending on desired purpose of the specific shadow LOD surface/ | All components must be Closed (each edge must have 2 neighbor polygons) – check with Structure -> Topology -> findNonClosed. Normals can be oriented both ways, depending on desired purpose of the specific shadow LOD surface/ | ||
Line 13: | Line 17: | ||
LOD must be named ShadowVolume 0.000, ShadowVolume 10.000 or ShadowVolume 1000.000 | LOD must be named ShadowVolume 0.000, ShadowVolume 10.000 or ShadowVolume 1000.000 | ||
- | * Shadow volume 0 is the main stencil shadow. It shuould | + | * Shadow volume 0 is the main stencil shadow. It should |
- | * Shadow Volume 10 is optimised | + | * Shadow Volume 10 is optimized |
* Shadow 1000 is special for trees, it uses alpha transparent textures to be calculated using GPU shadow buffer. (so this lod can have link on texture) | * Shadow 1000 is special for trees, it uses alpha transparent textures to be calculated using GPU shadow buffer. (so this lod can have link on texture) | ||
Line 32: | Line 36: | ||
For trees and vegetation there can also be used so called HYBRID SHADOW. This is controlled by model property Shadow=hybrid in Geometry LOD Those shadows are cast on all models except the model itself. Trees can use special shaders for leaves that simulates self shadowing. | For trees and vegetation there can also be used so called HYBRID SHADOW. This is controlled by model property Shadow=hybrid in Geometry LOD Those shadows are cast on all models except the model itself. Trees can use special shaders for leaves that simulates self shadowing. | ||
+ | |||
+ | |||
+ | ====== ShadowVolume on bis MLODs ====== | ||
+ | |||
+ | These are statistics on the bis MLOD vegetation objects for ShadowVolume settings. | ||
+ | |||
+ | akat02s:\\ | ||
+ | ShadowVolume 0.000\\ | ||
+ | ShadowVolume 10.000\\ | ||
+ | geometry;\\ | ||
+ | shadow = hybrid | ||
+ | |||
+ | banana_2, banana_3, banana_4, hrusen2, jablon, ker buxus, ker deravej, ker pichlavej, ker s bobulema, Krovi_bigest, | ||
+ | ShadowVolume 0.000\\ | ||
+ | ShadowVolume 1000.000\\ | ||
+ | geometry;\\ | ||
+ | shadow = hybrid\\ | ||
+ | sbSource = explicit\\ | ||
+ | PrefersShadowVolume = 0 | ||
+ | |||
+ | bodlak_group, | ||
+ | ShadowVolume 0.000\\ | ||
+ | ShadowVolume 1500.000\\ | ||
+ | geometry;\\ | ||
+ | placement = slope\\ | ||
+ | shadow = hybrid\\ | ||
+ | sbSource = explicit\\ | ||
+ | PrefersShadowVolume = 0 | ||
+ | |||
+ | DD_borovice02, | ||
+ | ShadowVolume 0.000\\ | ||
+ | ShadowVolume 1500.000\\ | ||
+ | geometry;\\ | ||
+ | shadow = hybrid\\ | ||
+ | abSource = explicit\\ | ||
+ | PrefersShadowVolume = 0 | ||
+ | |||
+ | DD_bush01, les_fikovnik2, | ||
+ | ShadowVolume 0.000\\ | ||
+ | ShadowVolume 1500.000\\ | ||
+ | geometry;\\ | ||
+ | shadow = hybrid\\ | ||
+ | sbSource = explicit\\ | ||
+ | PrefersShadowVolume = 0 | ||
+ | |||
+ | DD_bush02, les_dub_jiny, | ||
+ | ShadowVolume 0.000\\ | ||
+ | ShadowVolume 10.000\\ | ||
+ | ShadowVolume 1500.000\\ | ||
+ | geometry;\\ | ||
+ | shadow = hybrid\\ | ||
+ | sbSource = explicit\\ | ||
+ | PrefersShadowVolume = 0 | ||
+ | |||
+ | Krovi2, les_buk, les_dub, str buk, str dub, str krovisko vysoke, str_fikovnik: | ||
+ | ShadowVolume 0.000\\ | ||
+ | ShadowVolume 10.000\\ | ||
+ | ShadowVolume 1000.000\\ | ||
+ | geometry;\\ | ||
+ | shadow = hybrid\\ | ||
+ | sbSource = explicit\\ | ||
+ | PrefersShadowVolume = 0 | ||
+ | |||
+ | Krovi4, Krovi, Krovi_long: | ||
+ | ShadowVolume 0.000\\ | ||
+ | ShadowVolume 1000.000\\ | ||
+ | geometry;\\ | ||
+ | placement = slope\\ | ||
+ | shadow = hybrid\\ | ||
+ | sbSource = explicit\\ | ||
+ | PrefersShadowVolume = 0 | ||
+ | |||
+ | les_singlestrom, | ||
+ | ShadowVolume 0.000\\ | ||
+ | ShadowVolume 10.000\\ | ||
+ | ShadowVolume 1500.000\\ | ||
+ | geometry;\\ | ||
+ | shadow = hybrid\\ | ||
+ | abSource = explicit\\ | ||
+ | PrefersShadowVolume = 0 | ||
+ | |||
+ | pinus_mugo_lowpoly: | ||
+ | ShadowVolume 0.000\\ | ||
+ | ShadowVolume 1500.000\\ | ||
+ | geometry;\\ | ||
+ | placement = slope\\ | ||
+ | abSource = explicit\\ | ||
+ | PrefersShadowVolume = 0 | ||
+ | |||
+ | str jalovec, str_pinie: | ||
+ | ShadowVolume 0.000\\ | ||
+ | geometry;\\ | ||
+ | shadow = hybrid | ||
+ | |||
+ | Conclusion: for shadows to work on bushes/ | ||
+ | ShadowVolume 0.000\\ | ||
+ | ShadowVolume 1000.000\\ | ||
+ | and in the geometry;\\ | ||
+ | shadow = hybrid\\ | ||
+ | sbSource = explicit\\ | ||
+ | PrefersShadowVolume = 0\\ | ||
+ | the LODs must be closed and triangulated. | ||
+ | |||
====== Shadow Tutorial by Skaven ====== | ====== Shadow Tutorial by Skaven ====== | ||
Line 45: | Line 152: | ||
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. | 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 | + | 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. | + | 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/ | + | 5 - Inside the Shadow Lod (10000) with the entire model selected go to Structure/ |
6 - If you do have any opened points/ | 6 - If you do have any opened points/ | ||
Line 61: | Line 168: | ||
Model needs to be closed, triangulated AND sharp edged | Model needs to be closed, triangulated AND sharp edged | ||
- | You can have more than 400 polies | + | You can have more than 400 poly' |
- | 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 | + | 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 sometimes |
inner shadow can cause sick effects on weapons ? | 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 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 ?\\ | i have my graphic options on LOW, maybe this ?\\ | ||
but i really get zebra effects | but i really get zebra effects | ||
i gave no " | i gave no " | ||
- | i gave model with lower polycount | + | i gave model with lower poly count as i it was in OFP maybe there should be more detailed model ?\\ |
- | all faces are closed, no " | + | all faces are closed, no " |
half of gun is almost black on the soldiers there is " | half of gun is almost black on the soldiers there is " | ||
+ | |||
====== Notes ====== | ====== Notes ====== | ||
- | **Armored_Sheep (BIS dev)**: The LODNoShadow property is not necessary. This property is used in other lods to disable shadow projection on too complex meshes. | + | **Armored_Sheep (bis dev)**: The LODNoShadow property is not necessary. This property is used in other lods to disable shadow projection on too complex meshes. |
ArmA engine uses Shadow Volume 0, Shadow Volume 10 and Shadow Volume 1000. Different values than that are not used. | ArmA engine uses Shadow Volume 0, Shadow Volume 10 and Shadow Volume 1000. Different values than that are not used. | ||
- | Shadow volume 0 is the main stencil shadow. It shuould | + | Shadow volume 0 is the main stencil shadow. It should |
- | Shadow Volume 10 is optimised | + | Shadow Volume 10 is optimized |
Shadow 1000 is special for trees, it uses alpha transparent textures to be calculated using GPU shadow buffer. | Shadow 1000 is special for trees, it uses alpha transparent textures to be calculated using GPU shadow buffer. | ||
- | Source [[http:// | ||
- | **Earl (BIS dev)**: The only named property that should always be used is " | + | ===== Earl Summary ===== |
+ | |||
+ | **Earl (bis dev)**: The only named property that should always be used is " | ||
+ | |||
+ | Default behavior should be: | ||
+ | |||
+ | * Use high detail SV LOD to draw stencil shadow | ||
+ | * At distance use lower detail SV LOD to draw stencil shadow | ||
+ | * At greater distance, use last or lower visual LODs for shadow map source, and start to fade that shadow away. | ||
+ | |||
+ | |||
+ | ===== Hand Rails ===== | ||
+ | |||
+ | **Armored_Sheep** (bis Dev) about handrail modeling in houses: Stencil buffer shadows (those sharp polygons) are not able to use alpha transparency. They are drawn by extruding triangles from ShadowVolume lod. | ||
+ | |||
+ | If you choose shadow buffer casting (used on trees) you can have alpha transparent textures in shadow casting lod (you define this by properties in geometry lod) BUT you will be still limited by texture resolution (ArmA casts this shadow using single 2048x2048 texture for whole scene) | ||
+ | |||
+ | At this particular model I suppose to don't put the rail in the shadow at all. (PMC edit: means its either no shadow, or model a real handrail with polygon' | ||
+ | |||
+ | |||
+ | ====== Closing Model ====== | ||
+ | |||
+ | modEmMaik about closing shadowvolume lod mesh: | ||
+ | |||
+ | I open up another O2, copy and paste the single element, which is not close-able, and try to detect the problem. | ||
+ | |||
+ | Sometimes faces are doubled, which you may detect in the solid view and switch the faces (w-button). | ||
+ | |||
+ | Sometimes the mesh is not closed because one edge in one face is splitt (one additional point in the same line). It looks closed, but it is not. | ||
+ | |||
+ | When it is closed, I copy the mesh back. | ||
- | Default behaviour should be: | + | Best check for shadow LOD is to create a big box in the first visual LOD, invert the faces (w-button) of this box and check the result in the buldozer. |
- | * Use high detail SV lod to draw stencil shadow | ||
- | * At distance use lower detail SV lod to draw stencil shadow | ||
- | * At greater distance, use last or lower visual lods for shadow map source, and start to fade that shadow away. |
arma/modeling/shadows.1214648380.txt.gz · Last modified: 2008/06/28 10:19 by snakeman