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

Some fire/smoke effect broken since alpha 30 (vertexpack merge) #780

Closed
illwieckz opened this Issue Jul 27, 2015 · 7 comments

Comments

Projects
None yet
2 participants
@illwieckz
Member

illwieckz commented Jul 27, 2015

Hi, while porting the ut-metro map by newin, I've discovered that some fire and smoke effect that were still working in Unvanquished 0.29.0 were not working since Unvanquished 0.30.0. You know, the alpha 30 release is the one where the vertexpack branch were merged.

This is how fire and smoke looks like on Daemon 0.29.0 and before:
fire and smoke
fire and smoke
fire and smoke
fire and smoke

This is how fire and smoke (does not) look like on Daemon 0.30.0 and after:
fire and smoke
fire and smoke
fire and smoke
fire and smoke

This is not the only issue in these screenshots (you can see a blend issues on all screenshots, see the dark zones), but this is not on the scope of this ticket.

The fire is completely not rendered, the smoke is sometime, a little, rendered, but not like it was before.

I can send a preview pk3 of this map if needed.

@illwieckz

This comment has been minimized.

Show comment
Hide comment
@illwieckz
Member

illwieckz commented Jul 29, 2015

The map can be found here: https://github.com/interstellar-oasis/map-terminus 😉

@illwieckz

This comment has been minimized.

Show comment
Hide comment
@illwieckz

illwieckz Aug 1, 2015

Member

It seems related to the clamp keyword.

This is an example of fire shader used in this map:

textures/terminus/mon_fire
{
    qer_editorimage textures/terminus/fire
    q3map_cloneshader textures/terminus/zzmon_fire_1
    surfaceparm nonsolid
    surfaceparm trans
    surfaceparm nomarks
    surfaceparm nodlight
    deformvertexes move 0 0 35 sawtooth 0 1 0 0.784
    deformvertexes move -0.755352 1.22297 0 inversesawtooth -0.695684 1 0 0.784
    deformvertexes autosprite
    cull disable
    {
        clampmap textures/terminus/fire
        blendfunc GL_SRC_ALPHA GL_ONE
        rgbgen wave sawtooth 1 -1 1 0.784
        alphagen wave sawtooth 0 6 0 0.784
        tcMod rotate -33
        tcMod stretch sawtooth 1 -0.7 0 0.784
    }
}

As you see, this shader (and all others) use the clampmap keyword:

        clampmap textures/terminus/fire

Perhaps it's not an xreal shader keyword since the xreal shader manual does not mention it (but it worked on Unvanquished ≤ 0.29), instead there is a clamp keyword, that is used with a map keyword (see usage example).

So, if I rewrite this line like that:

        map textures/terminus/fire
        clamp

I get the same result (no fire effect).

But if I comment out the clamp keyword:

        map textures/terminus/fire
        // clamp

I get a broken fire effect, so it seems other shader lines are working:

fire

If you want to try it yourself, you can tweak textures/terminus_fx.shader from this package.

Note: I don’t know if the shader in the picture is the one I show you the code above, I applied the change to all shaders to test them.
Note: The black texture issue is another unrelated issue (see #782).

Member

illwieckz commented Aug 1, 2015

It seems related to the clamp keyword.

This is an example of fire shader used in this map:

textures/terminus/mon_fire
{
    qer_editorimage textures/terminus/fire
    q3map_cloneshader textures/terminus/zzmon_fire_1
    surfaceparm nonsolid
    surfaceparm trans
    surfaceparm nomarks
    surfaceparm nodlight
    deformvertexes move 0 0 35 sawtooth 0 1 0 0.784
    deformvertexes move -0.755352 1.22297 0 inversesawtooth -0.695684 1 0 0.784
    deformvertexes autosprite
    cull disable
    {
        clampmap textures/terminus/fire
        blendfunc GL_SRC_ALPHA GL_ONE
        rgbgen wave sawtooth 1 -1 1 0.784
        alphagen wave sawtooth 0 6 0 0.784
        tcMod rotate -33
        tcMod stretch sawtooth 1 -0.7 0 0.784
    }
}

As you see, this shader (and all others) use the clampmap keyword:

        clampmap textures/terminus/fire

Perhaps it's not an xreal shader keyword since the xreal shader manual does not mention it (but it worked on Unvanquished ≤ 0.29), instead there is a clamp keyword, that is used with a map keyword (see usage example).

So, if I rewrite this line like that:

        map textures/terminus/fire
        clamp

I get the same result (no fire effect).

But if I comment out the clamp keyword:

        map textures/terminus/fire
        // clamp

I get a broken fire effect, so it seems other shader lines are working:

fire

If you want to try it yourself, you can tweak textures/terminus_fx.shader from this package.

Note: I don’t know if the shader in the picture is the one I show you the code above, I applied the change to all shaders to test them.
Note: The black texture issue is another unrelated issue (see #782).

@illwieckz

This comment has been minimized.

Show comment
Hide comment
@illwieckz

illwieckz Aug 1, 2015

Member

Another screenshot without clamp keyword:

fire

Member

illwieckz commented Aug 1, 2015

Another screenshot without clamp keyword:

fire

@illwieckz

This comment has been minimized.

Show comment
Hide comment
@illwieckz

illwieckz Aug 21, 2015

Member

For information, the clampmap keyword is still supported by the current code base:

else if ( !Q_stricmp( token, "clampmap" ) )

Member

illwieckz commented Aug 21, 2015

For information, the clampmap keyword is still supported by the current code base:

else if ( !Q_stricmp( token, "clampmap" ) )

@illwieckz

This comment has been minimized.

Show comment
Hide comment
@illwieckz

illwieckz Aug 23, 2015

Member

@gimhael, this regression was introduced by commit 0066c5f .

Date:   Sat Aug 2 10:31:41 2014 +0200
Use the same vertex layout in tess and VBOs to simplify upload.
Member

illwieckz commented Aug 23, 2015

@gimhael, this regression was introduced by commit 0066c5f .

Date:   Sat Aug 2 10:31:41 2014 +0200
Use the same vertex layout in tess and VBOs to simplify upload.
@illwieckz

This comment has been minimized.

Show comment
Hide comment
@illwieckz

illwieckz Aug 23, 2015

Member

Probably not related at all to the clampmap keyword, it's probably just a side effect.

Member

illwieckz commented Aug 23, 2015

Probably not related at all to the clampmap keyword, it's probably just a side effect.

@illwieckz

This comment has been minimized.

Show comment
Hide comment
@illwieckz

illwieckz Apr 11, 2016

Member

This bug was fixed in 0.49.0 release.

fire and smoke
fire and smoke
fire and smoke
fire and smoke
fire and smoke
fire and smoke
fire and smoke

Member

illwieckz commented Apr 11, 2016

This bug was fixed in 0.49.0 release.

fire and smoke
fire and smoke
fire and smoke
fire and smoke
fire and smoke
fire and smoke
fire and smoke

@illwieckz illwieckz closed this Apr 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment