View Issue Details

IDProjectCategoryView StatusLast Update
0004600The Dark ModDef / Setuppublic12.12.2017 03:50
ReporterSpringheel Assigned Tograyman  
PrioritynormalSeveritynormalReproducibilityalways
Status closedResolutionfixed 
Product VersionTDM 2.05 
Target VersionTDM 2.06Fixed in VersionTDM 2.06 
Summary0004600: Some movable objects spawning two different splash particles
Descriptionhttp://forums.thedarkmod.com/topic/19042-looking-at-water-splashes/#entry410346

In summary: The rules for what kind of splash particles should be spawned is not being followed; some movable objects are spawning multiple splash particles.
Steps To Reproduceload test/water_murk2 on SVN
load particles/tdm_water.prt

comment out the "material" spawnargs on water_splash, then throw the crate in the water. You'll see black squares, even though that crate shouldn't be using that splash. If you do the same for water_splash_large, you'll also see black squares, meaning it is using both particles.
TagsNo tags attached.

Relationships

related to 0004122 closedSpringheel Improve splash effects 

Activities

grayman

grayman

19.08.2017 03:29

viewer   ~0009097

Initial look shows the crate hitting the water twice, once with mass 21 and once with mass 9.

Thus the two splashes, large and medium.

So each instance is using the correct splash particle.

The problem is why the code is detecting two collisions.
grayman

grayman

19.08.2017 03:51

viewer   ~0009098

When a moveable collides with water, the mass is adjusted based on how underwater the moveable is when the collision is registered.

So the "mass = 21" event is when the crate is barely underwater, and the "mass = 9" event is when the crate is half underwater.
grayman

grayman

19.08.2017 03:54

viewer   ~0009099

The 2nd collision is registered 4 frames after the first.
grayman

grayman

19.08.2017 04:10

viewer   ~0009100

The movement code checks every 4 frames to see if the moveable has hit anything. If it finds that the moveable has hit water, then a determination of which splash particle to spawn is made.

Since the movement code is finding the crate hitting the water in two consecutive checks, and the crate is still moving fast enough to warrant a splash, it plays a second splash. It has no knowledge of the first splash.

This suggests a fix that sets a flag after the first splash occurs, and when the second splash is attempted, the set flag prevents it.

The flag then gets cleared when the moveable comes to rest.
Springheel

Springheel

19.08.2017 13:59

administrator   ~0009101

A couple thoughts:

1. Is this being affected by the uncapped fps change?

2. Sometimes multiple splashes are desirable--a floating plank, for example, spawns splashes at both ends. Also, some floating objects bob up and down and create small splashes while doing so, which looks reasonable.

3. If there are too many splashes it looks bad, because all the additive textures overlay each other until they're a pure white mess. This often happens with ragdolls, presumably because all the limbs cause different splashes.

Maybe instead of clearing the flag after the object comes to rest, it could be cleared after 4+X frames, so the number of multiple splashes is reduced, but still allowed.
grayman

grayman

19.08.2017 14:37

viewer   ~0009103

Last edited: 19.08.2017 15:20

Could you please commit this:

textures/water_source/waterspray_m1add

Edit:

Nevermind, this just shows that I continue to be befuddled by texture and material files.

Everything I need is there, but I'm not seeing any splash.

Edit 2:

I see the splash now. It's very fine, and if you're looking straight down on it, you can miss it. But it's visible from the side.

grayman

grayman

19.08.2017 14:39

viewer   ~0009104

1. No

Looking at your suggestion.
grayman

grayman

19.08.2017 15:42

viewer   ~0009105

Source changes committed.

Latest Windows binaries built and committed.

Please test and provide feedback.
grayman

grayman

19.08.2017 17:26

viewer   ~0009108

Add a delay between the spawning of splash effects.

Rev 7082:

Entity.cpp
Entity.h
Liquid.cpp
grayman

grayman

04.09.2017 16:00

viewer   ~0009135

Resolved?
Springheel

Springheel

04.09.2017 20:58

administrator   ~0009136

Last edited: 04.09.2017 21:11

My build has all kinds of graphics glitches since the last SVN update, but from what I could tell, the movable crate was not playing a splash particle at all. It plays a ripple particle only. Same with a ragdoll. Everything else I tested seemed correct.


Vid in forum:
http://forums.thedarkmod.com/topic/19042-looking-at-water-splashes/?p=411508

nbohr1more

nbohr1more

04.09.2017 21:05

developer   ~0009137

Latest 32-bit SVN binary?
grayman

grayman

06.09.2017 07:48

viewer   ~0009141

If I throw the crate into the adjacent pool, I can see the splash (water_splash_large). Ditto with the body.

What is the water setup at your end for that pool?
Springheel

Springheel

06.09.2017 21:26

administrator   ~0009150

Last edited: 06.09.2017 21:32

I just tried with the default water_murk2 map on SVN. I had the same result. The water ripples portion of the splash particle played, but the splash stage did not. That confuses me a bit, since both stages are part of the same particle.

water_splash_large seems to be the offender

edit: I increased the particle count a bit and I can now see the splash effect, but it's extremely faint compared to water_splash. I'll play around with the particle and see if I can find the problem.

grayman

grayman

16.09.2017 18:06

viewer   ~0009259

Splashes look fine with your latest commits.
grayman

grayman

04.11.2017 13:39

viewer   ~0009541

Can this be closed?

Issue History

Date Modified Username Field Change
10.08.2017 20:45 Springheel New Issue
10.08.2017 21:18 Springheel Relationship added related to 0004122
17.08.2017 01:02 Springheel Assigned To => grayman
17.08.2017 01:02 Springheel Status new => assigned
19.08.2017 03:29 grayman Note Added: 0009097
19.08.2017 03:51 grayman Note Added: 0009098
19.08.2017 03:54 grayman Note Added: 0009099
19.08.2017 04:10 grayman Note Added: 0009100
19.08.2017 13:59 Springheel Note Added: 0009101
19.08.2017 14:37 grayman Note Added: 0009103
19.08.2017 14:39 grayman Note Added: 0009104
19.08.2017 15:08 grayman Note Edited: 0009103
19.08.2017 15:20 grayman Note Edited: 0009103
19.08.2017 15:42 grayman Note Added: 0009105
19.08.2017 15:42 grayman Status assigned => feedback
19.08.2017 17:26 grayman Note Added: 0009108
04.09.2017 16:00 grayman Note Added: 0009135
04.09.2017 20:58 Springheel Note Added: 0009136
04.09.2017 20:58 Springheel Status feedback => assigned
04.09.2017 20:59 Springheel Note Edited: 0009136
04.09.2017 21:00 Springheel Note Edited: 0009136
04.09.2017 21:05 nbohr1more Note Added: 0009137
04.09.2017 21:11 Springheel Note Edited: 0009136
06.09.2017 07:48 grayman Note Added: 0009141
06.09.2017 21:26 Springheel Note Added: 0009150
06.09.2017 21:29 Springheel Note Edited: 0009150
06.09.2017 21:32 Springheel Note Edited: 0009150
16.09.2017 18:06 grayman Note Added: 0009259
20.09.2017 17:57 nbohr1more Status assigned => feedback
04.11.2017 13:39 grayman Note Added: 0009541
11.12.2017 22:21 Springheel Status feedback => closed
11.12.2017 22:21 Springheel Resolution open => fixed
12.12.2017 03:50 grayman Fixed in Version => TDM 2.06