19,903
edits
m (marking dead link) |
m (link fix) |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
==Lightmaps and Oni== | ==Lightmaps and Oni== | ||
Oni doesn't really support light maps, but we like to pretend that it does. See [ | Oni doesn't really support light maps, but we like to pretend that it does. See [[:Image:Lightmap particle sorting issue 1.jpg|HERE]] for why we do and [[:Image:Lightmap particle sorting issue 2.jpg|HERE]] for why we shouldn't. | ||
In these screenshots, the light maps are part of the environment. They form a second layer of quads over the normally textured ones, but they have their own texture coordinates, and they have their own unique texture. This shadow texture has a much lower resolution than the regular textures, but that is not a problem because the large pixels are also blurred-out: that's how light maps are usually done anyway. The only problem is... well, there are two problems. | In these screenshots, the light maps are part of the environment. They form a second layer of quads over the normally textured ones, but they have their own texture coordinates, and they have their own unique texture. This shadow texture has a much lower resolution than the regular textures, but that is not a problem because the large pixels are also blurred-out: that's how light maps are usually done anyway. The only problem is... well, there are two problems. | ||
| Line 20: | Line 20: | ||
The tool that does all that is Blender. The task is not exactly "mainstream", so there is not much support for it, but the ingredients are there. Here they are: | The tool that does all that is Blender. The task is not exactly "mainstream", so there is not much support for it, but the ingredients are there. Here they are: | ||
#[https://vi-wer.de.tl/Lightmap-Tutorial.htm A tutorial for the "Lightmap UV Pack" script]. The good thing about this script is that it can batch-process several meshes at once. The bad thing is that for every mesh, it packs the UVs into a single texture, so for large or detailed meshes meshes either the lightmap will be pixellated, or you need to make the texture's resolution huge. | #[https://vi-wer.de.tl/Lightmap-Tutorial.htm A tutorial for the "Lightmap UV Pack" script]. The good thing about this script is that it can batch-process several meshes at once. The bad thing is that for every mesh, it packs the UVs into a single texture, so for large or detailed meshes meshes either the lightmap will be pixellated, or you need to make the texture's resolution huge. | ||
#[https://blenderartists.org/forum/showthread.php?t=128467 An alternative Multi Lightmapper script], which generates new textures as needed, but can only process one mesh at a time. | #[https://web.archive.org/web/20080917030026/http://blenderartists.org/forum/showthread.php?t=128467 An alternative Multi Lightmapper script], which generates new textures as needed, but can only process one mesh at a time. | ||
#Some more scripts for the batch processing of many meshes (<nowiki>https://forum.unity3d.com/viewtopic.php?t=36467</nowiki>, dead link) (e.g. for saving the generated textures to files; neither of the above scripts save the baked lightmaps, and since there can be hundreds of them, automatic saving is badly needed). | #Some more scripts for the batch processing of many meshes (<nowiki>https://forum.unity3d.com/viewtopic.php?t=36467</nowiki>, dead link) (e.g. for saving the generated textures to files; neither of the above scripts save the baked lightmaps, and since there can be hundreds of them, automatic saving is badly needed). | ||
No tutotial of our own, for now, but if you want to experiment with this, you can. | No tutotial of our own, for now, but if you want to experiment with this, you can. | ||
| Line 29: | Line 29: | ||
:You can also see that my current GFX card (or, rather, lack thereof) is ''not'' OK (there's no anisotropic filtering, and the texture detail decreases very fast with camera distance). | :You can also see that my current GFX card (or, rather, lack thereof) is ''not'' OK (there's no anisotropic filtering, and the texture detail decreases very fast with camera distance). | ||
:This means that no matter how good the lightmaps are, the screenshot session that I had planned will probably look crappy if done on my current rig. I should've known that. F##k. | :This means that no matter how good the lightmaps are, the screenshot session that I had planned will probably look crappy if done on my current rig. I should've known that. F##k. | ||
[[Image:Lightmapped monitor bank.jpg]] | |||
:Tomorrow (Tuesday) there will be some time for Konoko to upload some screenshots from Monday's errands. | :Tomorrow (Tuesday) there will be some time for Konoko to upload some screenshots from Monday's errands. | ||
For now, here are the instance files of the above test (level5), for | For now, here are the instance files of the above test (level5), for | ||
| Line 39: | Line 40: | ||
==Catch him Konoko== | ==Catch him Konoko== | ||
:This is the "blue" area of the Syndicate Warehouse, the one with the first [[Comguy]] and [[ | :This is the "blue" area of the Syndicate Warehouse, the one with the first [[Comguy]] and [[Data console#Alarm consoles|alarm console]]. | ||
[[Image:Lightmapped Warehouse.jpg]] | |||
:The lightmaps are mostly OK, but "mostly" is not enough, as you can see for yourself: [http://geyser.oni2.net/edition/levels/examples/lightmaps/C1SP3/level5_C1SP3.zip PC], [http://geyser.oni2.net/edition/levels/examples/lightmaps/C1SP3/level5_C1SP3MacIntel.zip Intel Mac], [http://geyser.oni2.net/edition/levels/examples/lightmaps/C1SP3/level5_C1SP3MacPPC.zip PPC Mac]. (WARNING: It requires globalized environment textures, so it will NOT work with the current [[AE]], only with the previous one). | :The lightmaps are mostly OK, but "mostly" is not enough, as you can see for yourself: [http://geyser.oni2.net/edition/levels/examples/lightmaps/C1SP3/level5_C1SP3.zip PC], [http://geyser.oni2.net/edition/levels/examples/lightmaps/C1SP3/level5_C1SP3MacIntel.zip Intel Mac], [http://geyser.oni2.net/edition/levels/examples/lightmaps/C1SP3/level5_C1SP3MacPPC.zip PPC Mac]. (WARNING: It requires globalized environment textures, so it will NOT work with the current [[AE]], only with the previous one). | ||
:The most remarkable thing is that some quads are either black or very dark. Sometimes they stay out of the way of radiosity iterations, but sometimes it's the texture-baking part that ignores them. The first problem can (apparently) be solved by separating the level into even smaller parts than what you see here (for example, the staircases can be lightmapped separately, to compensate for the large number of smallish quads). The second problem can (apparently) be solved by baking to very large textures (1024x1024, 2048x2048 etc) and then downsampling the result. A third solution would be for the lightmaps to use another background color than black, so that all the abnormally dark quads would get some default brightness (probably normal-looking enough to the casual eye). I rather like that last solution best, because it's quick and dirty, and I'm getting sick enough of lightmapping as it is ^_^ | :The most remarkable thing is that some quads are either black or very dark. Sometimes they stay out of the way of radiosity iterations, but sometimes it's the texture-baking part that ignores them. The first problem can (apparently) be solved by separating the level into even smaller parts than what you see here (for example, the staircases can be lightmapped separately, to compensate for the large number of smallish quads). The second problem can (apparently) be solved by baking to very large textures (1024x1024, 2048x2048 etc) and then downsampling the result. A third solution would be for the lightmaps to use another background color than black, so that all the abnormally dark quads would get some default brightness (probably normal-looking enough to the casual eye). I rather like that last solution best, because it's quick and dirty, and I'm getting sick enough of lightmapping as it is ^_^ | ||