RelFexive Posted May 25, 2002 Share Posted May 25, 2002 Phew. It took some work and a lot of assistance from some very helpful people, but I got there in the end. Here's how to use shaders as light sources and put in light beams. 1> Create "mylight" directory under base/textures/. 2> Make a copy of the 8beam_blue texture from duel_wls11.pl3 (thanks guys! And Evil Lair for providing both the original texture and the shader code!! Don't forget to credit them for their hard work!) and make it white instead of blue in your favourite image manipulation application (Paint Shop Pro, PhotoShop etc). Call it 8beam_white and put this texture in your mylight directory. 3> Create a text file in base/shaders and paste the code below into it. Save it as mylight.shader. 4> Then open shaderlist.txt (in the same dir) and add mylight to it. 5> Start up Radiant and select mylight from textures menu. You should see the following textures. 6> See if it works. textures/mylight/lamp_white { qer_editorimage textures/impdetention/light_white q3map_surfacelight 6000 q3map_nolightmap { map textures/impdetention/light_white rgbGen identity } } textures/mylight/lamp_cairn { qer_editorimage textures/cairn/tracklight3 q3map_surfacelight 6000 q3map_nolightmap { map textures/cairn/tracklight3 rgbGen identity } } textures/mylight/e8beam_white { qer_editorimage textures/mylight/e8beam_white q3map_nolightmap surfaceparm nomarks surfaceparm nonsolid surfaceparm trans cull disable qer_trans 0.6 { map textures/mylight/e8beam_white blendfunc add tcMod scroll 0.3 0 } } with mucho help from Xcom in this thread You can then use these in your maps to create lights made with shaders with beams coming off them, just like in those Bubba tutorials. LAST IMPORTANT POINT: you will need to set sv_pure to 0 to see it work in the game. Normally (when sv_pure is set to 1) the server runs as a 'pure server', which only loads stuff from pak files; it will ignore your custom shaders and textures. When your map is completed you can pack up everything you need for it to work (your custom shader file(s) and custom texture(s) along with the .bsp and .arena file, plus a levelshot) into a .pk3 file and then the textures and shaders will work properly on a normal (ie. pure, sv_pure = 1) server. I just add 'sv_pure 0' to the command line of the shortcut I'm using for multiplayer. Much easier than typing it in every time. Again, thanks to Xcom for this info. And cheers to fabrikashon for all the beam help too. And now.... the results of all the hard work! A simple shader light and beam A not-so-simple light and beam Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.