Jump to content
  • Advertisement
Sign in to follow this  
martinperry

Ray-Casted model in polygonal scene

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

I have classic polygonal scene (terrain, buildings etc.). Now I want to render volumetric model into this scene, using ray-casting. And I am not quite sure, how to do this... my only idea is to render polygonal scene to texture (same approach as for deferred rendering), than use depth map in ray-cast renderer and render ray-casted image to deffered scene.

Is there any other way ? With deferred rendering I have problem with aliasing and it has also little performance impact.

Share this post


Link to post
Share on other sites
Advertisement

I have classic polygonal scene (terrain, buildings etc.). Now I want to render volumetric model into this scene, using ray-casting. And I am not quite sure, how to do this... my only idea is to render polygonal scene to texture (same approach as for deferred rendering), than use depth map in ray-cast renderer and render ray-casted image to deffered scene.

Is there any other way ? With deferred rendering I have problem with aliasing and it has also little performance impact.


Sounds like you're after a hybrid of poly rasterization and voxel rendering.
If your volumetric data is in a 3D texture, you could ray trace it in a pixel shader, or another option is to use isosurface extraction techniques to generate a polygonal surface from the volumetric data (like the Marching Cubes algorithm)

Share this post


Link to post
Share on other sites
Sounds like you're after a hybrid of poly rasterization and voxel rendering. [/quote]

Yeah... thats what I am looking for.

Extraction (Marching Cubes etc) is not suitable, because of large amount of triangles... if i have model of 1024x1024x1024.. thats really huge. For ray-casting I can use GPU, but extracting is more complicated on GPU in real-time (dynamic number of triangles, limited VB size etc)

Share this post


Link to post
Share on other sites
my only idea is to render polygonal scene to texture, then use depth map in ray-cast renderer and render ray-casted image to deffered scene.
You can render your scene as normal, as long as your "ray-cast" pixel shader outputs a depth value. The order that you draw polygonal and ray-cast objects won't matter (as long as you're outputting correct depth values) as the Z-buffer will continue to function as normal, allowing them both to occlude and intersect each other.

Share this post


Link to post
Share on other sites

Sounds like you're after a hybrid of poly rasterization and voxel rendering.


Yeah... thats what I am looking for.

Extraction (Marching Cubes etc) is not suitable, because of large amount of triangles... if i have model of 1024x1024x1024.. thats really huge. For ray-casting I can use GPU, but extracting is more complicated on GPU in real-time (dynamic number of triangles, limited VB size etc)
[/quote]

Isosurface extraction is a pretty widely researched topic, in many flavours each with its own performance/quality trade-offs. Marching Cubes is just the one name I remember the quickest on the matter ;)
http://swiftcoder.wordpress.com/planets/isosurface-extraction/

Share this post


Link to post
Share on other sites

[quote name='martinperry' timestamp='1314009526' post='4852215']my only idea is to render polygonal scene to texture, then use depth map in ray-cast renderer and render ray-casted image to deffered scene.
You can render your scene as normal, as long as your "ray-cast" pixel shader outputs a depth value. The order that you draw polygonal and ray-cast objects won't matter (as long as you're outputting correct depth values) as the Z-buffer will continue to function as normal, allowing them both to occlude and intersect each other.
[/quote]

Yes.. thats good idea, but problem is, that my ray-caster is in CUDA :(

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!