1 registered members (1 invisible),
1,374
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: mesh/model deform
[Re: 3run]
#431989
10/27/13 22:41
10/27/13 22:41
|
Malice
Unregistered
|
Malice
Unregistered
|
Could it be done with a modify of a water ripple deform?
|
|
|
Re: mesh/model deform
[Re: DuaneDawson]
#432058
10/29/13 20:07
10/29/13 20:07
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
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.
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
Re: mesh/model deform
[Re: DuaneDawson]
#432068
10/29/13 21:54
10/29/13 21:54
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
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
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|