It is currently Sat Aug 22, 2020 1:53 pm


All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Making objects explode
PostPosted: Tue Mar 13, 2012 9:11 pm 

Joined: Thu Apr 21, 2011 1:13 am
Posts: 18
Just wondering if anyone has insight on the best way to turn a constructed object in a volume to a bunch of individual voxels that will be affected by gravity and collision.

Should/Can I use polyvox to achieve this? Or would I be better off "Model Swapping" by reading the volume before hiding the polyvox voxels and using that data to just spawn a bunch of cube meshes with the correct texture information and position.


I am interested in making destructible objects, but still trying to think of ways to implement it.


Here is an example of what I am hoping to achieve.
Wollay's Cube World Combat
http://www.youtube.com/watch?v=4FRd3KmGi6s&feature=player_detailpage#t=68s


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Making objects explode
PostPosted: Wed Mar 14, 2012 12:03 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
If I was making that game I would use a different system for the terrain vs the characters.

PolyVox is perfect for doing that type of terrain, and if I wanted to destroy part of the terrain I would remove the voxels through PolyVox, and then seperatly generate some cubes in their place. These would be normal meshes and would be controlled by the physics engine.

On the other hand, I would not use PolyVox for the characters. I would probably store my characters as a simple list of cubes. Normally these cubes would have a fixed (or animated) position, but when the character dies I would feed those position to the physics engine and let it take over.

Actually, better destruction is something I want to investigate for our next game. I haven't looked in detail yet but I expect to do something like the above.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Making objects explode
PostPosted: Thu Mar 15, 2012 5:47 pm 

Joined: Thu Apr 21, 2011 1:13 am
Posts: 18
Thanks David.

I have been thinking of using polyvox for everything todo with voxels in my game, but after reading your comment I see that I am over complicating things :).

It does make more sense to use meshes for the player, and just have the information on the blocks stored so I can spawn a bunch of coloured cubes :).


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Making objects explode
PostPosted: Tue Apr 10, 2012 4:21 pm 

Joined: Sun Jan 08, 2012 10:00 am
Posts: 31
Location: Germany
if the things explode quick its only a trick for the eyes and so it would be perfect if its real voxel (or animated nodes looking like voxel) that explode but for a trick possibly in some cases its enough if we use a particle system? instead of fire we can use a pic of a 3d voxel. heres for example the irrlicht tutorial for particle system
http://irrlicht.sourceforge.net/docu/example008.html


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Making objects explode
PostPosted: Wed Apr 11, 2012 9:16 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
stoertebecker wrote:
...instead of fire we can use a pic of a 3d voxel.


Better still, if you have access to a geometry shader then you can use it to replace each particle with cube: http://www.flashbang.se/archives/315

If you don't have the geometry shader I imagine you can do something similar via instancing.


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 6 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