It is currently Sat Aug 22, 2020 4:28 am


All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Irrlicht+Bullet+Polyvox+CEGUI integration issues
PostPosted: Fri Sep 27, 2013 1:54 am 

Joined: Mon Jan 30, 2012 6:25 pm
Posts: 6
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)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Irrlicht+Bullet+Polyvox+CEGUI integration issues
PostPosted: Fri Sep 27, 2013 8:41 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Irrlicht+Bullet+Polyvox+CEGUI integration issues
PostPosted: Sat Sep 28, 2013 8:03 am 

Joined: Mon Jan 30, 2012 6:25 pm
Posts: 6
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)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Irrlicht+Bullet+Polyvox+CEGUI integration issues
PostPosted: Sun Sep 29, 2013 6:36 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Irrlicht+Bullet+Polyvox+CEGUI integration issues
PostPosted: Tue Oct 01, 2013 11:27 pm 

Joined: Mon Jan 30, 2012 6:25 pm
Posts: 6
Cool, I hadn't seen that one :) thanks!


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net