K-Rad for win32 Intro ----- K-Rad is a lighting program for quake based upon a diffuse lighting model called radiosity. This program was developed because John Carmack at id software made a program called qrad that performs quake lighting with radiosity. It is my understanding that qrad will not be available until quake2 is released. Since its not running on my desktop, I have taken matters into my own hands and developed my own version. Please not that K-Rad in its present form really sucks. Thats why I called the zip SuckRad. This is an extremely alpha, probably pre-alpha release. Here is a list of the shortcomings of the program: -Fixed matrix size. Only handles 1732 surfaces. So larger levels are not gonna work. I chose this value because it consumes about 12Mb of ram for the 16Mb that is on my home computer. -No use of the PVS. I plan on working on LeetVis 2.2 in tandem with K-Rad very soon. This will allow me to optimize both a little more and get rid of nonvisible areas being lit. -The Matrix and Post programs crash upon exit. Yes they do finish the job but there is a hanging pointer or something that causes the programs to crash with a page fault or illegal instruction. Just continue as if nothing happened.. its alpha after all. -Supports only type 1 lightmaps. No flickering lights at this point. I had to learn how to write out the lightmaps on my own and had more to worry about than just flickering lights. -Makes no use of the light entities. This is something I would like to implement because it lends to raytraced form factors which means radiosity is calculated right on the vertices of patches. This will mean more energy propogation in the world and it will be easier to interpolate all of the light texels consistantly. -Very little or no light propigation. The method I use for calculating the dispersion of energy in the level is extremely cheesy. But that will improve very soon. Expect the fantastic lighting you have heard about not to happen. -No patch subdivision. Typically radiosity programs mesh up the scene into pieces. I tried that before and ended up with enourmous arrays so I chose to forgo that for now. Perhaps I will just interpolate values from the vertex radiosities instead to reduce memory usage. -Dosent have that cool sun/moon lighting model that id's qrad does. That would be very cool. I know its not hard to do either so it will probably be in one of the new builds of k-rad. Why did I do it if it sucks so much? Mostly to show that it could be done. Quake is a cool game and I expect mucho better tools to be coming out for it any day now once we stop thinking of what John Carmack has already done and start working on our own tools. I coded this thing in a day. Mostly bored at work. Then I went fishing. So please dont expect too much from this. I put very little effort into it and it shows. Perhaps in a week or so I will improve the code to get rid of a lot of the limitations and bugs. Previously I was working on a similar radiosity program for quake but it was based upon a progressive refinement approach. (It had the advantage of working in a small memory platform much more effectively. Absolutely no problem lighting very large levels on a 16Mb machine) Now that I have tried both ways I will probably release the other program as well next time. Care and feeding ---------------- K-Rad is pretty easy to use. Generally you will just run it like this: K-Rad filename.bsp The batch file takes care of everything... sorta To allow the user greater control of which textures K-Rad uses and for greater control of the way the program operates, a doom type response file or an ini file may be used. But that is for a future version. Currently the program uses textures beginning with the following names for lights: sky *lava light tlight Errors, Problems, Questions --------------------------- Just a couple of quick explainations: First of all it is unfortunately impossible to light water, sky, or lava brushes. Indeed I have heard that you cannot light any brush with a texture beginning with *. The reason being that those brushes have no surface cache. (This error is temporarily removed. It will be back) Q: What is this No lighting textures found error? A: Exactly what it says. The level to be lit has none of the textures that K-Rad uses as lights. Q: I want to port the code over to another platform. Can I have it? A: I really doubt it. If I decide to make versions for linux and other platforms then I will probably have certain people I already know do it. Q: Why isnt K-Rad using the lights I put in my level? A: K-Rad does not make use of light entities. They are point sources that tend to have specular reflections. In a later version I will try to deal with both specular and diffuse surfaces. For now K-Rad just uses the lighting textures for light. Q: How do I make K-Rad use blinking lights? A: You dont. Since the lighting textures are not user defineable yet the ability to use multiple lightstyles is pretty useless. Whats Next? ----------- Features for K-Rad: - Definately I will be extending the lighting model of K-Rad to handle both diffuse and specular patches. This will mean that wood will have a dull lighting and metal will reflect back brightly. -I may explore using conformal mapping and some finite element techniques to produce swirly textures and stuff like that in a mapping. -Definately will have to implement the use of shadow volumes prior to element subdivision. Then I can have cool umbra and penumbra effects. -Will try to give the user more control over the textures used for lighting. Probably in an ini file of some kind. Also the lights would be able to have different styles. Please send any suggestions you might have for new versions of K-Rad or any of my other software to my email address listed below: Complaints, Concerns, Comments, etc... -------------------------------------- They all go to vile@grassy.nol.net or /dev/null depending on how angry you are at me ;) Seriously though, PLEASE send me any comments or suggestions. I would like to bring you the absolute best lighting tool ever. Thank you. Thanks and greetz ----------------- Thanks to GOD or else we wouldnt be here. Thanks to my wife for putting up with her husband spending hours coding instead of having a life. Also thanks go out to iD software because they love us almost as much as He does ;-) Also I would like to thank Billy Zelsnack for his putting up with me and being such a great help in my other projects. Special greets to Dave Taylor, Ken Baird, and Trey Harrison at crack.com, Ryan Geithman at bossgames, Steve T. at Rogue, Tom,levelord, and Judas at Hipnotic, DaBug from Ion Storm, kd from Ravensoft, and Whaleboy from Apogee, FragMastr, David Kirsh (Zoid), and all my wonderful friends on irc. Starving Coder Standard Beg for dollars section ----------------------------------------------- Non-beta K-Rad is FREEWARE. Use it and give it to your friends. (This does not apply to the beta). If you like the program please give to a worthy charity such as Feed the Children, the Red Cross, the Salvation Army, or a local church. standard disclaimer ------------------- If this program causes your computer to have problems in any way, whether it explodes or loses its cmos or whatever, its not my fault. By reading this and using my program you understand and acknowledge this disclaimer. All issues with the software not working properly and all responsibility for damages lie solely with the user.