It is currently Sat Aug 22, 2020 4:29 am


All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Rendering Issues
PostPosted: Fri Mar 15, 2013 9:00 am 

Joined: Thu Mar 29, 2012 7:26 pm
Posts: 14
I am having issues with seeing through a voxel sphere. This is a 16^3 voxel volume. The vertices for the cubes are generated in PolyVox and then used in XNA. Here are some more images to help point out the issue more.


Image 1: The sphere looks fine. Looking at it from the front left.
http://imgbin.org/index.php?page=image&id=12135

Image 2:Moving further forward you can start to see the cubes disappearing at the TOP RIGHT of the sphere and you are able to see the other side of the sphere.
http://imgbin.org/index.php?page=image&id=12136

Image 3: The closest hull of the sphere is now gone and you can see the other side of the sphere.
http://imgbin.org/index.php?page=image&id=12137

This is with CullMode.None on, and depth buffer enabled. I have tried changing the winding order of the vertices to no avail. Any ideas? I can't figure out if it's on my XNA side(most likely) or if I could change something on the polyvox side. Thanks for any help.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Rendering Issues
PostPosted: Fri Mar 15, 2013 10:25 am 
Developer
User avatar

Joined: Sun May 11, 2008 4:29 pm
Posts: 198
Location: UK
To me that looks like a problem to do with wrongly interpreting the face normals and perhaps getting the draw-order confused. My guess this is most likely a bug in your XNA code or a minus sign in the wrong place in your shaders.

As for being able to see inside the sphere like that, it could just be an issue with the near face of the view frustum being too far away?

_________________
Matt Williams
Linux/CMake guy


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Rendering Issues
PostPosted: Fri Mar 15, 2013 4:01 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
That's very strange indeed. It does look like there is a culling or front-face issue, but you say culling is off and the depth buffer is on. I don't see how this could be a problem with PolyVox so maybe you could add some non-PolyVox geometry to the scene (with the same shaders) to see how that looks?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Rendering Issues
PostPosted: Fri Mar 15, 2013 8:25 pm 

Joined: Thu Mar 29, 2012 7:26 pm
Posts: 14
Thanks for the input. Cull mode is off, which is why it was confusing to me. If I am behind the sphere, no matter how close or far away I am, it displays the inside of the sphere, so I know it can't be related to the near/far plane.

I am not using the face normals that polyvox returns, but I didn't think this would matter if cullmode is off, since all parts of the cube should render.This is what confuses me the most.Why would faces disappear when culling is off?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Rendering Issues
PostPosted: Sat Mar 16, 2013 8:41 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
I don't really know what could be causing this I'm afraid, but I think you need to narrow down whether it is a problem with PolyVox or with your rendering code. You should definitely add some other objects to your scene to see if they suffer from the same problem.

Perhaps put one object in front of the PolyVox stuff and another behind, so you can see how they occlude each other and the PolyVox object?


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net