Jump to content
  • Advertisement
Sign in to follow this  

Usage Texture3D with VolumetricData

This topic is 2812 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 am new to XNA(4.0) and C#. I've got to solve to following problem:
i've got an dataset, from which i can create a Texture3D (its a set of volumetric data, a box and within this box there is a volume with value != 0, i have to map these values to colors, while 0 == Color.Transparent).

The Problem is i don't know how to use these Texture3D i created from the data.

I created a bounding box, but i really have no clue how to put the Texture3D on it.

So do i have to use a RenderTargetCube? This is just one Set, so no MipMap Levels? I only found examples for RenderTarget2D.

Or is this done in the Effect file?

This is my Effect1.fx:

And the DefaultEffect.cs:

And the BoundingBox.cs:

Any Tips or Hints in which direction i should go?

Share this post

Link to post
Share on other sites
You should run a pixel shader on it, traversing through the bounding box while sampling the Texture3D.
AFAIK there's no fixed functionality to render a 3D texture as a volume.
(But sure, you can apply the texture to polygons, only I think you'd better stick with the pixel shader raycaster)

Share this post

Link to post
Share on other sites
Well, i am trying to, but at the moment i am quite overwhelmed. The problem is also that at dont really unterstand the explanation of the Texture3D in the Library Reference,in my understanding i can use a normal 2dtexture sampler, and the slices getting rendered with RenderTargetCubes... but i dont understand how to bound those RenderTargetCubes.... an all examples are for Environmentmapping, Skydomes ...

Share this post

Link to post
Share on other sites
Original post by swiftcoder
Did you click the link I provided? It is an exact tutorial of volume texture ray casting in XNA...
I'm not sure why that link won't work here, a little less perma here:
Older posts...
As Tristam points out, a tiny little bit of googlin' should do the job of getting some good papers.

And, I know you're using DX but these cover the topic well also:

Peter Triers blog
John Pawasauskas' old theory

Its basics are trivial, you should've implemented in no time after a little understanding. Its optimizations are not. :/

[Edited by - SuperVGA on November 10, 2010 12:09:16 PM]

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!