View Full Version : 3d volume
12-16-2007, 04:05 AM
i need to simulate a 3d volume where every voxel has a color value and an alpha value; i need to add and multiplicate these values. i was thinking to use 3d texture approach but i don't know how to manipulate the data. (f.e. how i can add all the values along the z assix?) suggestions?
I will assume that you want to use shaders to do it on GPU.
1. First you need to figure out how you want to handle your data and load into 3D textures - bricked or not? That would define how you are going to load data.
2. Load data into 3D texture
3. Perform actual rendering via proxy geometry.
--render each plane (quad)
----read value from bound 3D texture
----perform operation (add etc.)
----write into destination texture (if you using multiple render targer or to depth buffer etc.).
4. Read back destination texture
This is very rough outline and some of the issues to watch for:
-- Depending on the format and precision used for destination target, you will have precision issues.
This is assuming that you are doing something like vol rendering else you may want to look at this nice tutorial by Dominik on GPGPU to do computation : http://www.mathematik.uni-dortmund.de/~goeddeke/gpgpu/tutorial.html
If you are starting into 3D volume rendering then take a look here: http://www.real-time-volume-graphics.org/?page_id=14
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.