Lightmapping
Blitz3D Forums/Blitz3D Programming/Lightmapping
| ||
Is there a good resource out there on how to do lightmapping. I'm not interested in an editor that has lightmapping. I would like to code the renderer myself into my program, or use a library for it. Any ideas? |
| ||
Might be a good place to start : http://www.blitzbasic.com/codearcs/codearcs.php?code=514 :) |
| ||
Look for YAL in the Code Archives. Oh wait, that's what Smiff linked to. Yeah, that's what you want. |
| ||
Wow the code in the archive is amazing! I'm having a weird problem implementing it though. It seem to render and apply the light brightness to the surface, but it doesn't seem to be capturing the shadows. My program has gotten pretty large, so I wouldn't be shocked if it was just something dumb I did. Has anyone run into this using this lib? |
| ||
http://freespace.virgin.net/hugo.elias/ <---- has a good article about radiosity lightmapping if your interested in doing realistic lightmapping. |
| ||
but that way explode every polygons... i dont like it |
| ||
Craig, at the LightMapMesh() function comments: - The world objects must have EntityPickMode() set to produce shadows. Akat, It explodes the poly's but weld it back again after the process. |
| ||
Wow, that's it! Thanks a bunch! You guys rock! |
| ||
Hey, I have a question. Is the entitypick command slow? I'm considering using it as a sort of line of sight system. |
| ||
Relatively slow. But that just means you shouldn't call it too many times in a single frame. If you only need to check line of sight for one character (or only a couple at most) then you don't have any problem. For lots of characters don't check line of sight for all of them in the same frame. Instead stagger the checks; only check line of sight for a couple characters every frame. Assuming you have a high enough framerate (ie. playable) nobody will notice that the checks are staggered. To put it in perspective, I check line of sight using LinePick (essentially the same as EntityPick) four times per frame and there's little framerate hit. |