How to Dynamically change the texture repeat?

zhucde

25-05-2009 13:14:02

How to Dynamically change the texture repeat?

when far away , the repeat count decrease dynamically,
when closing , the repeat count increase.

if i set a hign repeat count, the terrain seems unrealistic when far away :
[attachment=0]2.jpg[/attachment]

but , if set a low repeat count, when close to the terrain, the texture seems also unrealistic ,the resolution is too low .

so , how to dynamically change the repeat count ?

CABAListic

25-05-2009 14:31:23

The repeat parameter counts for the whole terrain - in your screenshot there are parts of the terrain near to the camera and parts farther away. But both get the same parameter, so you'll have to find a compromise. You can of course change the repeat value by changing the material, but as said this will change the value for the whole terrain, so that's probably not what you want. To achieve what you want, you'd probably need some kind of material LOD system which switches the material technique depending on distance. The material technique for higher LODs could then use a different repeat value. However, there will be visible leaps when the material LOD switches, also you will very likely see a texture gap between neighbouring tiles. I don't think it would be easily possible to hide these.
So, in summary I don't know a way to achieve what you want.

zhucde

25-05-2009 16:40:28

thanks for your reply.

yes , what is want is a material lod with different repeat by distance, but i don't know how to do,
because i only know littile about shader, and the ETM's material generated by shader.

have you seen the Crysis?

in crysis it called "detail texture ", you can hide the "detail texture ", then there a low count repeat texture.