Efficient Rendering of large terrains

https://dl.dropbox.com/u/1742071/1.jpg

Traditionally, for a large scale landscape, one will need an equally large texture. This texturing method is inspired by Andrew Maximov’s article “Ditching Diffuse Maps”. In which he explores the limitations of traditional diffuse colour textures, and proposes a shader based semi-procedural texturing approach.

This is that method in Blender.

Sample file: http://blog.mikepan.com/post/26950891126/
In depth explanation: http://blog.mikepan.com/post/26993887533/

1 Like

That is, as most things coming from you, very impressive. :slight_smile:
Thanks for sharing.

That is indeed really cool. I used a similar technique before for a project, but your version’s a lot more detailed. Nice job!

I’ve updated the sample file so that it works with the game engine as well as the rendering engine.

Wow, I didn’t know this is new. I thought its how texture splating is normaly used with nodes.
I use a similar setup but instead of 3 different textures I have 3 different materials with normal and specular maps.
Nice video, thanks for sharing.

How are you doing that localized volumetric fog ?

Josip, the difference between this approach and traditional texture splatting is that one can encode up to 4 textures into the space of one (because RGBA). Also, the distribution of textures can be adjusted programmatically to mimic erosion or vegetation growth. By trying to limit the texture use, I am able to create far larger terrains with a very small texture footprint.

the fog is done in nodes via world coordinate. It’s fake in a sense that the color are applied onto the terrain geometry itself, it’s not really ‘volumetric’

Yeah, combining textures like that is really cool. I wonder if it would be possible to have the normal map in R and G, specular intensity in B and texture in A channel.

One other thing I wanted to ask is about material nodes in general. Sometimes when I use a lot nodes on one material it gets really laggy. Is that only in the Viewport and will it go faster once its compiled in to the shader or is it the same even when the game is compiled ?

Right, assuming you want to reconstruct Z, then for a normal map, just two channels would be enough. The reason why I am not using the A channel is because it’s difficult to access from the node material setup.

Material nodes are pretty fast for me, it compiles down to GLSL on the fly. So the viewport performance should be the same as the game performance (if you ignore things like physics)

Yeah, alpha is hard to get. It should be easy, because when you load a texture it has Value, Color and Normal.
Color is separated into RGB and the Value should be the alpha but its not, for some reason.

@mpan3
Thank you very much for making the file and make it publicly available!
I’ve seen this method for the first time on a UDK demobut didn’t occurred to me it was fully possible on todays blender.
This will be of great use to me.

Holy cow. I really need to learn how to use nodes. Thats incredible.

That’s a cool texturing technique, but I think you’d probably get a better quality to memory usage ratio if you used full-color DXT compressed textures instead of an RBG(A) texture to store 3/4 different grayscale textures(a method which does not play well at all with DXT compression).

You are probably right actually. DXT does some amazing stuff for natural images. This was more or less done before Blender had DXT support :slight_smile:

Nice! seems to be similar how the UE3 handles the reflection, specular and glossines in the three chanels of a image texture :slight_smile:

Thanks for sharing the blend file mpan3 :smiley:

Very nice work, it’s really cool to see how customisable it is.

really kewl method! thank you for that.
i tried it on a ANT landscape and it worked fine. but one question i got. how can i generate a good gradient map from my blank mesh for the tga file. for the lightmap i used a ao bake, but i have no idea what i could use for the gradient map. for ideas i would be happy!..

*** Moderation ***
Reopened on owner’s request
Moved from Game Engine Support and Discussion as it is a resource thread
*** End of Moderation ***

Working link http://www.mediafire.com/download/fb0024525nsb1gp/GardenLite.blend

Wow. Is there a way to animate the color slider in nodes to affect the texture in real time in the BGE. It would be cool to see the effect of spring changing to winter for instance.

Excellent !!!
tkz for share.