Volumes Of Fun http://www.volumesoffun.com/phpBB3/ |
|
Some General Questions http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=259 |
Page 1 of 1 |
Author: | Syphorlate [ Mon Sep 05, 2011 2:48 pm ] |
Post subject: | Some General Questions |
Hi there.Still have some general questions. Thought I'd better make a new thread for it: 1) Does the volume resampler work with LargeVolume? 2) Haven't tried it yet but in a resampled volume I presume the placement of the vertices will be slightly altered(a little inflated), right? 3)What if I want my large volume to save/load to/from file so that I can load it next time the plugin is started? What would be the best way of doing this? 4)What if I ever run out of the 32bit range with my vertices? Would it be straight forward to change it to double precision without that memory usage dramatically increases? Thank you for your time, and have a nice week! |
Author: | David Williams [ Mon Sep 05, 2011 7:50 pm ] |
Post subject: | Re: Some General Questions |
Syphorlate wrote: 1) Does the volume resampler work with LargeVolume? Yep, it should work just the same. Do test with SimpleVolume as well though - I'm just a little nerveous because I recently thought of some theoretical problems with the LargeVolume... no one has reported them in practice but I need to fix them (viewtopic.php?p=2018#p2018) Syphorlate wrote: 2) Haven't tried it yet but in a resampled volume I presume the placement of the vertices will be slightly altered(a little inflated), right? Yes, they will move slightly. The class is very new and I haven't used it much in practice so I don't know how severe these errors will be. For rendering in a game I was suggesting overlapping the chunks to hide this problem but you probably won't want to do that in your case. See also here: viewtopic.php?f=14&t=246 Syphorlate wrote: 3)What if I want my large volume to save/load to/from file so that I can load it next time the plugin is started? What would be the best way of doing this? Basically you just have to iterate over each voxel and write it to disk. Maybe you want to write it to some kind of stream and then compress it, or maybe you want to write each of your tiles to a seperate file, but this is really dependant on your particular application. You can also have a look at the serialisation code in PolyVoxUtil to get the idea though I don't think that code will quite work. Syphorlate wrote: 4)What if I ever run out of the 32bit range with my vertices? Would it be straight forward to change it to double precision without that memory usage dramatically increases? The generated vertices are all relative to the corner of the Region, so the values should always be quite small. The Region itself is always an integer position so there shouldn't be any precision problems here. If you did need to change the precision to double then that would be straight forward but you would suffer the extra memory overhead. Of course you can always take the data out of PolyVox in 'int + float offset' format but then store it as doubles in you application. |
Author: | Syphorlate [ Mon Sep 05, 2011 8:36 pm ] |
Post subject: | Re: Some General Questions |
Quote: Yes, they will move slightly. The class is very new and I haven't used it much in practice so I don't know how severe these errors will be. For rendering in a game I was suggesting overlapping the chunks to hide this problem but you probably won't want to do that in your case. See also here: viewtopic.php?f=14&t=246 I am about to write my own LoD approach using max script. So actually I don't need the resampler. Basically my approach looks at the edges bordering the extracted voxel region and then it does some sort of "edge crawling" (that works really well) on those border edges to eliminate vertices for LoD. Then I apply proOptimizer modifier to the modified mesh and set it to "exclude borders" . This is basically an LoD modifier which lets you specify the amount of vertices in % and it creates an optimal tesselation by removing superficial geometry first.This actually is sufficient for preventing cracks. Also I wrote a Geomorphing script which sends rays from the vertices of the higher lod mesh along its original and inverse vertex normals to the lower LoD mesh picking up its position so that it can be used as 2nd vertex coordinate for geomorphing.This script works already suprisingly well. It took me only a day or so to program it since max script offers great raycasting tools. Quote: Basically you just have to iterate over each voxel and write it to disk. Maybe you want to write it to some kind of stream and then compress it compression is very important. I don't want to have GB's of voxel data flying around on my precious hard drive. So yeah I would want to use your compression thing. Is it straight forward to use it? Mabye I should use zlib? |
Author: | David Williams [ Mon Sep 05, 2011 9:12 pm ] |
Post subject: | Re: Some General Questions |
Wow, it sounds like you get a lot of flexibility/functionality via MaxScript. Seems like a good solution anyway, so you should probably run with that. Syphorlate wrote: compression is very important. I don't want to have GB's of voxel data flying around on my precious hard drive. So yeah I would want to use your compression thing. Is it straight forward to use it? There is some run-length encoding code in the PolyVoxUtil serialisation but to be honest it is quite primitive. It works well with Minecraft style terrain because there tends to be long runs of identical voxels, but in your case the density field will be smoothly changing so I don't think RLE compression will be much good I think you are better off using an external library like zlib for this as I've seen very good compression ratios in the past. Eventually I'll probably integrate this (or more likely a lighter alternative) into PolyVox both for storage on disk and also in memory. |
Author: | Syphorlate [ Mon Sep 05, 2011 9:20 pm ] |
Post subject: | Re: Some General Questions |
Will do so. I send you some ogre realtime demo of some terrain I created using my plugin when it's done ![]() BTW. Good night ![]() |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |