[VFX] Z-buffering with Aircraft model

There appears to be a large radius where visual effects are cut-off from being
displayed, when close to the Aircraft model:

The effect is spawning from the
exhaust pipe, the black hole in the purple area. The tail hull extension is
clipping over it, as if it where in front. The fuselage is doing the same,
hence giving the impression that the effect is located somewhere behind the
aircraft. It is instead emitting from the exhaust pipe. The effect at the
moment is a slightly modified default VFX editor template, with adjusted size,
rates and particle velocities. It is shooting particles at 1 ft/s to the right
and to the back of the aircraft (localdirection). If the Z-buffering issue
cannot be solved, there is no point in developing the effect. Can the clipping
range be adjusted? NOTE: since the cabin ends quite before the exhaust pipe,
none of the collision meshes reach this far back *(and are quite precise as
not to allow water in, but without clipping it on the outside)

I don’t have an answer for you, but just chiming in to say that it’s not only
aircraft. I too have this same or at least a very similar issue with a few
models I have attached my chimney smoke effects to, as well as a campfire
where the flame effects show behind it. I haven’t found any sorting options in
the effects editor, and in some cases the effect works just as I want it to.
But even comparing the models that do and don’t work, I have not found
anything I’m doing different. So, I’m keen to see this looked into some more
as well…

Hello @MariopilotPD808 Can you send us the effect file please? Also can you
please make a quick video with the “Show particles” option checked, turning
the camera around the aircraft to that we have a better understanding of the
problem? Regards, Sylvain

Hello, I cannot record a video right now, as I am away from home and my Dev
machine. I can do that after January 8, if still needed. I can however send
you the effect.
EffectPack_FN333.zip The zip
includes both the source and compiled visualEffectLib. The problem exists with
both of the included effects. Th engstart effect is a much simpler one, as it
is yet not properly developed. You may want to start investigating from there.
The core of the problem is that the model has a Z-bias radius that conceals
the effect when close. Thanks for the support! Mario N.

Hello @MariopilotPD808 I was able to witness the problem. The developers in
charge of this part of the engine are out of office as we speak but I’ll
review this with them when they are back and will let you know if there’s a
way to mitigate this problem. Regards, Sylvain

Hello @MariopilotPD808 This issue is due to a depth offset calculation in the
shader for the VFX particles that uses the z scale of the particle multiplied
by its size. When the result is 1 there is no offset, when the result is below
1 the particle is pushed away from the camera and conversely. A temporary
workaround, while we decide if and how we can fix this, is to set your
particle scale to (1, 1, 1 / size) on any block where you change the
particle size (init, update). Regards, Matthieu

Hello @MagnanimousHippo, and thanks for the input. Unfortunately, this locks
the particle size to 1 (as we are scaling it by the reciprocal of its size),
and therefore makes developing the effect impossible.

Hello @MariopilotPD808, If you set only the z component of the scale vector to
1/size, the size of your particle will remain unaffected. Only the x and y
component of the scale will change that, so they should be set to 1. The z
component will only have an impact on the offset calculated in the shader.
Regards, Matthieu