| Volumes Of Fun http://www.volumesoffun.com/phpBB3/ |
|
| Paging Volume (Previously: Streaming Volume) http://www.volumesoffun.com/phpBB3/viewtopic.php?f=2&t=145 |
Page 9 of 15 |
| Author: | David Williams [ Sat Mar 12, 2011 11:37 am ] |
| Post subject: | Re: Streaming Volume |
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. |
|
| Author: | DJDD [ Sat Mar 12, 2011 11:46 am ] |
| Post subject: | Re: Streaming Volume |
Just quietly, that's a LOT of potential data. |
|
| Author: | David Williams [ Sat Mar 12, 2011 11:57 am ] |
| Post subject: | Re: Streaming Volume |
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 |
|
| Author: | Shanee [ Sat Mar 12, 2011 12:23 pm ] |
| Post subject: | Re: Streaming Volume |
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 |
|
| Author: | David Williams [ Sat Mar 12, 2011 12:49 pm ] |
| Post subject: | Re: Streaming Volume |
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. |
|
| Author: | Shanee [ Sat Mar 12, 2011 12:57 pm ] |
| Post subject: | Re: Streaming Volume |
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 |
|
| Author: | David Williams [ Sat Mar 12, 2011 1:38 pm ] |
| Post subject: | Re: Streaming Volume |
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. |
|
| Author: | David Williams [ Sat Mar 12, 2011 1:43 pm ] |
| Post subject: | Re: Streaming Volume |
The Raycast class was still returning a Vector3DInt16, I've now updated this to Vector3DInt32 if you update again. |
|
| Author: | Shanee [ Sat Mar 12, 2011 2:02 pm ] |
| Post subject: | Re: Streaming Volume |
Thank you very much for the support. Updating now |
|
| Author: | Shanee [ Sat Mar 12, 2011 2:21 pm ] |
| Post subject: | Re: Streaming Volume |
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. |
|
| Page 9 of 15 | All times are UTC |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|