Unity Lightmapper free for all.

Hi all that

Everyone should know that you can’t make a big scene/level by only using dynamic shadows unless you got a mega ultimate machine.
Yes, I know Crytech, Unreal Tech and Geomerics have done some awesome coding… but their tech costs $250000

Quake 1 engine(1996) has it
Unreal(1996) has it
Serious Sam engine too
even Torque game engine has it

I’m talking about a built-in lightmapper / lightmap-baker
Any speed concious game developer should consider this.

So I thought I’d make a lightmapper for Unity in the hopes that it’d send some signals here and there…
“OTEE”
I don’t wanna wait for GFX cards w raytracer chips, it could take years still.

I hope someone eventually might optimize this script… like, adding a super fast vector reflection math or raytracer that is just accurate enough for the purpose - speed contra precision, etc.
If geomerics can do it real-time, that means the proper code can speed up this tool so indirect light calculations become cheaper.

Anyways, here is the stuff.
I attached the Unity Package at the bottom of the page.

First up.
Here is a lil tutorial on the use of it,:

MEGATON

Lightmap textures must be imported to either of: ARGB32bit, RGB24bit, Alpha 8bit

PRESS PLAY TO RUN LIGHTMAPPER

.
ENJOY
.

66999–2480–$megatonlightmapper_176.unitypackage (148 KB)

WOW!

This will be very usefull for a lot of users, thank you very much.

This looks awesome. Cant wait to get home to try it out. Thanks Megaton.

Frank

This will definitely come in handy. Maybe no more booting back to windows for a simple static lightmap tweak. Excellent!

I too can’t wait to get home and try it out.

This is seriously impressive Sam! Thank you so much for donating this. Want to migrate this to the Unify Wiki?

And you’re supposed to be an artist :slight_smile:

d.

Great! thanks so much good work :smile:

If I use a higher res texture for the lightmapper material (say, 1024 or 2048), will the final lightmap output be higher detail? (Could you post a screenshot of this?) Does this technique take colored lighting into account? Is the reflected light option similar to final gather or radiosity lighting? (Screenie pls?) Does this only work with point lights or does it also work with directional and spot lighting?

Thanks for making this, this is really great. Would be awesome to write a script or something to simplify it; I will look into it.

I was working on a lightmapper using a similar technique while in copenhagen, except mine casts a ray from each texture pixel instead of casting a bunch of rays from the light. I saw this post and had to bring it out. It needed a little bit of fixing to work well and I wasn’t able to figure it out before but now I know how and it works pretty well:

67268–2493–$lightmapbyray_170.zip (72.6 KB)


With that kind of access, you could almost do something like this:

http://www.humus.ca/index.php?page=3D&ID=69

Thanks ya’llz. :slight_smile:

With the lightmapper I won’t need to bounce back and forth between external lightmapper and Unity. And having 20+ scenes with 50+ static objects per scene + lightmap-render time per object, I bought myself alotta time on this project. :twisted:

I’m not a programmer so this lightmapper is not the mega-asskicker I had hoped it to be.

This lightmapper will soon be eating dust from Talzors upcoming lightmapper. Its based on the same method as MegatonLightmapper. But its faster, userfriendly and mimics Unity point lights accurately. Let this be the teaser for “TALZOR’S ASSKICKING LIGHTMAPPER!”
Better to post Talzors lightmapper on Unify Wiki instead of this one.

I am an artist… but at night I roam the realm of ones and zeros and spread chaos.

  • or -
    A cg artist creates graphics. A cg artist + programmer creates videogames.
    :smile:

If you use a higher texture size you will need to set a higher “RaysPerDegree”
If combining higher raycasting settings with lightbounces you should, after about 15minutes, be able to fry an egg on top of your computer.
Theoretically, the end result would be a very nice looking lightmap. I haven’t had the patience to check it out.
It only works with pointlights and so far there are no plans for adding other light types.

This is a Raytracing Radiosity Lightmapper. :idea:

You can definetly shave off 10%-70% of the baking time tracing from texture pixel.
As I mentioned earlier, I’m not a programmer so I can’t imagine the huge ammount of work involved. How will indirect lighting be generated?

As I promised MEGATON I’ve adden a simple LightMapper to the wiki at:
http://www.unifycommunity.com/wiki/index.php?title=LightMapper
Hate it, love it , ignore it… The choice is yours :-).

Attached example took ~3:20 to render and could probably be a lot faster with lower settings without affecting the quality much.


Thanks, Talzor. Nice and succinct. I look forward to using it.

Megaton : Thank you so much !
Talzor : I love it !!! Awesome…

Very nice job :smile:

Mine achieves bounce light by shooting a few rays from each texel and then by using a bunch of fancy image based techniques (Read: Blur the hell out of it) it makes a nice soft result. Ambient occlusion is calculated using the same rays.

You can see some bounce light from the green light in the picture I posted before.

Hi

I am eager to try Talzor’s lightmapper - has anyone got it to work?

I copied his script and put it in my Editor folder - but no lightmap wizard appeared under GameObject

thanks

same as Reset… with no pictures in the first post anymore, i cant figure out how to use this script.

any help ?

thanks

PARADOKS

I wan´t to use this too, but how?

This requires Pro, right?