Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lavaalpha issues in ne_ruins (invisible lava) #767

Open
Placo opened this issue Jan 22, 2025 · 7 comments
Open

lavaalpha issues in ne_ruins (invisible lava) #767

Placo opened this issue Jan 22, 2025 · 7 comments
Assignees
Labels

Comments

@Placo
Copy link

Placo commented Jan 22, 2025

In the "Altar of Storms" mod:
https://www.quaddicted.com/reviews/ne_ruins.html

At some point during the second map the lava rises and floods the lower part of the level. It is invisible in vkQuake.

I noticed this bug just as vkQuake was archived nearly two years ago so I couldn't create an issue here but then I was reminded of this bug today.
The problem appeared around the time Temx reworked the engines' alphasorting, the mod was working fine in vkQuake in older versions.

I have tried disabling r_alphasort but it doesn't change the problem.
I noticed that r_wateralpha is at 0.7 and r_lavaalpha is at 0.
Changing either r_wateralpha or r_lavaalpha to 1 makes the lava appear, but any other value (between ==0 and <1) the lava is invisible.
I don't know if the issue is caused because the lava is invisible at the start of the map or what (as it rises during the level).

I use vkQuake in Win10 with a geforce980

In vkQuake:
Image
In Ironwail for comparison:
Image

A save to the spot with the problem:
save.zip

@j4reporting
Copy link
Contributor

It seems that the "lava" in this map is a bit different from the usual lava (e.g.. id1/end ), as it is always rendered with r_lavaalpha 1 in ironwail and quakespasm. The value for r_wateralpha of 0.6 is not applied here ( r_lavaalpha "0" ).

@j4reporting
Copy link
Contributor

j4reporting commented Jan 23, 2025

first bad commit is 810725b
"Separate worldmodel water by transparency status"

It looks like only lava parallel to the floor is rendered incorrectly.
I think this map is using entities for lava with alpha 1.0 ( r_drawentities 0 ) will remove all lava

r_lavaalpha 1:

Image

r_lavaalpha <1:

Image

r_lavaalpha 1:

Image

r_lavaalpha <0:

Image

@vsonnier
Copy link
Collaborator

vsonnier commented Feb 4, 2025

first bad commit is 810725b
"Separate worldmodel water by transparency status"

Thanks to have tracked down this. I may be worth reverting this "optimization" if the change is actually not too big. I'll look into when I have more time.

@vsonnier
Copy link
Collaborator

Thanks to have tracked down this. I may be worth reverting this "optimization" if the change is actually not too big. I'll look into when I have more time.

I started playing ne_ruins, and (by chance ?) with my usual transparency settings set in autoexec.cfg:

r_novis 0
r_wateralpha 0.8
r_slimealpha 0.85
r_lavaalpha 1.0
r_telealpha 1.0

I see no problem with lava so far:

Image

so setting r_lavaalpha 1.0 is indeed the right thing to do for this map, which coincidently is the logical setting for lava IMHO.

There are too many trenparency combinations vs. rendering and in reality I'm not competent to try to change this without breaking anything else, so I'm closing this.

@vsonnier vsonnier added wontfix and removed bug labels Feb 12, 2025
@j4reporting
Copy link
Contributor

j4reporting commented Feb 17, 2025

found another map with this issue. rvj_inky from Re:Mobilize Jam 2: Re:Visions .
It's basically map dm1 in a horror experiance similar to 'a day like no other'.
Here the water/slime, where usually lava is, near the steps in the mirror world are not rendered with r_wateralpha < 1 settings. As well as the exit portal at the end.

it seems map is not water-vised, but vkquake will render water/slime as black and the portal is not rendered at all.
EDIT: map source is unfiortunately not included in the pak file.

Image

Image

Image

Image

@vsonnier vsonnier added bug and removed wontfix labels Feb 18, 2025
@vsonnier vsonnier reopened this Feb 18, 2025
@j4reporting
Copy link
Contributor

the common theme here seems to be liquid surfaces with alpha value of 1.0 in bsp are not rendered correctly if cvar r_wateralpha is < 1 ( assuming r_{tele,slime,lava}alpha 0 ).
Inky's map has a temple section with a pool which also changes from water to blood. This is rendered correctly, because both entities have alpha < 1.

All teleporters, even the two teleporters in the standard part of DM1, ( entities have alpha 1 ) and the water/slime pool in the mirror world ( also alpha 1 ) are affected by this bug.

Image

Image

Image

@j4reporting
Copy link
Contributor

Do we know what kind of artifacts this commit 810725b is supposed to fix?

There are too many trenparency combinations vs. rendering and in reality I'm not competent to try to change this without breaking anything else

It can be reverted w/o breaking anything else. Until we figure out what's missing.

This commit has some more issues or unexpected behaviour:
default settings with r_wateralpha 0.8

load savegame and suddenly the water surface of the water/slime pool is rendered correctly ( opaque = alpha 1 )
changing r_wateralpha to a value < 1 breaks the rendering again.
This does not work with the slime surface, it's always rendered incorrectly with r_wateralpha < 1, probably because its original starting position is somewhere else and replaces the watersurface.

Image

Image

rvj_savegames.zip

there is another location in this map, pond in the forest, with the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants