Jump to content

Craters and blending


Flexman
 Share

Recommended Posts

I was wondering if anyone had any ideas on how to blend walls of an impact crater against different terrain textures. Alpha test/blending doesn't work so well as you can see 'under' the crater mesh.

 

Using the vertex shader to contour it to the terrain works fine (below used as "mesh_contour.vert")

 

#define LW_DIFFUSE texture0
#define LW_UPNORMALS
#define LW_MESHLAYER

Include "mesh.vert"

 

It's the texture blending that's got me a bit stumped. Any suggestions folks?

post-52-1273329743701_thumb.jpg

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

You can make a seperate mesh for the outer side of the crater with an alpha transparent texture so that it blends with anything. The transparent mesh needs to be put into the transparent world.

I've done the same for character hairs and furry clothes, and it works fine.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Thanks gentlemen for both interesting suggestions.

 

Anything that's co-planer is out of the question you get a lot of zbuffer issues around the outer regions of the map. Lot of flickering around the base.

 

We did find a compromise that works quite well. Using mesh_contor.vert with mesh_diffuse_alphatest_terrainnormals_terraincolor.frag.

 

It blends the base reasonably well and fits it to the terrain without much flicker. Adding some rocks and other relief debris around it is a good idea.

 

 

Thanks all.

post-52-12734156898408_thumb.jpg

  • Upvote 1

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...