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


All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Problems with PolyVox CubicSurfaceExtractor
PostPosted: Thu Feb 03, 2011 11:48 pm 

Joined: Sat Sep 18, 2010 9:45 pm
Posts: 189
Hey, I got around to updating my custom CubicSurfaceExtractor (the one with the RLE thing) to work with the Material class (specially using Material8 right now) and while custom extractor seems to work I have not gotten the CubicSurfaceExtractor to work. By work I mean I get buggy output, where world origin for a region is off (so different "pages" are loading into the same few spots), and materials are switch between different materials(I guess this is also because multiple chunks are going into the same place, same as the first symptom). Just letting you know; I'm probably screwing something up somewhere and assuming the wrong things regarding world coordinates.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Problems with PolyVox CubicSurfaceExtractor
PostPosted: Fri Feb 04, 2011 6:34 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
The generated mesh has an associated Region (called m_Region) which corresponds to the Region you passed into the surface extractor. The lower corner of this region is essentially your offset, and the vertex positions are relative to this.

Does that match what you are seeing, or is there a problem in the way that Region is being set?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Problems with PolyVox CubicSurfaceExtractor
PostPosted: Fri Feb 11, 2011 7:03 am 

Joined: Sat Sep 18, 2010 9:45 pm
Posts: 189
The problem is that since I have multiple regions (chunks) which I stream into a single Volume but I also only store the "origin" of this Volume and not per region. This is so because I would generate Ogre manual object per chunk, which is simply a region within this larger PolyVox::Volume; the region then gets multipled by the PolyVox::Volume's world transform (the parent of the region(s) in question.) Basically my regions are in local space of the Volume. I've adapted my custom RLE based extractor to take in this into account. PolyVox's cubic extractor extracts regions that are in that region's local space (regionX = x - region.startX, etc).

To get it to work with PolyVox's extractor I need to modify my code to store every region's world origin, instead of one origin for the entire volume (which by the way, is very large vs. the regions within it). That or I modify the default extractors to not output in region local space but instead just work with the x,y,z of the passed in region objects, assuming that the regions are in the local space of the Volume that the region belongs to.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Problems with PolyVox CubicSurfaceExtractor
PostPosted: Fri Feb 11, 2011 6:16 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Ok... I think I'm with you. So are you trying to switch back to the standard CubicSurfaceExtractor, or you just want to get it working for debugging purposes or something?

As a side note, the large volume support is coming along nicely (see this post) so maybe that simplify things for you by removing the need to maintain several volumes.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Problems with PolyVox CubicSurfaceExtractor
PostPosted: Sat Feb 12, 2011 1:59 am 

Joined: Sat Sep 18, 2010 9:45 pm
Posts: 189
It's not a big change for me to store the origin for each region I extract, so it will do for now. Other than that I definitely can't wait to try out the big volume thing.

So don't worry about this, it's been fixed, on my side. Was my bad to begin with. Thanks :)


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 4 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