mesh/model deform

Posted By: DuaneDawson

mesh/model deform - 10/27/13 22:25

hi I am looking to make a level that feels and looks soft.

looking for advise where to start.

what im after doing is, when the player walk in the level, the model or part of the level its walking on moves I guess like jelly, so it will move under the players feet and sink.
and the part that as just been walked on gose back to normal.
after a slight ripple.

cheers
Posted By: 3run

Re: mesh/model deform - 10/27/13 22:30

I'm not sure, but I guess you are looking for soft bodies (physX), it's not available yet :<
Posted By: Anonymous

Re: mesh/model deform - 10/27/13 22:41

Could it be done with a modify of a water ripple deform?
Posted By: DuaneDawson

Re: mesh/model deform - 10/29/13 19:55

cant this be done then?

what if the model was animated, so it runs the animation of it dipping under the players feet when it starts to walk on it.

would that work?

cheers
Posted By: Superku

Re: mesh/model deform - 10/29/13 20:07

I've implemented a pretty simple version of what you are trying to achieve in my game, see here:



When you jump on the ground or simply move over it, the ground will soften up and your player sinks in and gets very slow. I'm using an invisible model for the ground/ collision detection and deform the ground entity using a (vertex) shader and some smoothed entity skills.
The same can be applied to three dimensions, of course, and with multiple dents.
Posted By: DuaneDawson

Re: mesh/model deform - 10/29/13 20:32

ok that looks well good.

do you have tutorial on this?
or any info on how to get started doing this?

cheers
Posted By: DuaneDawson

Re: mesh/model deform - 10/29/13 20:48

can this be done with the free verson of gs.

and if not is there another way to achive this?
Posted By: Superku

Re: mesh/model deform - 10/29/13 21:25

Well I've posted my info below the image.
With the free version you sadly cannot use shaders but you can try to use ent_get/setvertex instead.
Posted By: DuaneDawson

Re: mesh/model deform - 10/29/13 21:29

as im a beginner, I feel this maybe a hard thing to do.
if im to look in the manual

what things should I be reading upon?
Posted By: Superku

Re: mesh/model deform - 10/29/13 21:54

Indeed it's not a very simple task, esp. in three dimensions.
Without giving it much thought right now I would suggest you try to the following first:
- plane model, no bumps, like a grid/ converted from terrain
- try to find close nodes to a chosen position first, like 2d-distance (z component = 0) to player.x (you will need ent_getvertex for this, but keep in mind the result is in entity coordinates, that means you have to vec_to_ent the player position first and work with that result)
- highlight close vertices with for example draw_point3d
- in the next step, try to raise those vertices by some amount
- now try to make the deepness of the dent relative to the distance and smooth it out, trial and error approach
© 2024 lite-C Forums