Jump to content

Waterfall Missing


Cerez

Recommended Posts

I've just tried the latest release of OpenJK (2 Dec), and it's working great, but the waterfall on the training level (yavin2) in SP seems to be missing:

rkpwsz.png

Anyone know code-wise what could be causing it to disappear? Any hunches?

Link to comment

I did nothing.  And my SP doesn't even launch right now sorry.

 

Hahaha! That's a good sign! :lol:  XD

 

 

Tbh, I didn't notice there was a waterfall lol. :P

 

If I were to guess, I'd say something to do with shader crap in the code. Also, your HUD looks to be missing stuff as well.

 

I'm keen with noticing environmental details. ^_^

 

Thanks DT. Yeah, the "missing" HUD is a mod (called "minimalistic HUD"). I use it because I prefer a distraction-free UI and lots of screen space. No error there.

 

As for the vanished waterfall, the effect of that waterfall doesn't looks like a shader, actually. It's a lot like a programmed sequence of 3D planes falling down. The last build I tried was in August 2015, I think. The change happened sometime in-between these two releases, so this might be difficult to find the cause of now... :/

 

It's kind of strange hearing a waterfall without seeing it. :rolleyes:

 

I'm going to run a diff between the two sources, and try to find the culprit if I can. Wish me luck. :ph34r:

DT. likes this
Link to comment

I thought the waterfall was just a 3d mesh with a scrolling shader on it?

 

 

EDIT: I think this is the shader. I'm guessing it's something to do with blendfunc or alphagen perhaps in the code that got changed somehow.

textures/yavin/waterfall
{
	qer_editorimage	textures/yavin/water1
	surfaceparm	slick
	q3map_material	Water
	q3map_nolightmap
	q3map_onlyvertexlighting
	cull	twosided
    {
        map textures/yavin/water1
        blendFunc GL_ONE GL_ZERO
        rgbGen exactVertex
        alphaGen const 0.9
        tcMod scroll 0 -1
        tcMod scale 3 3
    }
    {
        map textures/yavin/water1
        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
        alphaGen const 0.33
        tcMod scroll 0 -0.25
    }
    {
        map textures/yavin/water_test
        blendFunc GL_DST_COLOR GL_ONE
        tcMod scroll 0 -0.15
        tcMod scale 3 3
    }
    {
        map textures/common/stars
        blendFunc GL_ONE GL_ONE
        rgbGen wave sin 0 1 0 0.5
    }
}
Cerez likes this
Link to comment

It's kind of strange hearing a waterfall without seeing it. :rolleyes:

 

Perhaps glasses will help.

 

But jokes aside...

 

 

I thought the waterfall was just a 3d mesh with a scrolling shader on it?

 

 

EDIT: I think this is the shader. I'm guessing it's something to do with blendfunc or alphagen perhaps in the code that got changed somehow.

 

I don't think so. yavin2 has a fx_runner, set to world/waterfall3.efx. That effect, in turn, seems to only refer to the shader gfx/effects/alpha_smoke:

gfx/effects/alpha_smoke
{
    cull    twosided
    {
        map gfx/effects/alpha_smoke
        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
        rgbGen vertex
        alphaGen vertex
    }
}

Weird.

Cerez likes this
Link to comment

EDIT: I think this is the shader. I'm guessing it's something to do with blendfunc or alphagen perhaps in the code that got changed somehow.

textures/yavin/waterfall
{
	qer_editorimage	textures/yavin/water1
	surfaceparm	slick
	q3map_material	Water
	q3map_nolightmap
	q3map_onlyvertexlighting
	cull	twosided
    {
        map textures/yavin/water1
        blendFunc GL_ONE GL_ZERO
        rgbGen exactVertex
        alphaGen const 0.9
        tcMod scroll 0 -1
        tcMod scale 3 3
    }
    {
        map textures/yavin/water1
        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
        alphaGen const 0.33
        tcMod scroll 0 -0.25
    }
    {
        map textures/yavin/water_test
        blendFunc GL_DST_COLOR GL_ONE
        tcMod scroll 0 -0.15
        tcMod scale 3 3
    }
    {
        map textures/common/stars
        blendFunc GL_ONE GL_ONE
        rgbGen wave sin 0 1 0 0.5
    }
}

 

It's definitely not this, as this is for the first waterfall on the map, which is indeed a 3D plane with this animated shader running on it.

 

I don't think so. yavin2 has a fx_runner, set to world/waterfall3.efx. That effect, in turn, seems to only refer to the shader gfx/effects/alpha_smoke:

gfx/effects/alpha_smoke
{
    cull    twosided
    {
        map gfx/effects/alpha_smoke
        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
        rgbGen vertex
        alphaGen vertex
    }
}

 

This sounds much more like it. That second waterfall looks like it's comprised of particles.

 

There have been some major changes in SP recently relating to the parser engine that's used for EFX files: https://github.com/JACoders/OpenJK/pull/748

This problem could be caused by those changes. Have you noticed any other effects that are missing in SP? These would include torches, smoke, explosions, etc.

Bingo! I'm pretty sure this is it. I will check the other particle-based visual effects in-game today, and let you know.

Link to comment

Update: Fortunately the rest of the effects seem fine. Fire, smoke, sparks, beams, explosions, water ripples, smoke, dust all seem to be showing properly. Curiously, it seems only this one waterfall was negatively affected by the changes. It must be doing something unique. :lol:

Link to comment

Yeah, the entire thing is just EFX, my bad. :P

Not at all, DT. Thanks for contributing to the discussion, and getting the right thought-process started for us all to track this down.

 

I was afraid I might break something, rewriting all of the effects parsing...

 

Thanks for the heads up, effects with the useAlpha flag should now work again.

Well, I'm surprised so little broke, actually, considering the extent of the rewrite. Everything else seems to be working just dandy. :winkthumb:

 

https://github.com/JACoders/OpenJK/commit/883109ef40022ba93363bd33e1ebe61665361e49

 

Hahaha! The "ugly waterfall". We'll call it that from now on. Thanks @@mrwonko. ^_^

DT. likes this
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...