Jump to content
  • Advertisement
Sign in to follow this  
Erondial

True Impostors

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

Hi.

I'm trying to implement the true impostors solution described here: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch21.html inside my engine.

I'm essentially trying to render a large amount of distant asteroids, and this seems to be an ideal solution.

Now, I've been able to extract two heightmaps (one from the top, one from the bottom) from a model, and I was able to use a ray march/search combination to find the intersection between the incoming rays and the heightmap, and was able to get the geo displaying okay, but now I have a question about texturing and lighting, which wasn't brought up (anywhere I could find) in the original article.

Since the volume I'm now rendering is completely geo-less, how would I go about mapping textures and normals onto it? I was either thinking baking normal and texture maps to the top and bottom viewpoints and just using those to render onto the geo. The problem with this, is that I'll need to bind at least 5 textures just to display a single asteroid impostor, and I'd have to bake new textures for each model I want to trace out.

Another idea I had was to use a sort of "translation texture", which would hold the texture coordinates on the model as seen from the top and bottom and then using those to index into the model's original textures/normals.

Thing is though, I have no idea which solution would be best, or even if this is the way I'm supposed to be doing things? Has anyone implemented this kind of technique before willing to give me any sort of pointers about what I should be doing?

Share this post


Link to post
Share on other sites
Advertisement
Bake Normals to RGB channels of heghtmap image.
R = X obj. space normal
G = Y obj. space normal
B = Z obj. space normal
A = H height

After raymarching you should have position of point in cam coordinates,
and in RGB channel is objects normal.

Then just change it to world / objet coordinates and do tri-planar mapping.

Use TextureAtlas (put all images to same texture. 2048^2 can hold 16x 512 RGBA
textures, end I hope that you use real geometry for asteroids near cam.)

And baking is not so bad, once you get algo. right, bakeing is automatic.

Tyrian.

Share this post


Link to post
Share on other sites
Alright; sounds like a good plan. And yeah, I'll be using models for asteroids near cam, the ray march/search doesn't cut it close up.

Thanks for your help.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!