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




-
[Image: 62416.jpg]
Reply

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



Possibly Related Threads...
Thread Author Replies Views Last Post
  Textures: Techy Julius 6 1,111 01-12-2019, 09:05 AM
Last Post: Julius
  Textures: Julius's Light Beams Julius 2 905 01-11-2019, 08:30 AM
Last Post: Julius
  [NEED HELP] Custom NetRadiant Textures / Textures Not Loading 3agle427 2 1,207 12-30-2018, 09:21 AM
Last Post: 3agle427
  Textures: Tabun Decals Julius 3 1,041 12-17-2018, 05:05 AM
Last Post: Lyberta
  Textures: Nobiax Impacts Julius 0 669 12-07-2018, 02:53 PM
Last Post: Julius
  How would i create glass textures? Molnija 2 999 10-28-2018, 01:07 PM
Last Post: Molnija
  Having trouble getting transparent textures to work Notavi 5 1,191 07-17-2018, 07:39 AM
Last Post: Notavi
  I need help with textures. [Solved] TapX 5 1,776 05-11-2018, 02:22 PM
Last Post: Julius
  NetRadiant - Some Textures Working / Some Not Notavi 1 1,970 05-16-2016, 03:50 PM
Last Post: Beagle
  Textures not showing in NetRadiant munyul 10 5,294 10-26-2015, 04:59 AM
Last Post: Smilecythe

Forum Jump:


Users browsing this thread:
1 Guest(s)

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