Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Textures: Xonotic Items as decals

#1
Julius Xon-Items Decal Set


       File: j-xon_items_v1.0.zip
License: GPL v2
 Author: Xonotic & Julius

This is a small set comprised of 48 decal textures made from some SVG source files taken from Xonotic.


   


   


   


The shader for every texture is like this:


Code:
textures/j-xon_items/i_armor
{
    qer_editorImage textures/j-xon/items/i_armor.tga
    qer_alphaFunc gequal 0.5

    polygonOffset
    noPicMip

    //q3map_vertexScale 0.75

    surfaceparm trans
    surfaceparm nonsolid
    surfaceparm pointlight

    {
        map textures/j-xon/items/i_armor.tga
        rgbGen vertex
        // (source * alpha) + (dest * (1 - alpha))  <= Alpha blend
        blendFunc blend
    }
}


Some words related to the shaders:

  - Lighting method: VERTEX-LIT

    “surfaceparm pointlight” and “rgbGen vertex” shader directives are used to set these textures to be
    vertex-lit so they are faster to render because no lightmaps are used. Keep in mind that no lightmaps
    means no shadows are cast on these surfaces.


  - Some explanations for other shader directives:

    polygonOffset                                  ;this avoids z-fight rendering the texture separated from the surface.

    noPicMip                                          ;this ignores the gl_picmip cvar (textures resolution).

    q3map_vertexScale N.N                ;this is a multiplier for the sampled light at vertices. Understand it as
                                                                a way to increase or decrease the amount of light hitting the surface.

    surfaceparm trans                          ;this does not set transparency. It sets the surface to no VIS-blocking,
                                                                no Shadow casting (*1) & no Bounced light (*2).

      (*1): It cast shadows if accompanied with "surfaceparm alphashadow". The alpha-channel image will be
               the shadowcaster.

      (*2): I do not understand why Bounced-light is disabled here. It doesn't make sense to me. Note that I'm
               not a coder so I can't read q3map2 sources to know what this directive does exactly.

    surfaceparm nonsolid                     ;this disables the collisions with players and projectiles
    surfaceparm pointlight                    ;this forces vertex lighting for this surface

    {
    blendFunc blend                              ;alpha blend
    }

    "blendFunc blend" is the equation that tells the game engine how it should mix the different graphical
    layers:

      - equation:    (source * alpha) + (dest * (1 - alpha))
      - explicit:        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
      - shorthand:  blendFunc blend

      "souce" represents the texture itself.
      "alpha" is the black & white mask contained in the alpha-channel.
      “dest” is the content of the frame-buffer (the background image with which to blend the texture).

      More info from the shader manual: blendFunc


Ok, that's all for now. Any comment will be really appreciated. Wink




-
Reply

#2
Quality stuff, looks usable even out of Xonaughtic lore.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [NEED HELP] Custom NetRadiant Textures / Textures Not Loading 3agle427 3 4,685 09-03-2021, 01:40 PM
Last Post: HIBANEZ
  Textures: evillair's eU Texture Set Julius 1 2,194 11-27-2020, 12:29 PM
Last Post: Julius
  Textures: Techy Julius 6 3,955 01-12-2019, 09:05 AM
Last Post: Julius
  Textures: Julius's Light Beams Julius 2 2,695 01-11-2019, 08:30 AM
Last Post: Julius
  Textures: Tabun Decals Julius 2 3,323 12-16-2018, 09:22 AM
Last Post: Julius
  Textures: Nobiax Impacts Julius 0 1,995 12-07-2018, 02:53 PM
Last Post: Julius
  How would i create glass textures? Molnija 2 2,980 10-28-2018, 01:07 PM
Last Post: Molnija
  Having trouble getting transparent textures to work Notavi 5 3,468 07-17-2018, 07:39 AM
Last Post: Notavi
  I need help with textures. [Solved] TapX 5 4,839 05-11-2018, 02:22 PM
Last Post: Julius
  NetRadiant - Some Textures Working / Some Not Notavi 1 3,508 05-16-2016, 03:50 PM
Last Post: Beagle

Forum Jump:


Users browsing this thread:
1 Guest(s)

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