Xonotic Forums
Shader Noob - Fire Shader Help - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Creating & Contributing (https://forums.xonotic.org/forumdisplay.php?fid=10)
+--- Forum: Xonotic - Editing and Concept Art (https://forums.xonotic.org/forumdisplay.php?fid=11)
+--- Thread: Shader Noob - Fire Shader Help (/showthread.php?tid=1030)



Shader Noob - Fire Shader Help - top_cat - 09-25-2010

Hi guys,
I am a noob to any kind of shader and I'd like to create a fire shader. How do I go about doing this?

Thanks very much.


RE: Shader Noob - Fire Shader Help - MintOX - 09-25-2010

(09-25-2010, 10:26 AM)top_cat Wrote: Hi guys,
I am a noob to any kind of shader and I'd like to create a fire shader. How do I go about doing this?

Thanks very much.

Fire is just going to be a series of animated textures. Make 4 or more .jpg or .tga files that look like flame. Anything you do in black will be transparent. Make each one look slightly different to give the illusion of the flame flickering. Then write your shader like this:

textures/fire/fire
{
nopicmip
qer_editorimage textures/fire/fire1.jpg
q3map_lightimage textures/fire/fire1.jpg
surfaceparm trans
q3map_surfacelight 600
cull back
qer_trans 0.5
surfaceparm nomarks
{
map textures/fire/fire.jpg
animmap .2 textures/fire/fire1.jpg textures/fire/fire2.jpg textures/fire/fire3.jpg textures/fire/fire4.jpg
}
}

animap will animate fire(1-4) over and over again. the .2 is the delay between each frame. Play with this until you get the speed you are happy with.


Cheers!


RE: Shader Noob - Fire Shader Help - Roanoke - 09-25-2010

Either that or use a func_pointparticles entity (this will likely look much better).


RE: Shader Noob - Fire Shader Help - GreEn`mArine - 09-26-2010

I was meaning to ask this for a long time anyways... where is the place to look for a reference that explains all these keywords (found in effectinfo.txt or the quote above) ? Is that official OpenGL stuff, or Quake-engine specific?


RE: Shader Noob - Fire Shader Help - Mr. Bougo - 09-26-2010

http://dpwiki.slipgateconstruct.com/index.php?title=Effectinfo_Scripting_Reference
http://www.kot-in-action.com/q3map2/shader_manual/


RE: Shader Noob - Fire Shader Help - GreEn`mArine - 09-26-2010

Thanks a lot!