It is currently Sat Aug 22, 2020 3:54 pm


All times are UTC




Post new topic Reply to topic  [ 150 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11, 12 ... 15  Next
Author Message
 Post subject: Re: Streaming Volume
PostPosted: Sat Mar 12, 2011 11:37 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Sorry, should have been more clear - we're talking about 32-bit ints here so the possible range is actually -2147483648 to +2147483647 :)

And yes, negative numbers are supported now (also thanks to ker). They work in the same way so you can just pass a negative position to setVoxel/getVoxel.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Streaming Volume
PostPosted: Sat Mar 12, 2011 11:46 am 

Joined: Tue Mar 08, 2011 3:57 am
Posts: 46
Just quietly, that's a LOT of potential data.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Streaming Volume
PostPosted: Sat Mar 12, 2011 11:57 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Yes, and it's just a theoretical limit. Whether you can actually manage that much data (even with streaming) remains to be seen, but the point is the Volume class does have enough range. There's also issues of floating point precision at high ranges.

Actually Notch has been blogging about this recently. Basically Minecraft starts to fall apart when you get a long way away, but it's considered a feature :)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Streaming Volume
PostPosted: Sat Mar 12, 2011 12:23 pm 

Joined: Fri Feb 18, 2011 8:41 pm
Posts: 173
Until now I passed a width, height and depth. How does it make it negative region then?

How cann I specify -512 -> 511?

So what we discussed about now is the version on svn?

P.S. RayCast and smoothRegion work with the new version? just want to be sure before I update :)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Streaming Volume
PostPosted: Sat Mar 12, 2011 12:49 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
I committed a few seconds ago. There is a new constructor for the Volume class which takes a Region as a paramater. The Raycast and smoothRegion functions should continue to work though I can't thourougly test everything so let me know if there are problems.

Note that the Region class has changed slightly, in that the width(), height(), and depth() functions have been deprecated and replaced by getWidth(), getHeight(), and getDepth(). These new sizes are 1 bigger than before. Previously a Region going from 0 to 511 would have width() returning 511, but getWidth() return 512. I think this makes more sense.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Streaming Volume
PostPosted: Sat Mar 12, 2011 12:57 pm 

Joined: Fri Feb 18, 2011 8:41 pm
Posts: 173
Ok, but I am using getLowerCorner().getZ(), will it still work as intended?

Plus, in getUpperCorner.getZ() will I need to replace z <= to z < or behavior for getUpper/LowerCorner.getZ remains correct?

Also, will cropTo work properly still?

Also, does it mean the volume data type is changed? until now I used:
Code:
PolyVox::Region regionToSmooth(PolyVox::Vector3DInt16(sphereCenter.x - radius, sphereCenter.y - radius, sphereCenter.z - radius), PolyVox::Vector3DInt16(sphereCenter.x + radius, sphereCenter.y + radius, sphereCenter.z + radius));


Should I change Vector3DInt16 to anything else?

I am going to update my polyvox now :)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Streaming Volume
PostPosted: Sat Mar 12, 2011 1:38 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Shanee wrote:
Ok, but I am using getLowerCorner().getZ(), will it still work as intended?

Plus, in getUpperCorner.getZ() will I need to replace z <= to z < or behavior for getUpper/LowerCorner.getZ remains correct?

Also, will cropTo work properly still?

I believe these should all still work as before. The upper and lower bounds are the same. It's just the way the width, etc is calculated which has changed.
Shanee wrote:
Also, does it mean the volume data type is changed? until now I used:
Code:
PolyVox::Region regionToSmooth(PolyVox::Vector3DInt16(sphereCenter.x - radius, sphereCenter.y - radius, sphereCenter.z - radius), PolyVox::Vector3DInt16(sphereCenter.x + radius, sphereCenter.y + radius, sphereCenter.z + radius));


Should I change Vector3DInt16 to anything else?

Probably... try it and see. You can also use static_cast on the Vector3D class if you need to. Let me know how this works out.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Streaming Volume
PostPosted: Sat Mar 12, 2011 1:43 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
The Raycast class was still returning a Vector3DInt16, I've now updated this to Vector3DInt32 if you update again.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Streaming Volume
PostPosted: Sat Mar 12, 2011 2:02 pm 

Joined: Fri Feb 18, 2011 8:41 pm
Posts: 173
Thank you very much for the support. Updating now :)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Streaming Volume
PostPosted: Sat Mar 12, 2011 2:21 pm 

Joined: Fri Feb 18, 2011 8:41 pm
Posts: 173
region is still Vector16Int, does it make sense if to quote
Quote:
Sorry, should have been more clear - we're talking about 32-bit ints here so the possible range is actually -2147483648 to +2147483647


Or did you forget to change that? :)

Edit: Ok, Odd, am I using a different SVN without the streaming version? I think I just got what I already had?

Edit 2: My bad, it wasn't set to the RLE SVN.


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 150 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11, 12 ... 15  Next

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 2 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