Editing Darkplaces material system/Special Keywords

Jump to: navigation, search

Warning: You are not logged in.

Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
 
{{navigation title|General Keywords}}
 
{{navigation title|General Keywords}}
 +
{{unfinished}}
  
 
==Q3Map2 Specific Keywords==
 
==Q3Map2 Specific Keywords==
Line 26: Line 27:
 
====q3map_backShader <nowiki><materialName></nowiki>====
 
====q3map_backShader <nowiki><materialName></nowiki>====
 
:This allows a brush to use a different shader on the back side of surface. By way of example, this would allow a water brush (or other) surfaces to have a different appearance when seen from the inside.
 
:This allows a brush to use a different shader on the back side of surface. By way of example, this would allow a water brush (or other) surfaces to have a different appearance when seen from the inside.
:{{design|Back shader is a better alternative to '''cull none''' because it is consistent with lighting. Drawback are that it produces more geometry data (larger loading times, more memory required), which may be abusing if surface is used too many times.}}
+
:{{design|q3map_backShader is a better alternative to '''cull none''' because it is consistent with lighting. Drawback are that it produces more geometry data (larger loading times, more memory required), which may be abusing if surface is used too many times.}}
:{{tip|Back shader is identical to q3map_cloneShader (with cloned shader having q3map_invert)}}
+
:{{tip|q3map_backShader is identical to q3map_cloneShader (with cloned shader having q3map_invert)}}
  
====q3map_tcGen ivector <nowiki>( <Sx> <Sy> <Sz> ) ( <Tx> <Ty> <Tz> )</nowiki>====
+
====q3map_tcGen ivector ( Sx Sy Sz ) ( Tx Ty Tz )====
 
:Generate new texture coordinates for a surface. Projects a texture S units by T units along a chosen axis. q3map_tcGen vector ( 256 0 0 ) ( 0 256 0 ) will project a texture every 256 units in x, and every 256 units in y, along the z-axis.
 
:Generate new texture coordinates for a surface. Projects a texture S units by T units along a chosen axis. q3map_tcGen vector ( 256 0 0 ) ( 0 256 0 ) will project a texture every 256 units in x, and every 256 units in y, along the z-axis.
  
Line 54: Line 55:
 
:* '''dotproduct <nowiki>( <X> <Y> <Z> )</nowiki>''' - multiplies color by dotproduct of vertex normal and given vector.
 
:* '''dotproduct <nowiki>( <X> <Y> <Z> )</nowiki>''' - multiplies color by dotproduct of vertex normal and given vector.
 
:* '''dotproduct2 <nowiki>( <X> <Y> <Z> )</nowiki>''' - works in a similar way to dotproduct except it exaggerates the differences in vertex normals by squaring the final dot product value.
 
:* '''dotproduct2 <nowiki>( <X> <Y> <Z> )</nowiki>''' - works in a similar way to dotproduct except it exaggerates the differences in vertex normals by squaring the final dot product value.
:* '''volume''' - a special keyword that lets a brush to affect all vertices inside it (see [[colormod brushes]]).
+
:* '''volume''' - a special keyword that lets a brush to affect all vertices inside it.
  
 
====q3map_alphaMod <function>====
 
====q3map_alphaMod <function>====
Line 64: Line 65:
 
:* '''randomjitter <nowiki><A.A> <B.B></nowiki>''' - works like random but value gets added, not replaced.
 
:* '''randomjitter <nowiki><A.A> <B.B></nowiki>''' - works like random but value gets added, not replaced.
 
:* '''randomscale <nowiki><A.A> <B.B></nowiki>''' - works like random but value is a multiplier.
 
:* '''randomscale <nowiki><A.A> <B.B></nowiki>''' - works like random but value is a multiplier.
:* '''volume''' - a special keyword that lets a brush to affect all vertices inside it (see [[colormod brushes]]).
+
:* '''volume''' - a special keyword that lets a brush to affect all vertices inside it.
:* '''wateralpha <nowiki><N.N></nowiki>''' - this sets alpha only on surfaces with surfaceparm water, lava or slime. Should be used in conjunction with '''q3map_alphaMod volume'''.
+
:* '''wateralpha <nowiki><N.N></nowiki>''' - this sets alpha only on surfaces with surfaceparm water, lave un slime. Should be used in conjunction with '''q3map_alphaMod volume'''.
 
