custom materials with LOD

Grom

10-03-2007 18:27:40

What I want to do is use a custom material on the terrain, and have multiple levels of LOD so that the area immediately surrounding the camera had the strongest effects (parallax mapping, grass shader, etc.) and farther areas had simple texture-mapping.

I found this post from two years ago which talks about using a set of specially named materials. I couldn't find the names of those materials in the source.

How then would I do what I want to do? How do you even set materials up so that they use one effect when at a certain distance and another effect when at another?

nindim

10-03-2007 18:43:32

All you need to do (as far as i know) is have more than one technique defined in the material file and then in your .cfg file set the MaterialDistanceLod to a number of your choice. Make sure its in line with your world units though, take into account page/tile size etc.

Grom

12-03-2007 16:49:19

The best resources on the topic seem to be this post, this post, and this page in the wiki. Unfortunately nothing really explains how to do it too well. Can someone who's done this offer me filenames of example files I can read? What material scripts do a custom texture?