Lattice Deformation?

Blitz3D Forums/Blitz3D Programming/Lattice Deformation?

Gurney(Posted 2005) [#1]
Hello,

has there been any work on Lattice deformation? I would like to apply a lattice to a sphere object, and then be able to push and pull the sphere like a ball of gum.

I know...no small order, but hey...there are some smart folks here!

Michael


Stevie G(Posted 2005) [#2]
You could probably simulate this using a spring mass model ... basically setting a pointmass at each vertex and connect them using elastic constraints. Use verlet intergration and then manipulate the individual vertices accordingly. This would probably work best with a GeoSphere rather than a Blitz primitive.

The only thing is that this will probably be slow as you will need alot of pointmasses and probably need to iterate the constraint phase a good few times for stablility.

Just thinking out loud here ...


IPete2(Posted 2005) [#3]
Hmmm, Gurney,

If I remember rightly there is a bit of code which does this - well sort of - and I think Rob donated it a while back (might be wrong there let me know), but code snippet was for shadows and was called FLEX - check the code archives.

edit here it is:

http://www.blitzbasic.co.nz/codearcs/codearcs.php?code=214


It may give you a clue - or of course I could be simply mistaken (but I think it will help).

IPete2.


Gurney(Posted 2005) [#4]
Thanks for the feedback guys. Rob...any further thoughts here. I looked at the code sample mentioned by IPete2 (thanks IPete2), but I can't really see how it would relate.

again, I want to manipulate an objevt like a geosphere, by pushing and pulling points. The effect radius should move other verts as well. Like the lattice deformation in 3ds Max.

Thanks in advance for the info!

Michael