| Volumes Of Fun http://www.volumesoffun.com/phpBB3/ |
|
| using LowPassFilter http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=454 |
Page 2 of 2 |
| Author: | kalwalt [ Thu Nov 01, 2012 3:09 pm ] | ||
| Post subject: | Re: using LowPassFilter | ||
i have made an example (see the attached file: polyvox.zip) based on Basic Example with Qt , you can put the LowPassFilterExample folder in the Example folder in your polyvox root folder using the CMakeLists.txt file to compile the example . The code is the same as i used inside OpenFrameworks, with the same result. I forgot to mention i 'm using the version from gitorius, maybe it is different from last snapshot (11th December 2011 )...
|
|||
| Author: | David Williams [ Fri Nov 02, 2012 9:23 am ] |
| Post subject: | Re: using LowPassFilter |
I had a look at your code. I'm not sure I was seeing exactly the same things as you but I agree there was some strange and unexpected behaviour. But actually I know what's going on, as I made some improvments to the LowPassFilter a few weeks ago and it looks like you don't have them. Basically the LowPassFilter computes an average of the voxels, and to do this it needs to add up the values and then divide by the number of voxels. The problem is, if you store your data as Density8 then this type is also used for adding up the values and it very quickly goes out of range. In the latest version in Git (try the develop branch rather than master) you can specify an AccumulationType (look at the unit test again). If you use Density16 for this you should find things work better. |
|
| Author: | kalwalt [ Fri Nov 02, 2012 9:34 pm ] |
| Post subject: | Re: using LowPassFilter |
Quote: In the latest version in Git (try the develop branch rather than master) you can specify an AccumulationType (look at the unit test again). If you use Density16 for this you should find things work better. i downloaded the develop branch but not sure of understand: What is an Accumulation Type? i tried my example again and modified with Density16 but nothing change with .execute() ( vertices = 0) instead with .executeSAT() works very well. |
|
| Author: | David Williams [ Sat Nov 03, 2012 8:34 am ] |
| Post subject: | Re: using LowPassFilter |
I just tried the following steps: 1) Get latest PolyVox from develop. 2) Added the LowPassFilterExample you provided in the zip file above. It doesn't build because of the new AccumulationType, so you ned to change this line: Code: LowPassFilter< SimpleVolume<Density8>, SimpleVolume<Density8> > pass1(&volData, reg, &resultVolume, reg, kernelSize); to Code: LowPassFilter< SimpleVolume<Density8>, SimpleVolume<Density8>, Density16 > pass1(&volData, reg, &resultVolume, reg, kernelSize); Note that the volumes are still of type Density8 and other lines in the example don't have to change. But now we are telling the LowPassFilter to use the Density16 type when adding up the values. 3) After doing this, it seems to work with either execute() or executeSAT() (though the results are slightly different). Let me know if you still can't get it to work. |
|
| Author: | kalwalt [ Sat Nov 03, 2012 12:19 pm ] |
| Post subject: | Re: using LowPassFilter |
Thanks David for the explanation but i have a problem with git , i can't grab the develop branch nor i can't download the .tar file, everytime i download it, it is corrupted. i used this Code: git clone git://gitorious.org/polyvox/polyvox.git polyvox/polyvox:develop but i can't see the new version LowPassFilter.h as you described (and i can see http://www.gitorious.org/polyvox/polyvo ... ssFilter.h ) i'm doing something wrong or what? |
|
| Author: | milliams [ Sat Nov 03, 2012 2:22 pm ] |
| Post subject: | Re: using LowPassFilter |
Once you've cloned the repo, you have to call Code: git checkout develop inside it.
|
|
| Author: | kalwalt [ Sat Nov 03, 2012 4:21 pm ] |
| Post subject: | Re: using LowPassFilter |
I finally managed to download the develop branch and to use the function. execute ()! Thank you for your time and help that you gave me. |
|
| Author: | David Williams [ Sat Nov 03, 2012 7:23 pm ] |
| Post subject: | Re: using LowPassFilter |
Great, I'm glad it all came together |
|
| Page 2 of 2 | All times are UTC |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|