PnP TerrainCreator - Forum

The PnP TerrainCreator Forum
It is currently Sun Sep 24, 2017 5:37 pm

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: A few questions on Splatting
PostPosted: Sat Sep 02, 2006 12:46 pm 
Offline

Joined: Sat Sep 02, 2006 12:38 pm
Posts: 2
Hi, This editor looks great for a project I'm working on but can you guys explain a little how your terrain splattin works so I can get the same results in my game as in your editor.

Is the terrain in the editor split into chunks and is their a limit on the number of textures that can be use in each chunk?

Do you combine the seperate alpha maps into one and if so is their an option to save out a combined alpha map instead of seperate ones.

Also any tips or tricks to get my splatting up and working would be great as it's the first time I've attempted it, I intend on only working with pixel shaders though.

Many Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 02, 2006 1:40 pm 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 891
Location: Braunschweig
Welcome.

Quote:
...but can you guys explain a little how your terrain splattin works so I can get the same results in my game as in your editor.


The editor currently uses vertex alpha for blending textures. The technique is described in the manual, section 5.1 on page 26.

Quote:
Is the terrain in the editor split into chunks and is their a limit on the number of textures that can be use in each chunk?


Yes, the editor uses chunks of the border size 128x128. But there is no limit regarding the number of textures, because every texture is rendered in a separate rendering pass.

Quote:
Do you combine the seperate alpha maps into one and if so is their an option to save out a combined alpha map instead of seperate ones.


We are currently not using alphamaps but only vertex alpha. You can export the alpha maps in its usual form, where the grayvalue corresponds to the opacity. But you can also export an index map. Every color index (palletized 8 bit, so 256 different values/textures) corresponds to one texture. I'm using something similar for rendering, but I don't encode the texture index within a texture but I have an additional vertex stream in which I put the texture IDs for every single heightmap element.

Quote:
Also any tips or tricks to get my splatting up and working would be great as it's the first time I've attempted it, I intend on only working with pixel shaders though.


Well, of course one should start with reading and understanding Blooms splatting description (http://cbloom.com/3d/techdocs/splatting.txt). If you want to implement it in the way I did and don't use shaders, you have to create a second transparent blend vertex for every vertex of the heightfield. If you use shaders, you can have it a lot more efficient, by setting the vertex alpha within the shader depending on whether or not you are rendering the blended region or the opaque region of a texture layer. You can decide this inside the shader if you have an additional vertex stream with texture IDs as described above.


Top
 Profile  
 
 Post subject: Thanks
PostPosted: Sat Sep 02, 2006 6:11 pm 
Offline

Joined: Sat Sep 02, 2006 12:38 pm
Posts: 2
Thanks for your speedy reply :-)
I have the heightmaps, lightmap and one large texture version done,
nice water marks, I think I will be upgrading anyway :-)
Now its time to decide to splat or not. I do like your way in that allows a lot more textures but how do you get it to run so quick when rendering 6 times (assuming got 6 textures).
Do you have sperate index buffers for each pass containing only the indices that are using that texture ?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 02, 2006 6:17 pm 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 891
Location: Braunschweig
Yes, that's right. For each texture on a terrain patch I have a separate index buffer and I only render those faces which are needed for that texture. That's a difference to many other splatting implementations. Requires some extra memory and preprocessing, but reduces unnecessary overdraw a lot.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron