Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issues with deformVertexes autosprite2 and alphashadow

#1
Question 
Hi there.

I was wondering if anyone could clue me in on what is the issue for me.
This is not for Xonotic. But the game I am making it for is working on Darkplaces all the same. So I was hoping you all could share some of your expertise.

I'm working on a map and I got these light shafts that are meant to use "deformVertexes autosprite2".

And they work, sort of. But when I move around the map. They tend to spaz out and reorient themselves violently. I can't seem to find any information on this and I know it should work because the map I am working on is a conversion project. So the material and actual function has worked previously. But not when I make the compile myself. (That being said, I don't have the source files so I had to make a decompile before, so it's possible something is missing, but rest assured I do have the permission of the original author to make this conversion).

    Here they are in place.
    But at some points, they flick out of position and loose orientation.

Here is the material declaration for the light shaft.
Code:
textures/toxicity/beam1
{
        sort 16
        qer_editorimage textures/pukka3tourney2/s1.jpg
        surfaceparm nonsolid
        surfaceparm trans
        surfaceparm nolightmap
        cull disable
        deformVertexes autosprite2
    {
        clampmap textures/pukka3tourney2/s1.jpg
        blendfunc add
    }
}

Another similar issue, is alphashadows. I just can't get them to work. Doesn't look like the textures which are intended to do it is letting through the light at all. But they are as far as I know properly alpha shaded.
All I can think of right now is that they are in TGA, and possibly it would require them to be in JPG?

Here is the material declaration for the alpha mapped texture.
Code:
textures/decals/grid2b
{
    qer_editorimage textures/decals/grid2_ed.jpg
        surfaceparm trans    
    surfaceparm alphashadow
    surfaceparm playerclip
       surfaceparm nonsolid
    surfaceparm nomarks
    surfaceparm nodrop
    cull none
    dpoffsetmapping - 8 match8 255
        nopicmip
    {
        map textures/decals/grid2.tga
        rgbGen identity
        depthWrite
        alphaFunc GE128
    }
    {
        map $lightmap
        blendfunc filter
        rgbGen identity
        tcGen lightmap
        depthFunc equal
    }
}
Reply

#2
Can you provide some screenshots of those light shafts inside NetRadiant? Or even better post the map-file (if you are allowed to)?

Same for the brush which should cast alpha-shadows. Make some screenshots inside NetRadiant. Which textures has the brush? You need a TGA file to allow for transparency. JPG files do not support transparency. This is a shader from Xonotic which produces alphashadows, for reference:
Code:
textures/ex2x/base-chainlink
{
    qer_editorimage textures/ex2x/base/base_chainlink.tga
    
    q3map_bounceScale  0.5
    dpoffsetmapping - 0.5 match8 204
    dpglossintensitymod  3
    dpglossexponentmod  4

    surfaceparm trans  // IMPORTANT
    cull none
    surfaceparm alphashadow  // IMPORTANT

    // also IMPORTANT:
    {
        map textures/ex2x/base/base_chainlink.tga
        alphafunc GE128
    }
    {
        map $lightmap
        rgbGen identity
        tcGen lightmap
        blendfunc filter
    }
}
Reply

#3
Thanks for taking time to help. I figured out the issue with the alpha shadows. It was apparently the editortexture that was being used as alpha map. And my texture didn't have that in the editor image. So no alpha shadows.

Still not sure what I am doing wrong with the sprites though. Those I haven't even done anything with from the original. They are just simple brushes with nodraw on all sides but one. Then the sprite texture on the last side.
Reply

#4
Ok, nice. Can you still post some screenshots? I'd like to know how the brushes are shaped and angled before I make any suggestions.

Also, this is worth sharing if you haven't already read it, from the Q3Map2 shader manual:
Quote:deformVertexes autosprite

This function can be used to make any given triangle quad (pair of triangles that form a square rectangle) automatically behave like a sprite without having to make it a separate entity. This means that the "sprite" on which the texture is placed will rotate to always appear at right angles to the player's view as a sprite would. Any four-sided brush side, flat patch, or pair of triangles in a model can have the autosprite effect on it. The brush face containing a texture with this shader keyword must be square.

deformVertexes autosprite2

Is a slightly modified "sprite" that only rotates around the middle of its longest axis. This allows you to make a pillar of fire that you can walk around, or an energy beam stretched across the room.
Reply

#5
Sorry for not responding earlier. But it turned out to be a compiler bug with my version of Net Radiant. I updated and the issue was resolved.
Reply

#6
My mistake. Seem like I am having the same issue still. Only not as prevalent as before.

You can download a copy of the map here:
http://www.doglike.org/temp/toxicity.map
Reply

#7
I had a look at your map and I'm having the exact same problem. Though I can't reproduce this in another map. I have to admit I have no idea what causes this... Sad Removing some sprites doesn't solve it (thought it may be a limitation, but it isn't). For some reason the view position and angle matters. Depending on what your view-angle to the sprite is it deforms weirdly or behaves as expected. Important to note, the sprite geometry doesn't change then (in the case of not working correctly), it is the texture that spins around.
Reply

#8
Ok. That is interesting. Not the first time I have had map specific issues where something happens with a certain map just because. Maybe if I remake the brushes from scratch.
Reply



Possibly Related Threads...
Thread Author Replies Views Last Post
  Warpzone issues / troubleshooting Notavi 9 2,318 06-08-2016, 08:04 AM
Last Post: Mario
  Shader Issues With Q3A Texture Replacement Packs Orbiter Sunblast 2 3,392 09-06-2013, 03:51 PM
Last Post: Orbiter Sunblast
Rainbow Logo Refinement, Addressing Technical Issues, Inspiring Others -z- 181 162,754 10-03-2012, 10:38 AM
Last Post: bitbomb
  Frustrating graphical issues with Netradiant, issues with textures not appearing Chromatose 16 11,846 06-15-2012, 03:22 PM
Last Post: hutty
  Netradiant issues clanclanclan 3 4,377 10-20-2010, 02:36 AM
Last Post: clanclanclan

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-