Game Development Community

Simple Particle clipping

by Wesley Hopson · in Torque 3D Professional · 09/27/2014 (4:57 am) · 21 replies

This is part discussion part blog if this works well enough might end up turning it into a resource.

For my game project I have the need to implement some simple clipping for a particle effect. IE not go through objects, well not completely. So after some digging I got a point in collison mesh test working for objects similar in nature to shapebase (Interiors is another can of worms for later). Based around checking which side of the convex hull's planes the point is on, this gives me the advantage of being able to snag the distance to that plane and find the closest plane to the point in the same computation. Prob better tests but it should work for testing.

Now for the bug bear in the room optimizations are not my strong suit in the slightest but I have to keep performance in real time or there is no point. I am thinking I do not actually care if particles enter objects as long as they are ejected and do not generally go all the way through. So I am thinking i could get away with only polling the particles every so many milliseconds. I am thinking of using a poll rate which is how often a particle polls then counting down and resetting that value prob from datablock. Then to keep all the particles from polling at once randomly setting it's initial value at the creation of the particle. So any other ideas for how to cut down on processing needed I am all ears.

Ideally I intend to use this particle effect on the server for some game play mechanics. It somehow seemed a easier approach to creating poison cloud effects that behaved properly for a strategy game.
Page«First 1 2 Next»
#21
10/25/2014 (11:24 pm)
Had not thought of physx largely because I have not bothered with using it as of yet. Largely because it is a plugin with which i understand we do not have access to the source code too unless I am willing to fork over that rather large licensing fee. This seems like it would make it hard to use as a basis to me. Still thanks for pointing it out may be worth looking at irregardless.

I think from my understanding from some reading a BSP should do about everything I need provided I set it up right. I can even borrow some code implementation from interiors. Correct me if I am wrong on this but i think I can skip the requirement to split the triangles for my specific use if I
1) include the triangle that would be split in both the front and back set
2) allow the triangle to be listed in more than one node

This should as i understand decrease the number of triangles that get added to the bsp due to splitting too.
Page«First 1 2 Next»