Skip to content

Commit

Permalink
Fix LODs of effects (FAForever#3720)
Browse files Browse the repository at this point in the history
Fixes inconsistent Level of Detail (LOD) cutoffs for effects. The cutoff is used to prevent the creation and rendering of particles when they barely contribute to the final image. A lot of effects had an infinite cutoff. These particles were always created and rendered. The creation of particles has a significant impact on the sim, the rendering has an impact on your fps. We introduce a sane LOD cutoff value with which we improve the performance of the sim and your fps at the same time.

With appreciation to Madmax who took the time and effort to look at more than 300 effects.
  • Loading branch information
Garanas authored Apr 8, 2022
1 parent cacd2fb commit af91346
Show file tree
Hide file tree
Showing 2,767 changed files with 370,019 additions and 173 deletions.
2 changes: 1 addition & 1 deletion effects/emitters/Firebig.bp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ EmitterBlueprint {
AlignRotation = false,
AlignToBone = false,
Flat = false,
LODCutoff = 1000.00,
LODCutoff = 300.00,
EmitIfVisible = true,
CatchupEmit = true,
CreateIfVisible = false,
Expand Down
2 changes: 1 addition & 1 deletion effects/emitters/Large_test_debris.bp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ EmitterBlueprint {
AlignRotation = false,
AlignToBone = false,
Flat = false,
LODCutoff = 1000.00,
LODCutoff = 300.00,
EmitIfVisible = true,
CatchupEmit = true,
CreateIfVisible = false,
Expand Down
2 changes: 1 addition & 1 deletion effects/emitters/Large_test_random.bp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ EmitterBlueprint {
AlignRotation = false,
AlignToBone = false,
Flat = false,
LODCutoff = 1000.00,
LODCutoff = 300.00,
EmitIfVisible = true,
CatchupEmit = true,
CreateIfVisible = false,
Expand Down
2 changes: 1 addition & 1 deletion effects/emitters/Large_test_smoke.bp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ EmitterBlueprint {
AlignRotation = false,
AlignToBone = false,
Flat = false,
LODCutoff = 1000.00,
LODCutoff = 300.00,
EmitIfVisible = true,
CatchupEmit = true,
CreateIfVisible = false,
Expand Down
2 changes: 1 addition & 1 deletion effects/emitters/Large_test_sonic.bp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ EmitterBlueprint {
AlignRotation = false,
AlignToBone = false,
Flat = false,
LODCutoff = 1000.00,
LODCutoff = 300.00,
EmitIfVisible = true,
CatchupEmit = true,
CreateIfVisible = false,
Expand Down
2 changes: 1 addition & 1 deletion effects/emitters/Medium_rapid_debris.bp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ EmitterBlueprint {
AlignRotation = false,
AlignToBone = false,
Flat = false,
LODCutoff = 1000.00,
LODCutoff = 300.00,
EmitIfVisible = true,
CatchupEmit = true,
CreateIfVisible = false,
Expand Down
2 changes: 1 addition & 1 deletion effects/emitters/Medium_test_debris.bp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ EmitterBlueprint {
AlignRotation = false,
AlignToBone = false,
Flat = false,
LODCutoff = 1000.00,
LODCutoff = 300.00,
EmitIfVisible = true,
CatchupEmit = true,
CreateIfVisible = false,
Expand Down
2 changes: 1 addition & 1 deletion effects/emitters/Underbubbles.bp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ EmitterBlueprint {
AlignRotation = false,
AlignToBone = false,
Flat = false,
LODCutoff = 100.00,
LODCutoff = 150.00,
EmitIfVisible = true,
CatchupEmit = true,
CreateIfVisible = false,
Expand Down
2 changes: 1 addition & 1 deletion effects/emitters/Underwater.bp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ EmitterBlueprint {
AlignRotation = true,
AlignToBone = false,
Flat = false,
LODCutoff = 100.00,
LODCutoff = 150.00,
EmitIfVisible = true,
CatchupEmit = true,
CreateIfVisible = false,
Expand Down
152 changes: 152 additions & 0 deletions effects/emitters/__resistance_test02_emit.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
EmitterBlueprint {
BlueprintId = '__resistance_test02',
Lifetime = -1.00,
Repeattime = 50.00,
TextureFramecount = 1.00,
Blendmode = 3.00,
LocalVelocity = true,
LocalAcceleration = true,
Gravity = false,
AlignRotation = true,
AlignToBone = false,
Flat = false,
LODCutoff = 150.00,
EmitIfVisible = true,
CatchupEmit = true,
CreateIfVisible = false,
SnapToWaterline = false,
OnlyEmitOnWater = false,
ParticleResistance = true,
InterpolateEmission = true,
TextureStripcount = 1.00,
SortOrder = 0.00,
Texture = [[/textures/particles/dirt_spray_02.dds]],
RampTexture = [[/textures/particles/testramp.dds]],
XDirectionCurve = {
XRange = 50.00,
Keys = {
{ x=25.000,y=0.000,z=0.000 },
},
},
YDirectionCurve = {
XRange = 50.00,
Keys = {
{ x=25.000,y=0.500,z=0.000 },
},
},
ZDirectionCurve = {
XRange = 50.00,
Keys = {
{ x=25.000,y=0.381,z=0.000 },
},
},
EmitRateCurve = {
XRange = 50.00,
Keys = {
{ x=25.000,y=1.000,z=0.000 },
},
},
LifetimeCurve = {
XRange = 50.00,
Keys = {
{ x=25.000,y=38.571,z=0.000 },
},
},
VelocityCurve = {
XRange = 50.00,
Keys = {
{ x=25.396,y=2.000,z=0.000 },
},
},
XAccelCurve = {
XRange = 50.00,
Keys = {
{ x=25.000,y=0.010,z=0.000 },
},
},
YAccelCurve = {
XRange = 50.00,
Keys = {
{ x=25.000,y=-0.020,z=0.000 },
},
},
ZAccelCurve = {
XRange = 50.00,
Keys = {
{ x=25.000,y=0.000,z=0.000 },
},
},
ResistanceCurve = {
XRange = 50.00,
Keys = {
{ x=24.472,y=0.070,z=0.000 },
},
},
SizeCurve = {
XRange = 50.00,
Keys = {
{ x=25.000,y=0.000,z=0.000 },
},
},
XPosCurve = {
XRange = 50.00,
Keys = {
{ x=25.000,y=0.000,z=0.000 },
},
},
YPosCurve = {
XRange = 50.00,
Keys = {
{ x=25.000,y=0.000,z=0.000 },
},
},
ZPosCurve = {
XRange = 50.00,
Keys = {
{ x=25.000,y=0.000,z=0.000 },
},
},
StartSizeCurve = {
XRange = 50.00,
Keys = {
{ x=25.000,y=1.000,z=0.000 },
},
},
EndSizeCurve = {
XRange = 50.00,
Keys = {
{ x=25.528,y=1.810,z=0.500 },
},
},
InitialRotationCurve = {
XRange = 50.00,
Keys = {
{ x=24.604,y=257.143,z=0.000 },
},
},
RotationRateCurve = {
XRange = 50.00,
Keys = {
{ x=25.000,y=0.000,z=10.000 },
},
},
FrameRateCurve = {
XRange = 50.00,
Keys = {
{ x=25.000,y=1.000,z=0.000 },
},
},
TextureSelectionCurve = {
XRange = 50.00,
Keys = {
{ x=25.000,y=0.000,z=0.000 },
},
},
RampSelectionCurve = {
XRange = 50.00,
Keys = {
{ x=25.000,y=0.000,z=0.000 },
},
},
}

Loading

0 comments on commit af91346

Please sign in to comment.