View Issue Details

IDProjectCategoryView StatusLast Update
0005136The Dark ModGraphicspublic21.03.2020 17:41
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeveritymajorReproducibilitysometimes
Status assignedResolutionopen 
Target VersionTDM 2.09 
Summary0005136: Wrong bounds of particle system
DescriptionThe code for computing bounds of particle systems is wrong.
This can lead to culling out the whole system randomly.
Steps To ReproduceStart test_raincollision dev FM and look at the section with curved rain patch.
If you look down, it will disappear
Additional InformationThere are two ways to use particle system in our engine:
1) particle model: set "model" with .prt extension on entity
2) particle-emitting surface: set "particle deform" on a material and put it on some surface
Some of the code is reused.

In the first case, bounds are computed for every particle stage but setting particle system to standard orientation and sampling 1000 random particles. Note that this is done once per every particle stage, so it does not take much time.
In the second case bounds depend on surface geometry. This is the stupid piece of code which is doing this now:
  tri->bounds.AddBounds(particleSystem->bounds);
Where particleSystem->bounds is the bounds of particle stage.

I think even code for particle model is not correct in presence of gravity and worldAxis.
For the code for surfaces is something which bears no relation to reality =)
Tagsparticle

Relationships

related to 0004957 resolvedstgatilov Snow and rain particles stopping on brushes 
related to 0005138 assignedstgatilov Refactor particle systems code 

Activities

stgatilov

stgatilov

01.02.2020 05:13

administrator   ~0012162

In rev 8547, I committed a small fix.
It is intended to simplify rain testing, since it does not take gravity and worldAxis into account.
Enabled by r_tempFixBoundsOfParticleDeformedSurfs cvar.

The same idea with interval math can be extended to all cases, but for that to happen it is necessary to compute several different bounds for particle stage, not just one.
Most importantly, I mean: bounds with gravity, and bounds without gravity.
I hope to do this during particle code refactoring.

Issue History

Date Modified Username Field Change
01.02.2020 05:11 stgatilov New Issue
01.02.2020 05:11 stgatilov Status new => assigned
01.02.2020 05:11 stgatilov Assigned To => stgatilov
01.02.2020 05:11 stgatilov Tag Attached: particle
01.02.2020 05:11 stgatilov Relationship added related to 0004957
01.02.2020 05:13 stgatilov Note Added: 0012162
01.02.2020 05:36 stgatilov Relationship added related to 0005138
22.02.2020 13:47 stgatilov Target Version TDM 2.08 =>
21.03.2020 17:40 stgatilov Product Version TDM 2.07 => TDM 2.09
21.03.2020 17:41 stgatilov Product Version TDM 2.09 =>
21.03.2020 17:41 stgatilov Target Version => TDM 2.09