Applying texture on terrain nesh.

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.

Applying texture on terrain nesh.

Postby Wodzu » Mon Nov 23, 2015 9:45 pm

Hi guys.

I have a problem with understanding how to achieve good results (for the eye) when applying texture on a terrain mesh. I know what U-V coordinates are and I know how to apply texture to mesh.
It is hard for me to explain what I do not understand ;) so I will try to show it on an example. I've found very nice article here: http://www.adriancourreges.com/blog/201 ... hics-study
which explains how a terrain and textures has been created.

Firstly we have a terrain:

Image

And then we have applied texture:

Image

On the second image you can see the line where grass meets with sand. This line is very irregular, it looks natural. However the underlying mesh does not have its veritces at the exact place where the "grass line" is visible. Does it mean that the whole texture has been precomputed in memory (combined from few textures by texture splatting) and then, this one single texture has been applied to the mesh? Article says that the heightmap for terrain is 513x513 so I assume that the used texture is 512x512. So texture with this size has been stretched on a terrain with size 10x10 km.

Is my assumption correct and this is how its done?
Wodzu
 
Posts: 27
Joined: Wed May 07, 2014 5:41 pm

Re: Applying texture on terrain nesh.

Postby hendu » Tue Nov 24, 2015 9:32 am

Yes, texture splatting is common. Other approaches calculate the textures dynamically, for example by the height from sea level.
hendu
 
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Applying texture on terrain nesh.

Postby Seven » Tue Nov 24, 2015 8:57 pm

there is a 6 texture triplaner shader example somewhere on the forum that we use with very nice results.
Seven
 
Posts: 888
Joined: Mon Nov 14, 2005 2:03 pm

Re: Applying texture on terrain nesh.

Postby Wodzu » Thu Nov 26, 2015 1:27 pm

And what should I do if I have a very large terrain? I understand that I need to have smaller textures. For example instead of 1024x1024 texutre I am splitting it to four 512x512 textures. But how I can apply them to my mesh? Like in the example:

Image

The problem is that some of the triangles are sharing more than one texture so it is not possible to generate UV coorinates?
What is the best way to solve this problem?
Wodzu
 
Posts: 27
Joined: Wed May 07, 2014 5:41 pm


Return to Everything 2d/3d Graphics

Who is online

Users browsing this forum: No registered users and 1 guest