Development > Artwork

Textures

<< < (11/13) > >>

arisian:
Actually, 1.0 is now super-shiny.  The new specularity-textures need to have values in the range 0-1 (well, 0-255, but that gets mapped to a float in the range 0-1 by your graphics card).  That means that with a texture, 1.0 really would be the maximum reflectivity.  The older system, which stored SPECULAR and HARDNESS values as material parameters, wasn't constrained to the range 0-1, since they could specify floating point values directly in the .mat files, which is why you could use bigger values.  The current "defaults" are actually set in R_EnableDynamicLighting() (because I didn't know about the #defines), and the default values are much lower than 1.0.  SPECULAR or HARDNESS values, if specified, will override the defaults; if a specularity and/or roughness texture is provided, that will override the SPECULAR or HARDNESS values.

Oh, and all the "accessory" textures get loaded automagically; so long as you follow the naming conventions, all you need to do is drop the new textures in with the old ones.  And I'll just mention again here that you don't always need to have all the textures be the same resolution; a 1x1 pixel specularity and/or roughness texture would be perfectly fine for an object that was uniformly shiny over it's surface.

Current defaults (hardcoded) are SPECULAR=0.25, HARDNESS=0.1;  the HARDNESS parameter controls how strongly the material reflects light, and the SPECULAR parameter controls how tightly focused the reflection is (ie. do you get a small "spot" of shine, or does the shine cover a larger area).  SPECULAR = 1.0 would mean a very tiny bright spot.

Mattn:
it would be nice if you could update the material system page in the wiki with this information - and use the constants (in trunk, too please, i will merge that back in 2.3 [or are you only talking about your recently created real-time-shadow-branch?]) - otherwise it might really look strange ;)

H-Hour:
Thanks for the info arisian. I'll probably need to take another look at my values with the new system.

Does this mean we can provide a specularity file that makes certain parts of the texture more reflective than others? And is there information somewhere on the format for this?

MCR:
Now I know what was causing my funky gfx, when using the old material files & values like bump 5.0 or specularity 6.0 !

lol.

MCR:
@H-Hour: http://ufoai.ninex.info/wiki/index.php/Artwork

arisian updated it some while ago.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version