Dynamic FX limit breaking.
-
I decided to implement Dynamic lighting for weapon projectiles. I’ve tested it with vengeance Mk2 gun. It worked fine…first time.
So, the problem is: only 2 or 3 firs projectiles cast dynamic light, others don’t until those first disappear.
I made the projectile very slow, so my observations are correct. Only 2-4 first projectiles cast light, others don’t. If I fire in multiple style - after 1st short(6 projectiles) no effect is spawned.I recall Firekiss wrote about effect limitation, but after he wrote in some post something like " 100 times more effects allowed, dacom.ini" or something like that. I had plasmafire in FLMM, so I decided to try. In plasmafire dynamic light FX disappeared after about 50 - 60 projectiles. That’s quite enough.
I looked through dacom.ini, found there:
[Alchemy]
;EMAURER added this line to fix problem with runtime alchemy running out of vertex buffer
;maxVertices and maxIndices are now determined by alchemy based on the particle pools
;Alchemy.maxVertices ~= 11100
;Alchemy.maxIndices ~= 28200Alchemy.useMaterialBatcher = false
; (note: 1000 is default poolsize)
FxBasicAppearance.poolSize = 1000 ; each particle can generate: 4 verts 6, indices
FxRectAppearance.poolSize  = 400 ; each particle can generate: 4 verts 6, indices
FxPerpAppearance.poolSize  = 250 ; each particle can generate: 4 verts 6, indices
FxOrientedAppearance.poolSize = 0 ; each particle can generate: 4 verts 6, indices
FLBeamAppearance.poolSize  = 680 ; custom app from flalchemy.dll: each particle can generate: 5 verts 24 indices
FLDustAppearance.poolSize  = 250 ; custom app from flalchemy.dll: each particle can generate: 4 verts 6 indices
;–-------------------- total = 2600 -------;
;
FxMeshAppearance.poolSize = 500 ; generates meshes not particles; need enough of these for all tradelane rings in a system.
FxParticleAppearance.poolSize = 100 ; generates effects not particles[BatchedMaterials]
Type = .*OcOt100 times more? So, I did the below changes, after(shoul be before, I gues…) checking dacom.ini in FLMM Plasmafire folder - my guess was correct. So I changed FxBasicAppearance.poolSize etc. values to 100 times bigger.
[Alchemy]
;EMAURER added this line to fix problem with runtime alchemy running out of vertex buffer
;maxVertices and maxIndices are now determined by alchemy based on the particle pools
;Alchemy.maxVertices ~= 11100
;Alchemy.maxIndices ~= 28200Alchemy.useMaterialBatcher = false
; (note: 1000 is default poolsize)
FxBasicAppearance.poolSize = 100000 ; each particle can generate: 400 verts 600, indices
FxRectAppearance.poolSize  = 40000 ; each particle can generate: 400 verts 600, indices
FxPerpAppearance.poolSize  = 25000 ; each particle can generate: 400 verts 600, indices
FxOrientedAppearance.poolSize = 0 ; each particle can generate: 400 verts 600, indices
FLBeamAppearance.poolSize  = 68000 ; custom app from flalchemy.dll: each particle can generate: 500 verts 2400 indices
FLDustAppearance.poolSize  = 25000 ; custom app from flalchemy.dll: each particle can generate: 400 verts 600 indices
;–-------------------- total = 2600 -------;
;
FxMeshAppearance.poolSize = 50000 ; generates meshes not particles; need enough of these for all tradelane rings in a system.
FxParticleAppearance.poolSize = 10000 ; generates effects not particlesNo difference. Maybe dacom.dll should be changed? But plasmafire doesn’t change dacom.dll afaik.
I know many people have played with dynamic lights, so what’s the problem with those dynamic FX?? ???
-
So how is it done in plasmafire then?
BTW, I was a bit wrong, in plasmafire dynamic light FX disappeared after about 300 - 400 projectiles, not 50 - 60.
Maybe these dx8 t0 dx9 converter by Boris Vorontsov that fixes it??
Waiting for Firekiss to spot a bit light(dynamic light in this case) on this.
-
w0dk4 and OP are correct; DX8 only supports 8 point lights. Modern games use shaders to fake additional lights as far as I’m aware, but Freelancer does not support such shaders.
-
Can you confirm that PF has more than 8 lightsources?
And include a screen please. Im tired of ppl saying “this and that works” whereas in reality it doesnt.
It was the same for missile use in random missions by npcs, they just dont work, yet 90% say “in my FL they work” - no they dont. -
It would be too taxing to have more than 8 point lights anyways. The technology behind them is outdated compared to the speed you can get out of shaders. We should be thankful we already have dynamic light support, considering the bewilderingly bad lighting in FL overall.
-
Will try without hints.
1. Take this http://enbdev.com/enbseries_gtasa_v0073a.zip
2. Learn this http://en.wikipedia.org/wiki/High_Level_Shader_Language
3. Make effects.txt by writing own HLSL code to beak limit of 8 lightsources in requirement format of ENB Series effects post process
4. Done.Sushi, w0dk4, FF - is it right way?
-
Think stable variant = plugin + own HLSL code
-
It’s much more involved than ENB I’m afraid. ENB is just a wrapper that adds post-processing. To do this you need to do more than a wrapper, you need to replace a lot of the functionality.
It’ll take you longer to do it than to wait for us to release it
-
Thinking about permanent flashing lights hmhmhmhmhm…
-
Got MaxActiveLights - what does this mean? As is?
This parameter must be written under your videocard ID in the flconfigdatabase.txt