Inconsistent transparency rendering order
Some of the purple crystals found in caves like Punabi are flickering while you move around.
Check the video.
OpenMW 0.39 release
Windows 8.1 64bit
#3 Updated by scrawl . about 1 year ago
OSG does sort based on the center of the bounding box. It would seem that this mesh requires sorting by origin to look as intended. We definitely want to keep sorting by AABB, though, since that is more accurate in most cases and allows us to apply optimizations (i.e. pre-applying transformations to the vertices). Maybe we could do a combination of the two metrics with the AABB having a higher impact...
#4 Updated by sjek - about 1 year ago
this happens also in vanilla
alpha overlaying broplems with clothes and underwater hairs etc.
all those crystals (each one having bit smaller identical trishape inside) have 237 alpha flag. the regular blending with
source: src alpha
dest: inv src alpha
i think bethesda meant flickering effect and the greyscale env map seemed to effect the base texture (artifacts or what one would call them)
point is though that this isn't in any way predictable in vanilla. other way to make it is using cg_diffuse_cube_map (less pronounced) but right on that it's mainly related to alpha blending
taken from discord the alpha blending firstly sorts everything from back to front in vanilla and then decides what to draw causing lags usually.
on those crystals though moving and sneaking around the top and inner crystal disappear-reappear like in vanilla. when close also the crystals flipping seemingly related to cursor position, while somewhat around the middle screen, when player / camera is moving, happens like so.
#8 Updated by Miloslav Číž 7 months ago
Actually I'm wrong, I can sometimes see the inner layer in vanilla. Cannot this be OSG changing the order in which it renders triangles or something? Because the flickering occurs even when the camera is still, so it has to be somehow caused by different order of triangles, right?
The optimizer shouldn't change anything. OSG sorts by the world bounding box of the object, which remains the same whether or not the vertices have been pre-transformed.
As to the flickering when standing still, well, two objects at the exact same distance are just in undefined order so that's probably why it happens.
#13 Updated by Andrei Kortunov 18 days ago
- Subject changed from Flickering crystals to Inconsistent rendering order
- Target version set to openmw-1.0
- Operating system changed from Windows to Other
Not only crystals are affected. Even with vanilla assets, lava and ice chunks have this issue too.
Original engine does not have this issue.