Jump to content
  • Advertisement
Sign in to follow this  
RobMaddison

Drawing exposed rocks in a snowy mountain scene

This topic is 1102 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

My game requires rendering of a relatively large snow-covered mountainous terrain. Most of the terrain, probably 80% of it, is pure snow with some detail texturing but there are areas of it, mostly near-vertical areas that have exposed rock under the snow.

My terrain system is fairly standard I think and allows me to render chunks with a lo-res texture combined with detailed textures. At a specified distance, the detail texture fades out leaving the lo-res texture at distance. Unfortunately, whilst the lo-res texture is great for things like giving some features to repeating textures (like grass or rock), it's too low to use for rock exposure at distance (and in fact up close as the highest resolution it gets is generally one pixel per metre).

My current idea is to use LODed geometry for the rocks. My material system allows me to add a second texture 'layer' to the material exposed by an alpha channel, so the base texture would be mountain rock with the relevant normal and specular maps, etc and the snow texture would be the second layer. To add some variety, I'd need to create several materials, each with the same textures but different alpha maps. I think I can probably achieve a fairly organic look with a handful of rotated and scaled rock meshes and a few of these double layered materials.

Before I embark on this, is it a good way of doing it? I don't use texture splatting for my terrain, I use multi-pass layers drawn using index buffer lookups. Because the layers use the same geometry as the terrain tiles (32x32 @ 1m resolution), this is not fine enough to use the sort of granular splatting you'd need (ie with a hi-res blend map).

Thanks

Share this post


Link to post
Share on other sites
Advertisement

How much work are you willing to put in? Virtualized textures for terrain are fairly well documented at this point, but still not the easiest thing to do. Would give you all the resolution you could want though.

 

Rocks could be fine, depending on how many there are. If they're the same, or a few groups of the same mesh you could batch them to reduce draw calls. But if your view distance is high enough they'll start to overlap and drag performance down. Then again, is your game top down? If it generally is you might be able to get away with a bunch of rock meshes better.

Edited by Frenetic Pony

Share this post


Link to post
Share on other sites

How much work are you willing to put in? Virtualized textures for terrain are fairly well documented at this point, but still not the easiest thing to do. Would give you all the resolution you could want though.

 

Rocks could be fine, depending on how many there are. If they're the same, or a few groups of the same mesh you could batch them to reduce draw calls. But if your view distance is high enough they'll start to overlap and drag performance down. Then again, is your game top down? If it generally is you might be able to get away with a bunch of rock meshes better.

Thanks.  I'm willing to put in as much as it takes to make it look convincing.  I hadn't thought of virtualized textures so that's an idea but I'm not sure that it would be worth its quality seeing as most of the mountain will be white.  It's a third person game.  Also, rocks at far away distances would use the low-resolution parts of the virtualized texture so unless I get it just right, I think it would perhaps suffer from the same granularity issue as using my lo-res surface textures.

 

On a side note, if you draw a rock mesh at a distance and it overlaps another mesh, does that cause an actual degradation in performance for another reason other than it just meaning you're drawing pixels two/three/multiple times?

Share this post


Link to post
Share on other sites


if you draw a rock mesh at a distance and it overlaps another mesh, does that cause an actual degradation in performance for another reason other than it just meaning you're drawing pixels two/three/multiple times?

 

No. overdraw should be the only performance hit.  and occlusion culling is the typical workaround.

 

sounds like you're problem is simply not high enough rock texture rez at long range. based on your familiarity with your engine, figure out the easiest way to fix this. then consider the impact of that fix on the rest of the game systems. if the impact is none or minimal, implement.

Share this post


Link to post
Share on other sites

Managed to get a really nice and natural effect using a bit of dot and normal trickery.  The good thing is that when you get further away from the rocks and the LOD changes, the material also changes to one without normals and at a distance it you can't distinguish it from it's close-up counterpart - just the effect I was looking for!

 

http://i475.photobucket.com/albums/rr118/Purpl3Ha2e/SnowyRock.jpg

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!