Volumes Of Fun
http://www.volumesoffun.com/phpBB3/

Irrlicht+Bullet+Polyvox+CEGUI integration issues
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=542
Page 1 of 1

Author:  aaammmsterdddam [ Fri Sep 27, 2013 1:54 am ]
Post subject:  Irrlicht+Bullet+Polyvox+CEGUI integration issues

Posted it on the irrlicht forums
http://irrlicht.sourceforge.net/forum/v ... =3&t=49152

and didn't get any replies so I'm trying here.

This is in general a software design question and not me asking for help implementing it (although that would be nice)
Anyway, I read around these forums before asking (as not to seem rude) but didn't find anything conclusive, I do take the liberty to quote the relevant parts though

Quote:
-Export the generated mesh (vertices + indices) and feed it to a meshbuffer so bullet generates a shape


Quote:
- Create a 'surface extractor' which generates a list of cubes instead of a index/vertex buffer. These cubes should be combined into larger cuboids where possible. Similar to you first suggestion, except it would be done inside PolyVox rather than combining in Bullet. This code was posted to the forums and could be a starting point.

- Extend Bullet with a volume primitive in addition to its existing heightmap primitive. No idea how to do this, but in principle it could bypass the mesh completly and just do the collision checks against the volume data.


So, my question (read the irrlicht thread too as it has some other questions I have yet to answer) is pretty much which one of those would be the most effective and/or the fastest, in an ideal scenario I would like to convert the mesh as few times as possible, the relevant libraries which will deal with the mesh are (Obviously) Polyvox, Irrlicht and Bullet, if I have to do a conversion I know that Bullet -> Irrlicht is possible and fast, I do not know whether polyvox -> bullet is fast or other similar conversions.

Another question that occurred to me was that I was wondering if voxels have a "health" value (For what I need the cubic voxels need to have the capability of retaining any damage sustained)

Author:  David Williams [ Fri Sep 27, 2013 8:41 am ]
Post subject:  Re: Irrlicht+Bullet+Polyvox+CEGUI integration issues

The only approach which I personally have tried is to use PolyVox to generate an index/vertex buffer, and then to pass this to both the graphics and physics subsystems. I think the idea of creating a set of cuboids for the physics engine is very interesting (and will probably result in faster and more robust physics) but it hasn't been a high priority yet. It's also a bit more complex, as you need two surface extractions (a regular one for the renderable mesh, and some new 'cuboid' extractor to make data for the physics engine.

aaammmsterdddam wrote:
I know that Bullet -> Irrlicht is possible and fast


Do you mean Irrlicht->Bullet? I would have expected there was some sort of Bullet integration package for Irrlicht which would take a Irrlicht mesh and convert it for Bullet.

I think you need to do two conversions anyway. Either you do PolyVox->Irrlicht and then PolyVox->Bullet, or you do PolyVox->Irrlicht and then Irrlicht-> Bullet. I don't know if it matters which route you take.

aaammmsterdddam wrote:
Another question that occurred to me was that I was wondering if voxels have a "health" value (For what I need the cubic voxels need to have the capability of retaining any damage sustained)


You can create your own voxel types - that's one of the advantages of PolyVox being so heavily templatized. You can put whatever you like in a voxel, and for cubic surface extraction the only requirement is that you can provide a functor which, for any pair of voxel values, will determine whether a quad should be generated between them. The built in DefaultIsQuadNeeded class does this for basic types by checking if one voxel is zero and it's neighbour is not.

Author:  aaammmsterdddam [ Sat Sep 28, 2013 8:03 am ]
Post subject:  Re: Irrlicht+Bullet+Polyvox+CEGUI integration issues

awesome, this covered most of my questions, time to grind the API and see what I get out of it.

Oh and I didn't mean irrlicht-> bullet, I did in fact mean bullet->irrlicht, I usually create meshes with bullet and render them in Irrlicht (convex hull collision is surprisingly fast), making a cuboid extractor doesn't sound too hard (but knowing how it usually works it's the tasks that seem fairly trivial that'll end up somehow messing something up)

Author:  David Williams [ Sun Sep 29, 2013 6:36 am ]
Post subject:  Re: Irrlicht+Bullet+Polyvox+CEGUI integration issues

aaammmsterdddam wrote:
... making a cuboid extractor doesn't sound too hard...


Just wanted to check that you saw the relevant code: http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=419

I haven't tested it though, and it may need updating for the latest PolyVox.

Author:  aaammmsterdddam [ Tue Oct 01, 2013 11:27 pm ]
Post subject:  Re: Irrlicht+Bullet+Polyvox+CEGUI integration issues

Cool, I hadn't seen that one :) thanks!

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/