Page 1

Twinity Development : Valid 3dsMax Shaders List This page last changed on Jun 23, 2010 by akrivenko.

• Shaders List • ° For Static Objects: ° For Avatars: ° Special Shaders: ° Notes: • Shader Parameters FAQ

Shaders List For Static Objects: shaders/std_effects/lightonly.fx - for types of objects< it supports textures with alpha channels (not support skinning) shaders/std_effects/lightonly_dc.fx - same as lightonly.fx but with constant diffuse color instead of diffuse texture shaders/std_effects/lightonly_ao.fx - supported ambient occlusion map with dual UV coordinates shaders/std_effects/lightonly_ao_?.fx - supported ambient occlusion map with dual UV coordinates (? channel is taken as occlusion term) * shaders/std_effects/lightonly_ao_normal.fx - supported ambient occlusion map with dual UV coordinates, also supports normal map. shaders/std_effects/lightonly_ao_?_normal.fx - supported ambient occlusion map with dual UV coordinates (? channel is taken as occlusion term), also supports normal map. shaders/std_effects/lightonly_ao_normal.fx - supported ambient occlusion map with dual UV coordinates, also supports reflection cubemap. shaders/std_effects/lightonly_ao_?_normal.fx - supported ambient occlusion map with dual UV coordinates (? channel is taken as occlusion term), also supports reflection cubemap. shaders/std_effects/lightonly_ao_normal_reflection.fx - supported ambient occlusion map with dual UV coordinates, also supports normal map and reflection cubemap. shaders/std_effects/lightonly_ao_?_normal_reflection.fx - supported ambient occlusion map with dual UV coordinates (? channel is taken as occlusion term), also supports normal map and reflection cubemap. shaders/std_effects/lightonly_light_cone.fx - shader for transparent light cones which fades our when angle between view direction and surface normal gets 90 deg. shaders/std_effects/lightonly_reflection.fx - same as lightonly.fx but with reflection cubemap applied to all surface. can be used for glass, metal, plastic and other reflecting surfaces.

Document generated by Confluence on Jun 05, 2011 10:21

Page 1


shaders/std_effects/lightonly_time.fx - supports diffuse map, alternative diffuse map called time map (both diffuse and time map use 1st texture coordinates set), and time-blend map, which uses 2nd texture coordinates set where v coordinate is also shifted as the time flows. Color value from time-blend map multiplies color from time map, and then alpha fetched from time-blend map is used to blend between diffuse map and modified time map. shaders/std_effects/lightonly_normal.fx - same as lightonly.fx but with normal map support. shaders/std_effects/lightonly_specular.fx - same as lightonly.fx but with specular map support. Specular map alpha channel sets the specular reflection intensity and rgb channels set material specular color. shaders/std_effects/lightonly_specular_reflection.fx - same as lightonly.fx but with both specular map and reflection cubemap support. shaders/std_effects/lightonly_normal_specular.fx - same as lightonly.fx but with both normal map and specular map support. shaders/std_effects/lightonly_city_window.fx - city window material with 2 textures (window furniture level and glass surface) and window glow color. can be used for city facades. reason to select this shader is to use just two textures (one for facade element wall and window furniture, and second atlas texture for window insides) for all facade elements, so they all can be rendered with one draw call but still have a variety of different windows content. shaders/std_effects/lightonly_city_window_reflection.fx - same as previous but with reflection cubemap on glass surface level. shaders/std_effects/lightonly_window_reflection.fx - same as "lightonly_reflection.fx", but it doesn't reflect where alpha channel is white. doesn't contain window glow color. Can be used for simple windows with single texture in landmarks, apartments, etc. shaders/std_effects/lightonly_chrome_alpha_double_sided.fx - complex glass shader with environment map (env. map is not supported, its better to use simply lightonly.fx ) shaders/std_effects/lightonly_city_ground.fx - shader with 3 maps support: 1- diffuse map, 2 macro dirt map (multiplied by 1st one), 3 - detail map (blended with 1 and 2 multiplication result, by detail map alpha). Supports texture coordinates scaling for 2nd and 3rd maps. shaders/std_effects/lightonly_city_ground.fx - shader with 3 maps support: 1- diffuse map, 2 macro dirt map (multiplied by 1st one), 3 - detail map (blended with 1 and 2 multiplication result, by detail map alpha). Supports texture coordinates scaling for 2nd and 3rd maps.

