Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How would i create glass textures?

#1
Hello I have a texture that I want to make a blueish tinted glass so that I can use it in my map but I don't know how...
Reply

#2
1) Make blue texture: textures/customname/blue_glass.jpg
2) Make an alpha texture for this: A greyscale image where white is opaque and black fully transparent. So for a blue glass you go with some grey textuer and name it textures/customname/blue_glass_alpha.jpg
3) I dont know if you need that but the chance is there: scripts/yourshader.shader and in it:
Code:
textures/customname/blue_glass.jpg //path and name to use in the mapeditor
{
qer_editorimage textures/customname/blue_glass.jpg //image you see in mapeditor
surfaceparm trans //tell the engine it's trans

{ //first draw step, the image:
map textures/customname/blue_glass.jpg //image
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA //multiplies blue_glass with its blue_glass_aplha and adds the stuff visible behind your glass with 1-blue_glass_aplha(for each pixel)
rgbgen identity //I think this is also implicit here but im not sure... guess it takes itself for the color generation
}

{ //draw the lightmap ontop
map $lightmap //$lightmap is a reference
rgbGen identity
tcGen lightmap //i think this is to get the right positions from the lightmap
blendfunc filter //forgot what this does
}
}

Heres more on shaders: http://toolz.nexuizninjaz.com/shader/

And heres a tetureset I quickly made that has exactly what you need: https://www.mediafire.com/file/v2j61zwc2...s.pk3/file
(search for uniform_mats/glass_b)
The enamel textures included are slick/ice.

On that occasion I posted it to another thread with pictures... only grey-glass visible though: https://forums.xonotic.org/showthread.ph...4#pid84014
Reply

#3
(10-28-2018, 03:14 AM)_para Wrote: 1) Make blue texture: textures/customname/blue_glass.jpg
2) Make an alpha texture for this: A greyscale image where white is opaque and black fully transparent. So for a blue glass you go with some grey textuer and name it textures/customname/blue_glass_alpha.jpg
3) I dont know if you need that but the chance is there: scripts/yourshader.shader and in it:
Code:
textures/customname/blue_glass.jpg //path and name to use in the mapeditor
{
qer_editorimage textures/customname/blue_glass.jpg //image you see in mapeditor
surfaceparm trans //tell the engine it's trans

{ //first draw step, the image:
map textures/customname/blue_glass.jpg //image
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA //multiplies blue_glass with its blue_glass_aplha and adds the stuff visible behind your glass with 1-blue_glass_aplha(for each pixel)
rgbgen identity //I think this is also implicit here but im not sure... guess it takes itself for the color generation
}

{ //draw the lightmap ontop
map $lightmap //$lightmap is a reference
rgbGen identity
tcGen lightmap //i think this is to get the right positions from the lightmap
blendfunc filter //forgot what this does
}
}

Heres more on shaders: http://toolz.nexuizninjaz.com/shader/

And heres a tetureset I quickly made that has exactly what you need: https://www.mediafire.com/file/v2j61zwc2...s.pk3/file
(search for uniform_mats/glass_b)
The enamel textures included are slick/ice.

On that occasion I posted it to another thread with pictures... only grey-glass visible though: https://forums.xonotic.org/showthread.ph...4#pid84014
[DISREGARD]No, It didn't work its still like a wall so unless I messed up the code :/

I fixed the error.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [NEED HELP] Custom NetRadiant Textures / Textures Not Loading 3agle427 3 3,948 09-03-2021, 01:40 PM
Last Post: HIBANEZ
  Help, how I create a new texture for mapping? derrant 9 4,874 09-02-2021, 05:08 PM
Last Post: ballerburg9005
  Textures: evillair's eU Texture Set Julius 1 1,716 11-27-2020, 12:29 PM
Last Post: Julius
  Textures: Xonotic Items as decals Julius 1 1,922 05-14-2020, 03:03 PM
Last Post: Garux
  Textures: Techy Julius 6 3,387 01-12-2019, 09:05 AM
Last Post: Julius
  Textures: Julius's Light Beams Julius 2 2,371 01-11-2019, 08:30 AM
Last Post: Julius
  Textures: Tabun Decals Julius 2 2,866 12-16-2018, 09:22 AM
Last Post: Julius
  Textures: Nobiax Impacts Julius 0 1,737 12-07-2018, 02:53 PM
Last Post: Julius
  Having trouble getting transparent textures to work Notavi 5 2,889 07-17-2018, 07:39 AM
Last Post: Notavi
  I need help with textures. [Solved] TapX 5 4,164 05-11-2018, 02:22 PM
Last Post: Julius

Forum Jump:


Users browsing this thread:
1 Guest(s)

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