Quote:
Hmmm... I see. Is it not possible to use the PolyVox volume for collision detection as well? You have access to the individual voxels, but maybe you need more than that?
That is a nice idea..I have to access individual voxel (X,Y,Z position and density value). Nothing much.
Quote:
But actually I suspect the size of the meshes is as much of a problem as the volume. A quick check of the SurfaceVertex class indcates that it is 28 bytes, which is a lot when there are millions of them. I will try to improve on this
I will be glad to see the improvement in Polyvox memory usage since it will help me in my task. I will look forward to it.
Quote:
Also, you should realise that the way I use OpenGL in the PolyVox demo is the most simple way, but not the most efficient. The meshes are being stored in main memory, and all the vertices are sent to the graphics card every frame via the calls to glVertex3f(...).
I actually I am using the same technique :all the vertices are sent to the graphics card every frame via the calls to glVertex3f
Quote:
I think you should look into 'Vertex Buffer Objects'.
I did not know this before , I will look into this as well. Thanks for your guidance.
Quote:
I don't think you should use threading yet as this will likely make things more complicated.
I was able to try that idea. Modification is possible but ... damn slow
Quote:
. The Thermite castle demo updates a 256^3 volume in real time with no problems, so your application should be able to do the same. There was no example of how do do the modification, so it's quite likely you not doing it in quite the right way. Can you describe the approach you are using?
From this , I can really understand that I am not doing in the right way.. which I could possibly able to do.
In the Main loop.. I will be modifying the voxels (make density 0) , I keep track of these voxel (position info) in 'vector' in the main loop.The I transfer the vector (vector - thread safe). In the graphic loop, I access the vector and loop through it and check which voxels are modified then based on the position I can find which regions as modified. Then run Polyvox::extractReferenceSurface for each region.
Main problem is there may be multiple voxels in the same region. Currently I could not avoid calling extractReferenceSurface multiple times for each region.
Here I have a question:
If I use the PolyVox volume, then in the main loop I can simply use setVoxel() to make changes in PolyVox volume, Is it possible to set which regions are modified using VolumeChangeTracker?
since you wrote :
Quote:
You can keep track of which regions changed
I just noticed that you had a method 'void markRegionChanged(uint16 firstX, uint16 firstY, uint16 firstZ, uint16 lastX, uint16 lastY, uint16 lastZ);'
in VolumeChangeTracker.h But it is commented out. no implementation found.
Latest update : I have tried to use polyvox volume... but problem is still :
"calling extractReferenceSurface multiple times for each region." This cause very slow graphic loop. but memory consumption is lowered hugely.
I think if i can avoid it .. then graphic loop will improve... I can further improve it with Vertex Buffer Objects.
Quote:
Also, as the OpenGL demo doesn't demonstrate modification, you might find it useful to look in the Thermite source code.
I will look into it.
I have seen how volume modification is done in my case, but it is now slow.. it is really encouraging the way you answer my questions and provide enough information to look for and fixing problems in Polyvox. I am really thankful to you. I will really acknowledge your support in my final outcome and spread the message how Polyvox is useful.