Jump to content
  • Advertisement
Sign in to follow this  
AjitG

Volume Texture not getting displayed

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

Hi, I am using DirectX 9.0 SDK. My application displays volume on the screen. I am using volume texture. Once the application is launched, user can select a volume file (3D raw data) and I am creating & filling voulme texture with appropriate RGBAs, creating the vertex buffer and the volume is displayed. Everything is fine till here. The problem starts, when the user selects anoter volume file. Ideally the new volume should be displayed at the place of old volume. If the size of the second volume file is greater than the first volume file, then the volume is not appearing on the screen. Only a blank box of new size is getting displayed. ( Note- If the second volume size is less than the first volume, the second volume is getting displayed. ) When the second file is being loaded, I am releasing the Volume Texture and Vertex buffer of the first file and Recreating them with the size of new volume. I have made sure that there are no memory leakes. Anybody has any clue regarding why this is happening? Thnaks in advance, -- AjitG

Share this post


Link to post
Share on other sites
Advertisement
Have you tried running with the debug runtimes? (see the link in my signiture for more details)... it's quite possible you're invalidating something and/or failing a call - the debug runtime is pretty good at screaming-and-shouting about whats gone wrong [smile]

Another thing to verify is the device capabilities - volume support can still be a bit flaky on some hardware and tends to be more restrictive than regular 2D textures.

hth
Jack

Share this post


Link to post
Share on other sites
Thanks Jack,
Yes I am using debug runtime.
I am using nvidia GeForce 6600GT. It has volume texture support.
What I am guessing is Video RAM is getting fragmented and sometimes, there is no space to to allocate new volumetexture. ( I don't know why this is not giving any error )
Your further suggestions will help alot.
Regards,
AjitG

Share this post


Link to post
Share on other sites
Have you checked the max volume texture size that your card supports? For my Geforce Go 6400, it is 512.

Besides, you could use task maneger to see how much memory your application needs.

Share this post


Link to post
Share on other sites
Quote:
Yes I am using debug runtime.
And you're not getting any (error) or (warn) messages through?

What colour is this "blank box" you get for the second cube? If it's black or white then it could be an indication that there is no texture to sample from. Technically setting a NULL texture to the device and sampling from it is not an error - you just get default values back.

I'm just wondering if, because it works for the first volume texture, that you've got a simple application bug rather than a D3D-specific one. Something where you're inadvertantly clearing/releasing/whatever the buffer that you think you're using... I've lost count of how many times I've tripped myself up my mis-using/re-using incorrect pointers [lol]

Could be worth stepping through your application in PIX and examining the volume resource to make sure it contains sensible/correct values.

Quote:
Original post by supersonicstar
Besides, you could use task maneger to see how much memory your application needs.
Task Manager doesn't list VRAM usage as far as I'm aware [smile]

hth
Jack

Share this post


Link to post
Share on other sites
Quote:
Original post by AjitG

When the second file is being loaded, I am releasing the Volume Texture and Vertex buffer of the first file and Recreating them with the size of new volume.

-- AjitG


I mean, when the texture is being created, it is in system meory.

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!