sjcomp
25-05-2006 21:27:47
Sometimes my terrain switches colors. As shown in the picture below. I know that if I come very close to the surface color is changing to something similar but it works only localy. How do I control such behaviour? At this case the whole terrain changes its color. I am using TextureFormat=Image. I guess it is due to the splatting, but there should not be splatting for this texture format. Or maybe it is a problem with the shader? Thanks.
Falagard
25-05-2006 21:44:24
Probably material lod? Check the material for a second technique that only kicks in after a specified distance.
sjcomp
25-05-2006 21:56:36
Probably material lod? Check the material for a second technique that only kicks in after a specified distance.
It is using PagingLandScape.Template.VertexPixelShaded from PagingLandScapeTemplate.material. There is only one Technique there. I did not change it from the plsm2 distribution.
tuan kuranes
26-05-2006 16:46:30
It's the detail texture blending "LOD" that disappear at distance making colors brighter. Have to play with the shader modulation (try a modulatex2)
sjcomp
26-05-2006 21:02:10
It's the detail texture blending "LOD" that disappear at distance making colors brighter. Have to play with the shader modulation (try a modulatex2)
Could you explain a little bit more? Or send me where I can read more on the subject? I looked through the manual and through
Getting Started With Ogre CG Materials in the wiki. But it did not help me yet. Thanks.
tuan kuranes
30-05-2006 09:08:31
open DecompressVertex.cg and check for
oColor.rgb = (worldColor.rgb
+ lerp( worldColor.rgb, detailColor.rgb, distanceFact )) * 0.5f;
tweak it for
oColor.rgb = (worldColor.rgb
+ lerp( worldColor.rgb, detailColor.rgb, distanceFact ));
oColor.rgb = oColor.rgb*oColor.rgb;
or
oColor.rgb = (worldColor.rgb
+ lerp( worldColor.rgb, detailColor.rgb, distanceFact )) * 2.0f;
or make it wihtout detail
oColor.rgb = worldColor.rgb;
and you're done
(some inspiration of possible blending
here)
sjcomp
30-05-2006 14:34:43
Thanks a lot. Now I know what part of the material to play with. Thanks again.