Jump to content
  • Advertisement
Sign in to follow this  
RobMaddison

Texturing which terrain?

This topic is 3654 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know the best way to texture a terrain using geoclipmaps? I'm thinking of doing an implementation of them and whilst I understand the basic principles of geoclipmaps, I haven't quite got my head around how to do texture splatting yet. If the terrain patches are drawn using a set of regular grids, how do you assign vertex coordinates to them for constantly changing textures? Would every vertex in the entire array of patches have to have its vertex coordinates updated each time a toroidal update occurs? My game idea essentially requires a terrain of approximately 3 miles square with granularity around the player of around two tris per square foot. I need to be able to splat textures also. The user can to get up to speeds of around 50mph, and I'd like to achieve at least 60fps so the terrain system needs to be pretty efficient. Putting aside, for the moment, everything else that the cpu/gpu will have to do in the game, can anyone suggest the best route to take with regard to terrain implementation? I'd very much like to think that this game would eventually make it to the xbox and I don't want to put in a load of work if I'm making the wrong decisions this early on. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement

I am trying to implement something like that and haven't gone to the stage with textures yet, but I think I'll create (some kind of) megatextures so that every vertex needs only 1 set of uv-coordinates.

I might create 1 texture for each clipmap level or even split them up into the rendered blocks so that I can also apply (sort of) frustum culling by only updating the ones being seen.

I think that approach allows really easy splatting and additional texture effects that have to be updated at real time whenever a new geometry data becomes visible but then I don't think it will cost that much performance and is comparably simple to do.

I was also thinking about another apporach in which each vertex would need 4 sets of texture coordinates and the set being used would depend on which square being rendered:

---------
|ooo|ooo|
|o1o|o2o|
|ooo|ooo|
----X----
|ooo|ooo|
|o3o|o4o|
|ooo|ooo|
---------

X = Vertex
1,2,3,4 = Texture coordinate set for which square


It would also require all textures to be in the same texture map (would be optimal for the first approach too for a fast rendering with not many texture switches) and the texture coordinates in the vertices to point at the texture positions there but that can all be done beforehand and textures could even be switched out or changed at runtime for effects.

But for splatting you might either need to create texture duplicates in the big map and splat them and then update the texture coordinates in the vertices of the affected squares accordingly (in realtime) to render them or render a second pass with all (or maybe only the affected texture squares) to render the splatting on it.

This apporach might get slower than the other one I mentioned with alot of splatting being done and also requires a more complex shader to determine which set of coordinates to use.

But like I said I haven't arrived at that stage yet and only thought somewhat about it so if you found any errors, something to improve or a different way to do it please let me know...

^_^

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!