[info]SWBF MSH Forensics

Started by tirpider, February 17, 2013, 03:26:33 PM

Previous topic - Next topic
February 23, 2013, 07:16:28 AM #30 Last Edit: February 23, 2013, 09:51:01 AM by tirpider
I have no idea what that script would do, Phobos.

Quote from: Sereja on February 23, 2013, 04:11:38 AM
It is strange, but for me, 04 00 00 00 01, hase shadow :confused:...
Also, 04 00 00 00 02, has different look's.
But, here, few more interesting codes, I found:
<pic>
04 00 00 00 00 0A - "Misterious Code".
It's totaly ignore any texture, and, under different view angles, become totaly black, white, or transparent.
04 00 00 00 00 0B - "Secondary Texture Switcher".
Become super glow, if you come too close. Actualy works only with -vertexlighting, in msh.options, and wraped secondary texture. Without it, become totaly black, in close look's.
04 00 00 00 16 00 - "Blur Code".
Make dissapear any lights, or lighted objects behind of it.
04 00 00 00 40 04 - "Glass Code".
Stopping use alpha channel, for transparence.

04 00 00 00 01
- emissive render flag, yours has a shadow because you have altered something. I removed all shadows from the test model.  When I mentioned that emissive couldn't accept a shadow, I was talking about shodows falling on it, not it's own shadow.

04 00 00 00 02
  - Cool. I can't seem to get it to do anything without altering the world some how. (I'm trying to see what these types and flags do without altering the world. once thats established, then they can be customized to fit in all the different sky files folks come up with.)

04 00 00 00 00 0A
- thats the water render type. it's look will change as you view it from diferent angles.

04 00 00 00 00 0B
- groovy. thanks for the info. I suspect others only work with certain .option settings as well.

04 00 00 00 16 00
- The munger calls that flag HardedgedTransparency in the modelmunge.exe.
... I think you swapped the values here..
04 00 00 00 16 00 = HardedgedTransparency flag
04 00 00 00 00 16 = ICE_REFRACTION type, which behaves exacly as you describe it.

04 00 00 00 40 04
- AdditiveTransparency flag and the Specmap render type.



And...
Heres a list of the render types and their names, as pulled from the modelmunge.exe for bf1...  (remember all that noise about the types being different? Well they aren't as different as expected.)
Most all fail unless you have them set up with other settings correctly, I will go in to lining up correct settings later, using the assets and bf2 info as a guide...
[spoiler]render type               index     hex   
nothing                   0         00   
Glow                      1         01   
Lightmap                  2         02   
Scroll                    3         03   
Specmap                   4         04   
Glossmap                  5         05   
Chrome                    6         06   
Animate                   7         07   
Ice                       8         08   
Sky                       9         09   
Water                     10        0A   
DETAIL                    11        0B   
SCROLL2V                  12        0C   
ROTATE                    13        0D   
GLOW_ROTATE               14        0E   
PLANAR_REFLECTION         15        0F   
GLOW_SCROLL               16        10   
GLOW_SCROLL2V             17        11   
CURVED_REFLECTION         18        12   
NORMALMAP_FADE            19        13   
NORMALMAP_INVFADE         20        14   
ICE_REFLECTION            21        15   
ICE_REFRACTION            22        16   
EMBOSS                    23        17   
WIREFRAME                 24        18   
ENERGY                    25        19   
AFTERBURNER               26        1A   
BUMPMAP                   27        1B   
BUMPMAP_GLOSSMAP          28        1C   
TELEPORTAL                29        1D   
MULTISTATE                30        1E   
SHIELD                    31        1F   
[/spoiler]

The render types can be used with flags, and many other settings, but you can only specify one render type at a time, per material.  Some require additional textures, some require settings in the data1, and data2 spots. Some require specific data colors, some don't...  haven't tested them yet, other than to determine the above list is, in-fact, all the types the munger looks for regarding render types.

Here is the fun part about all this..  the texture could cause a flag or type to render in such a way that it's effect might not be noticable. Also, different video cards may ignore certain flags or types for technical reasons. (memory? under powered gpu? low dx or ogl version compatabiity? idk..)  I have a low end video card, so some of these may fail on my machine for that reason. 

-edit afterthought
At first, I thought there was a totally different set of render types for bf1 and bf2. I checked inside the exe's for lists of things that looked like render types and came up dry for bf2, but in the bf1 munger, I found a slightly longer list that was backwards. [spoiler]SHIELD
MULTISTATE
TELEPORTAL
BUMPMAP_GLOSSMAP
BUMPMAP
AFTERBURNER
ENERGY
WIREFRAME
EMBOSS
ICE_REFRACTION
ICE_REFLECTION
NORMALMAP_INVFADE
NORMALMAP_FADE
CURVED_REFLECTION
GLOW_SCROLL2V
GLOW_SCROLL
PLANAR_REFLECTION
GLOW_ROTATE
ROTATE
SCROLL2V
DETAIL
Water
Sky
Ice
Animate
Chrome
Glossmap
Specmap
Scroll
Lightmap
Glow
nothing
Bump
Camouflage
Refraction
Detail
Reflection
*
glow
[/spoiler]
The numbers did not match and only last night did I confirm the previous list through the error codes the munger throws when a type is called but not set up correctly.

So for the types, It is just a matter of figuring out what is required to get them to work, and I bet they work just like the documentation and Ande's site describes. 

I cant explain why some bf2 assets render incorrectly anymore, because the reason I came up with before (that BF2 has more and different types) is invalid.  It may be that the types are referenced, but the munger wasn't set up to build them untill BF2 was developed.

A lot of folks have put efforts into describing the behavior of these types, and as demonstrated by Sereja's glass, there is an almost unlimited potential for material effects when combining flags, types, and world settings.  When I do test them, it won't be as straight forward as the flag tests since each type has wierd requirements. It will take a while to plan the tests and build the materials for them.  I'll just chase down one type at a time and leave combined effects to the experts and artists.