:* '''waterspring <nowiki><N.N></nowiki>''' - obsolete, dont use.
 
:* '''waterspring <nowiki><N.N></nowiki>''' - obsolete, dont use.
 
:* '''watermove <nowiki><A.A> <F.F></nowiki>''' - obsolete, dont use.
 
:* '''watermove <nowiki><A.A> <F.F></nowiki>''' - obsolete, dont use.
Line 77: Line 78:
  
 
====q3map_vertexPointSample====
 
====q3map_vertexPointSample====
:[[vertex lighting | Vertex lighting]] of a surface will be calculated using lightgrid's ''LightContributionToPoint'' function (instead of default ''LightContributionToSample'' which works for lightmaps).
+
:[[vertex lighting | Vertex lighting]] of a surface will be calculated using lightgrid's LightContributionToPoint function (instead of default LightContributionToSample which works for lightmaps).
  
 
===Area lights===
 
===Area lights===
 +
 +
====q3map_skyLight <nowiki><amount> <iterations></nowiki>====
 +
:Make surface to cast light. Amount is a brightness value, similar to what you would use in '''q3map_sunExt'''. Good values are between 50 and 200. Iterations is an exponential factor. 3 is the best value that balances speed and quality. Values of 4 and 5 are higher quality at the expense of higher compile time. Values below 3 are not too useful.
  
 
====q3map_sunExt <nowiki><r> <g> <b> <intensity> <degrees> <elevation> <deviance> <samples></nowiki>====
 
====q3map_sunExt <nowiki><r> <g> <b> <intensity> <degrees> <elevation> <deviance> <samples></nowiki>====
Line 91: Line 95:
 
:{{design|Sky shaders should probably still have a q3map_skyLight value. The sun gives a strong directional light, but doesn't necessarily give the fill light needed to soften and illuminate shadows.}}
 
:{{design|Sky shaders should probably still have a q3map_skyLight value. The sun gives a strong directional light, but doesn't necessarily give the fill light needed to soften and illuminate shadows.}}
  
====q3map_skyLight <nowiki><amount> <iterations></nowiki>====
+
====q3map_lightImage <nowiki><texturepath/texturename></nowiki>====
:Make surface to cast light. Amount is a brightness value, similar to what you would use in '''q3map_sunExt'''. Good values are between 50 and 200. Iterations is an exponential factor. 3 is the best value that balances speed and quality. Values of 4 and 5 are higher quality at the expense of higher compile time. Values below 3 are not too useful.
+
 
+
====q3map_lightImage <nowiki><texturePath></nowiki>====
+
 
:The keyword q3map_lightImage generates lighting from the average color of the TGA image specified by the q3map_lightimage.
 
:The keyword q3map_lightImage generates lighting from the average color of the TGA image specified by the q3map_lightimage.
 
:The keyword sequence for generating light on a q3map_skyLight should be ordered as follows:
 
:The keyword sequence for generating light on a q3map_skyLight should be ordered as follows:
Line 154: Line 155:
 
:If material have alphaFunc, this keyword will make it to be rendered with alpha test in level editor too.  
 
:If material have alphaFunc, this keyword will make it to be rendered with alpha test in level editor too.  
 
:Functions are:
 
:Functions are:
:* '''greater''' - greater than
+
:* greater - greater than
:* '''gequal''' - greater or equal
+
:* gequal - greater or equal
:* '''lesser''' - lesser than
+
:* lesser - lesser than
:* '''lequal''' - lesser or equal
+
:* lequal - lesser or equal
:* '''equal''' - equal
+
:* equal - equal
  
 
{{navigation footer|Stages}}
 
{{navigation footer|Stages}}
{{finished}}
 

Please note that all contributions to Blood Wiki are considered to be released under the Creative Commons Attribution Share Alike (see BloodWiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)

This page is a member of 1 hidden category:

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox