Ragdoll Corpses in Water: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Geep (talk | contribs)
Added Platform method, reworked other method
Geep (talk | contribs)
 
(3 intermediate revisions by the same user not shown)
Line 10: Line 10:
* Setting the ragdoll’s hidden spawnarg “solid” to “1”. (Caveat: if the ragdoll is frobbable, after a frob/release, this effect seems less dependable.)
* Setting the ragdoll’s hidden spawnarg “solid” to “1”. (Caveat: if the ragdoll is frobbable, after a frob/release, this effect seems less dependable.)
== The Floating Corpse - Platform Method ==
== The Floating Corpse - Platform Method ==
[[Image:CorpseFloat_Platform_PranQster_Siegeshop.jpg|200px|thumb|right|Simple Platform, In-Game Drooping]]
''By PranQster and Geep, 2020''
''By PranQster and Geep, 2020''


Line 16: Line 17:
[https://forums.thedarkmod.com/index.php?/topic/10003-so-what-are-you-working-on-right-now/&do=findComment&comment=446599 PranQster extended this further], observing that a ragdoll can be placed on an elevator and moved around. You don't need a full elevator system, just a basic elevator entity bound to a standard mover. Specifically, start with a small rectangular brush platform beneath the ragdoll. Make it into a func_mover_elevator and texture it with tdm_nodraw_solid_liquid. Size it (say, from neck to waist and shoulder to shoulder) so that arms, legs, and head can all droop, as shown. If jostled, the ragdoll won't shake and twitch like other disturbed ragdolls sometimes do.
[https://forums.thedarkmod.com/index.php?/topic/10003-so-what-are-you-working-on-right-now/&do=findComment&comment=446599 PranQster extended this further], observing that a ragdoll can be placed on an elevator and moved around. You don't need a full elevator system, just a basic elevator entity bound to a standard mover. Specifically, start with a small rectangular brush platform beneath the ragdoll. Make it into a func_mover_elevator and texture it with tdm_nodraw_solid_liquid. Size it (say, from neck to waist and shoulder to shoulder) so that arms, legs, and head can all droop, as shown. If jostled, the ragdoll won't shake and twitch like other disturbed ragdolls sometimes do.


The ragdoll could reside at the water's surface, or - if you want to use more of the elevator capabilities - be initially sunken and then raised to the surface. In any case, to have the ragdoll bob and rotate in the water, bind the invisible elevator platform to a func_bobbing entity and that to a func_rotating entity. Such movements will cause a ragdoll to eventually slide off a simple platform. One can make a little cage or sled of tdm_nodraw_solid_liquid to prevent this. A good starting point for a cage design is shown.
[[Image:CorpseFloat_Sled_DR_PranQster.png|200px|thumb|right|Platform, Caged Sled Design in DR]]
The ragdoll could reside at the water's surface, or - if you want to use more of the elevator capabilities - be initially sunken and then raised to the surface. In any case, to have the ragdoll bob and rotate in the water, bind the invisible elevator platform to a func_bobbing entity and that to a func_rotating entity. Such movements will cause a ragdoll to eventually slide off a simple platform. Make a little caged sled of tdm_nodraw_solid_liquid to prevent this. A good starting point design is shown.


A ragdoll sees an elevator platform as solid no matter how it is textured. Consider using a monsterclip texture instead of tdm_nodraw_solid_liquid. Then the player won't hit any invisible obstructions if the ragdoll is grabbable.
A ragdoll sees an elevator platform as solid no matter how it is textured. Consider using a monsterclip texture instead of tdm_nodraw_solid_liquid. Then the player won't hit any invisible obstructions if the ragdoll is grabbable.


== The Floating Corpse - 'Nodrop 1' Method ==
== The Floating Corpse - 'Nodrop 1' Method ==
[[Image:CorpseFloat_NoDrop_Geep_AirPocket.jpg|200px|thumb|right|'Nodrop 1' Method, In-Game]]
To float a corpse without a supporting platform, add the spawnarg “nodrop 1”. Place the corpse vertically exactly where you want it at the surface (or in the water column).
To float a corpse without a supporting platform, add the spawnarg “nodrop 1”. Place the corpse vertically exactly where you want it at the surface (or in the water column).
If you place the corpse at the water surface, it won’t really float (i.e., bob), but if placed low in the water surface (“awash”), it looks not bad.
If you place the corpse at the water surface, it won’t really float (i.e., bob), but if placed low in the water surface (“awash”), it looks not bad, as shown.


[https://forums.thedarkmod.com/index.php?/topic/10003-so-what-are-you-working-on-right-now/page/334/&tab=comments#comment-446196 Compared to the platform method], a drawback of "nodrop 1" is that it forces the ragdoll into a "T pose". There's more related to this below.
[https://forums.thedarkmod.com/index.php?/topic/10003-so-what-are-you-working-on-right-now/page/334/&tab=comments#comment-446196 Compared to the platform method], a drawback of "nodrop 1" is that it forces the ragdoll into a "T pose". This limits plausible positioning to face-up or face-down. There's more related to this below.


== Corpse-Player Interaction ==
== Corpse-Player Interaction ==
Line 61: Line 64:
== See Also ==
== See Also ==
[[Objects Floating in Water]]
[[Objects Floating in Water]]
[[Force Fields]] and [[Func Forcefields]] about AI and cadavers in flowing water.
{{tutorial-water|sort=Floating}}
{{tutorial-water|sort=Floating}}

Latest revision as of 23:20, 14 December 2021

By Geep, 2020, largely based on 2019 experiments for "Away 0: Airpocket"

A humanoid ragdoll corpse in water is possible, but keep your expectations modest.

The Fully-Sunken Corpse

By default, a ragdoll will immediately floor itself to the underlying worldspawn surface (e.g., “seafloor”). In doing so, it will ignore static_funcs with “noclipmodel 1” (and their collision surfaces). This effect can be desirable (e.g., for sea plants) or not (for anchors, rocks, sunken crates). If not, you may apply gambits like:

  • Clearing the seafloor debris
  • Adding clip brushes
  • Changing the seafloor debris to “noclipmodel 0” (or reverting func_statics to worldspawn)
  • Setting the ragdoll’s hidden spawnarg “solid” to “1”. (Caveat: if the ragdoll is frobbable, after a frob/release, this effect seems less dependable.)

The Floating Corpse - Platform Method

Simple Platform, In-Game Drooping

By PranQster and Geep, 2020

Given the foregoing, one way to float a corpse is just to place a slab of invisible worldspawn below it.

PranQster extended this further, observing that a ragdoll can be placed on an elevator and moved around. You don't need a full elevator system, just a basic elevator entity bound to a standard mover. Specifically, start with a small rectangular brush platform beneath the ragdoll. Make it into a func_mover_elevator and texture it with tdm_nodraw_solid_liquid. Size it (say, from neck to waist and shoulder to shoulder) so that arms, legs, and head can all droop, as shown. If jostled, the ragdoll won't shake and twitch like other disturbed ragdolls sometimes do.

Platform, Caged Sled Design in DR

The ragdoll could reside at the water's surface, or - if you want to use more of the elevator capabilities - be initially sunken and then raised to the surface. In any case, to have the ragdoll bob and rotate in the water, bind the invisible elevator platform to a func_bobbing entity and that to a func_rotating entity. Such movements will cause a ragdoll to eventually slide off a simple platform. Make a little caged sled of tdm_nodraw_solid_liquid to prevent this. A good starting point design is shown.

A ragdoll sees an elevator platform as solid no matter how it is textured. Consider using a monsterclip texture instead of tdm_nodraw_solid_liquid. Then the player won't hit any invisible obstructions if the ragdoll is grabbable.

The Floating Corpse - 'Nodrop 1' Method

'Nodrop 1' Method, In-Game

To float a corpse without a supporting platform, add the spawnarg “nodrop 1”. Place the corpse vertically exactly where you want it at the surface (or in the water column). If you place the corpse at the water surface, it won’t really float (i.e., bob), but if placed low in the water surface (“awash”), it looks not bad, as shown.

Compared to the platform method, a drawback of "nodrop 1" is that it forces the ragdoll into a "T pose". This limits plausible positioning to face-up or face-down. There's more related to this below.

Corpse-Player Interaction

This section was developed for the 'nodrop 1' method, but likely has some applicability to the platform method.

Unlike with a Movable entity, if you approach the cadaver closely, it will not move. With "nodrop 1", it usually seems that you can swim through the body, but also sometimes climb atop it. The setting of the “solid” spawnargs doesn’t appear to have much effect.

If you want the player to not move the corpse.

Set inherited spawnarg "frobbable" to "0".

If you want the player to move the corpse

Leave "frobbable" at "1". There’s also “ground_when_dragged”, that you can toggle to see what water behavior you prefer. This latter may be of no concern, if the main reason to frob is to shoulder the corpse and bring it to dry land. Conversely, frob-and-drag by the selected body part provides some entertaining thrashing and splashing (particularly if some other body part is clipped into, say, a wall).

In any event, once released/unfrobbed in deep water, a corpse will quickly sink, typically beyond the default re-frob range unless you swim back down to it (or extend the frob range).

Avoid frobbable props

Keys and other attachable props seem to be problematic, because:

  • They often end up inside the cadaver
  • Frobbing them can cause the cadaver to sink (even if the ragdoll’s frobbable is 0)
  • There seem to be more general problems with functional keys on ragdolls

Other Issues

Corpse Pose

When you create and place a ragdoll in DR, the DR pose - hands at sides - may appear in the game as well. But with the "nodrop 1" method, as mentioned above, the in-game ragdoll will revert to a “T pose”. As a result, an arm might clip into, for instance, a nearby wall. Position the ragdoll accordingly.

If the initial spawn pose is important to you (beyond facing up or down), consider using one of two in-game methods (probably without "nodrop 1"):

  • Drag around a frobable ragdoll into a favorable position with a mouse, then save that pose.
  • Use the Articulate Figure editor. Invoke it by “editAFs”, then select your ragdoll model.

For more about the difficulties and specialized techniques for controlling ragdoll spawn pose, see:

Sink Rate?

Ragdolls are not Movables, so the Entity inspector will not show inherited Movable spawnargs like “mass”, nor respond if “mass” is added. So post-frob sink/float rate and direction cannot be controlled; it is fixed at a rather rapid sink.

(If you use the in-game Articulated Figure editor on a ragdoll, note that “total mass” is exposed, as well as collision volumes and densities for individual body parts. Could these be used effectively for float control? Don’t know.)

See Also

Objects Floating in Water

Force Fields and Func Forcefields about AI and cadavers in flowing water.