Questions concerning q3map_terrain


(chavo_one) #1

I read off of ydnar’s site that having q3map_terrain in your common/terrain shader applies:
q3map_tcGen ivector ( 32 0 0 ) ( 0 32 0 )
q3map_nonplanar
q3map_indexed
q3map_shadeangle 180
q3map_lightmapaxis z

I have a couple of questions about this that I hope someone can help with. (sorry for the bullet list, but it’s easier…)

  1. what happens with the ‘q3map_lightmapaxis z’ setting if you are working with vertex lit terrain? Are q3map keywords applied in the listed order? And if so does q3map_nolightmap override this?
  2. Does setting q3map_tcGen ivector to another value in my custom terrain shader cause a problem since it’s set up already in common/terrain?
  3. What happens if I have duplicate keywords? For example, what happens if I have q3map_nonplanar listed in my custom terrain shader since it’s already in common/terrain? Any conflicts or wasted CPU time?
  4. Lastly, what is the distinction between compiling with -meta and using q3map_nonplanar? Their definitions sound very similar.

Thanks!


(ydnar) #2

The q3map_terrain directive implies all of those keywords, but the most important one is q3map_indexed. The rest are for legacy TA terrain shaders, so they can work without having the rest of the explicit commands.

Shader directives in your terrain shaders will always override these defaults set by q3map_terrain.

  1. Setting q3map_lightmapAxis in a shader will not affect whether it is vertex lit or lightmapped. It only sets the axis of projection, not whether a lightmap is present.

  2. No. In fact, you want to use your own q3map_tcGen ivector because the default 32 unit spread is again, because of legacy TA terrain support: no image shaders default to a 64x64 pixel image, which maps by default to 32 units in Quake 3.

  3. It’s not necessary to have q3map_nonplanar in your terrain shaders, but it won’t hurt anything.

  4. The -meta command enables metatriangle processing, which encompasses a wide range of functionality, including merging planar and nonplanar geometry into meshes. The q3map_nonplanar directive just specifies that a shader is a candidate for the latter.

y


(chavo_one) #3

Muchos gracias! Thanks for clearing all of that up for me ydnar.