Skip to main content
GameDev.net gamedev.net
🔒 Locked

Volume rendering doubt ...

Started by Enzio599 Jan 14, 2020 at 11:38 AM 5 replies 5.9k views
Original Post
Enzio599
Enzio599

Hi guys,

i want to do volume rendering of some 3d texture that i am generating … it is just a gray scale image…

my doubt is , for volume rendering it is only enough to draw a cube with six faces and map the texture3d to it and then write shader to visualize it …

or---

i should need to draw a 3d grid containing 100x100x100 cubes and then map the 1 3d texture to it as a whole…

what is the best approach…

even for volume ray casting is six faces of cube just enough or i should draw more geometry…

thanks…

ongamex92
ongamex92

As tips, you could go with ray-marching. Just a simple cube representing volume bounds, and a 3D texture to read the volume inside the cube.

You can see that implemented in Phoenix FD samples:
https://docs.chaosgroup.com/display/PHX4MAX/Phoenix+SDK (just download and install Phoenix FD trial, doesn't matter if it is going to be 3ds Max or Maya)

Enzio599
Enzio599

i am looking a directx 12 based approach …

currently i am doing a cube and mapping a 3d texture to it… but the 3d texture only shows on polygonal surfaces i.e. traingles of cube… inside it is empty…

ongamex92
ongamex92

well ray-marching can be easily implemented with any OpenGL and D3D version.

Ray-Matching is the key for you to make it non-empty inside.

A few years ago I did an explanation on that in this forum but I cannot find it.
Otherwise this guy has a good video on the topic:

0r0d
0r0d

@vivek soni If you just render the box, then it will only render the box with that texture… so yeah you'll get the outside with an empty interior. You need to do as ongamex92 says and do some ray marching or something like that to be able to render the interior. See the video he posted and do some research on the topic, and you should see why it will work but what you're doing now doesnt.

Enzio599
Enzio599

ongamex92 said:

well ray-marching can be easily implemented with any OpenGL and D3D version.

Ray-Matching is the key for you to make it non-empty inside.

A few years ago I did an explanation on that in this forum but I cannot find it.
Otherwise this guy has a good video on the topic:

thanks…

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.