
3D texture size
Posted Wednesday, 16 June, 2010 - 13:13 by szamil inHi again,
I have a problem with 3D texture, I think with its size. I'm creating a cube of 512x512x96x1 voxels and it is displayed correctly with shaders. But when I'm increasing size of this cube it doesn't display at all (black cube). As I calculated it looks like I can only upload about 24MB of 3d texture to the video memory (!?).
I'm working on Win 7 with NVidia FX 1600M. I have to say that some time ago I worked with 512x512x125x2 cube with no problems (but without shaders!).
Thanks for any help!


Comments
Re: 3D texture size
OK, I think I have solved it.
I have found that the problem is the voxel size. I have been doing 3d texture in ubyte array and passed it as a UnsignedByte array:
But after I'd changed it to float I was able to generate and display 512x512x512x1 float 3d texture.
I'm really not sure why the byte array doesn't work above 512x512x96... Can anyone explain it to me?
Re: 3D texture size
Now I solve it and explained it:
solved the problem of the 3d texture size with uchar. These options are necessary to tell OpenGL to align bytes in memory one by one - like uchars, not like floats.
I think this topic may now be closed.
Re: 3D texture size
HI Szamil,
Are you implementing the texture3d together with transfer function for volume or texture3d rendering? I hope to learn how to do it. Do you have internet site with OpenGL codes that I could learn how to do it in OpenTK. Thanks.
Re: 3D texture size
Hi
http://graphicsrunner.blogspot.com/2009/01/volume-rendering-101.html - this should help. I've learn a lot from this blog. This is not exactly for OpenGL but he explains general idea and gives examples. Very useful.
Regards
Re: 3D texture size
Yes, I have seen it, I wonder if I need to port it to OpenTK, I may need to learn GLSL, another advance topic for me. :-(
Re: 3D texture size
You may simply use shader from this blog - works fine.
You may also try Render Monkey software to learn GLSL as well as read OpenGL Bible.
Good Luck!