For Avatars: shaders/std_effects/fxcharacter.fx and skin

- for all types of character's clothes, it supports alpha textures

shaders/std_effects/fxcharacter_normal.fx - for all types of character's clothes, it supports diffuse map and normal map

Document generated by Confluence on Jun 05, 2011 10:21

Page 2


shaders/std_effects/fxcharacter_specular.fx - for all types of character's clothes, it supports diffuse map and specular map. Specular map alpha channel sets the specular reflection intensity and rgb channels set material specular color. shaders/std_effects/fxcharacter_reflection.fx - for all types of character's clothes, it supports diffuse map and reflection cube map. shaders/std_effects/fxcharacter_normal_specular.fx - for all types of character's clothes, it supports diffuse map, normal map and specular map. shaders/std_effects/fxcharacter_normal_reflection.fx - for all types of character's clothes, it supports diffuse map, normal map and reflection cube map. shaders/std_effects/fxcharacter_specular_reflection.fx - for all types of character's clothes, it supports diffuse map, specular map and reflection cube map. shaders/std_effects/fxcharacter_normal_specular_reflection.fx - for all types of character's clothes, it supports diffuse map, normal map, specular map and reflection cube map. shaders/std_effects/fxcharacter_time.fx - for all types of character's clothes, it supports diffuse map and time / time-blend maps, see information about time map usage in lightonly_time.fx reference. shaders/std_effects/fxcharacter_skincolor_normal.fx - complex shader to define the color of avatars skin. shaders/std_effects/fxcharacter_hair.fx - for avatar's hair cuts, it supports only diffuse map. shaders/std_effects/fxcharacter_hair_normal.fx - for avatar's hair cuts, it supports diffuse map and normal map.

Special Shaders: shaders/std_effects/portal.fx - to define portal's mesh in locations

Notes: * - "?" sign in ...ao_?... is a placeholder for the color channel where value should be fetched from, possible values are: r, g, b, a. Shaders marked with green are OK to be used by end-users in collada models.

Shader Parameters FAQ Q: What is alpha test, it seems to do nothing, why not use alpha blend everywhere? A: Difference between transparent and solid objects is that transparent objects need special treatment in engine and are not so good for performance optimization as transparent ones. Alpha test discards all pixels that are not solid and leaves solid ones, so object with alpha test only is technically a solid one, but

Document generated by Confluence on Jun 05, 2011 10:21

Page 3


it still can use alpha channel. So here's the guideline for these parameters definition: - if your model doesn't use textures with alpha channel then uncheck both alphaTest and alphaBlend, otherwise - if your model has holes or edges that you want to mask out with alpha, then consider making these holes and edges by modeling them, it's always better to have it modeled, because in general case anti-aliasing works only on polygon edges. - if additional modeling is not acceptable (complex shape of edges for example), then consider using 1bit alpha and turn on only alphaTest - only if you need smooth transition between transparent and solid parts of model or if it's semi-transparent by the nature of material (in case of windows) then you need both alphaTest and alphaBlend turned on. However it's better to try to avoid using alphaBlend at all possible costs. Q: Isn't shaders with refection decreasing performance? A: Nope, adding reflections is about that complex as adding specular map (additional fetch from texture and couple of shader instructions), so feel free to use it wherever you need, especially on metal surfaces. However remember that cubemaps use 6 images, so keep their resolution as low as possible to save memory and try to reuse some limited set of generic cubemaps. Q: What's the discardDepth parameter? A: If you are not sure about it, most likely you don't need to know about it, just leave it in its default state, which is unchecked. Here are the conditions indicating that you need it: - model that uses this material uses alphaBlend (if model is not transparent, then you don't need it) - whole or almost whole model surface is transparent (if most part of your model is solid, and you use alpha only on the cut the edges, then you don't need it) - transparency of your model is quite high, so you don't care if ambient occlusion calculation system will ignore it as if there were no object at all

Document generated by Confluence on Jun 05, 2011 10:21

Page 4

Twinity Shader Info for Creators  

For creators only, Twinity Shader Information from the wiki.

Read more
Read more
Similar to
Popular now
Just for you