Unity External Lightmapping Tool

background4

[ The project is outdated and will not be updated due to changes in Unity3 ]

- What does it do?

It allows you to create pretty lighting for scenes that you put together in Unity.

- Where do I download this?

New version for Unity 3, note: NO support for .EXR lightmaps

- How to use it?

  1. Unpack it and import the unitypackage to your project.
  2. Set all the objects that you want to be lightmapped to static (as in beast lightmapping)
  3. Use lightmapping resolution from beast lightmapping window to setup resolution and scale on lightmap per object
  4. Export it and bake it in max using menu: Windows->External Lightmapping Tool (at first use it will ask for the location of 3dsmax or maya)
  5. After lightmapping come back to unity to see the results (remember to set auto-refresh ON or do refresh manually)

What this version lacks?
It doesn’t support lightmap format .EXR, I need to increase my knowledge before further developing if someone has experiance of rendering to .EXR files over maxscript, and would like to help please contact me.

[archived - valid with Unity 2.5 version]

-Download

Old classic version for Unity 2.5

- How does it work?

Check out the video below.

(With 3dsmax)

(With Maya on Windows)

(With Maya on Mac)

- Great, that shows how it works, but do you have something that actually looks pretty?

Yeah, take a look at what beta user Joachim Barrum made while testdriving this.  Below is a video of that project. You can download the entire project folder here

- Is this tool free?

Yes, it is the result of Unity’s Summer Of Code 2009 program, and is freely available to anyone to use.

- What do I need to be able to use this?

  • 3dsmax 2008 or higher – could possibly work on older versions, but no promises there.
  • maya (not fully tested and still in beta, but should work on both MacOSX and Windows)
  • 3dsmax service packs should be installed (there is a know bug in mental ray from 3dsmax 2009 design )
  • newest FBX importer 2010.2 (the older versions have numerous bugs when importing fbx ascii files)can be downloaded from http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=10775855
  • The tool works good on both Unity indie and Unity pro – although currently the indie version doesn’t support UV previews – so if your UV’s are overlapping and you don’t have Unity pro then the tool will not recognize it and won’t show you the overlapping places.

- But I don’t have 3d studio max and maya.

With some manual work, you could also make this system work for other authoring packages. The tool exports a fbx file, completely setup with uv’s. You could import that fbx into your application of preference, and have that appication render a lightmap. The only part you’d be missing is the tight integration where the lightmap automatically gets saved in the right location, the fact that in max I made you a nice “Bake Now” button, etc.

- I am really curious about the nitty gritty details of how this works under the hood

Checkout my under the hood page, where I explain in more detail what’s going on in the inner workings of the system.

- So I tried making a lightmap, but am having trouble with this or that

Check out the common problems page, where I’ve listed some problems people run into while creating lightmaps in 3d studio in general. Hopefully your problem is one of those.


123 Responses to “Unity External Lightmapping Tool”

  1. 1 pipes

    Hi great application but not working for me in 3dsmax 2010 32 bit

    Please see my post on the Unity Forum

    http://forum.unity3d.com/viewtopic.php?p=236178#236178

    cheers

    great app though

  2. 2 ritonv

    Hi,

    Your tools seems very interesting for 3dsmax users like me but…i’ve been searching for basic installation documentation, and found nothing.
    Thanks

  3. There’s no installation required. The you just need to download the .unitypackage and open it while having your Unit project opened.
    After that you’ll find instuctions in the video tutorial.

  4. 4 Xin

    Hi, Just had another test ,the light maps rendered by vray don’t any shadows, why is that ?

    Thanks

  5. I don’t know if this helped you:

    http://masteranza.wordpress.com/2009/07/21/project-no-3-unity-vray-tools/#comments

    you can always catch me on skype: masteranza

  6. Hello!
    Thank you for developing Unity External Lightmapping Tool!
    I actively use 3dmax 2009sp1 and vray-sp2 for preparing content for unity and this tool would be just perfect except one little thing.
    Can you explain how to correctly use mapper, to have not vray_raw_totallightingmap, but vray_totallightingmap in png file?
    The thing is that in vray_raw_totallightmap – hard shadows and hard highlights are totally lost – and the result is rather strange in unity. The shadows become a light and disappear…

    The actual question:
    Can you provide choosing baked slot in 3dmax module in, for example, autobake rollout.

    Thanks!
    Sincerely yours, Unity External Lightmapping Tool users.

  7. It’s because the materials in max have to be converted to ‘vray materials’ before lightmapping with vray.
    To do that:

    1. select all objects
    2. press ‘Batch Convert Materials’
    3. choose ‘selected objects’ and pick ‘Vray materials’
    4. Convert

  8. 8 Sarveen

    Hi!
    Just introduced your tool to my 3d team, and they was impressed. :) Thank you!

    They have just one complain about it: when rendering lightmap with Mental Ray distributed render doesn’t work, so we can use only one computer for rendering, and it’s a slow process. Can it be made working somehow?

    Thanks!

  9. Hi!
    I’m not much into distributed rendering, but if you’ve been using Render To Texture with it before, then my tool should work with it too.
    It’s because, when you click the button called “Bake selected now!” the system adds an object to render in RTT window, so right after the system starts rendering you can cancel it and see the object added to the RTT list. From there you’re free to tweak it and bakie it using Distributed Rendering as you used to do before.

    If that’s too much additional work, then you can talk with me on skype, and we’ll figure out some shorter way.
    Thank you for your feedback.

  10. 10 menegat

    This tool is very great,

    But i´m having a little problem whith the uv´s.
    When the Unwrap it´s done on max, I receive the message on the ELT “the uv map will not normalize.” Than i cant export to max.

    Seems like the inverse process.

    When i dont do the unwrap i cant set my textures wherever i want.

    any help?

  11. Check whenever you don’t have enabled “swap uv” option in Unity Importer.
    You can also try to close and reopen ELT window after unwrapping it should get refreshed.

  12. 12 geo

    This is cool! I saw all the vids in vimeo. Can’t wait to try it out. This Vray-Unity tools is the same as this tool?

  13. Vray-Unity tools were the idea presented on Unity Summer of Code and it transformed into External Lightmapping Tool which is available here.
    I believe that’s much cooler than the original idea. ;)

  14. 14 geo

    http://vimeo.com/6369721 this video does not work

  15. That’s right, thanks, currently I can’t find a copy of the video, I’ll try to make a new one including Maya soon.

  16. 16 Alex

    Hi,
    Excellent tool but I am having problems.
    Can you tell me what can I do about this msg:

    NullReferenceException
    CalcArea.CheckIfNormalized (UnityEngine.MeshFilter temp) (at Assets\LightmappingTools\Editor\CalcArea.cs:53)
    LightmappingTool.LoadObjects () (at Assets\LightmappingTools\Editor\LightmappingTool.cs:166)
    LightmappingTool.ExportFBX () (at Assets\LightmappingTools\Editor\LightmappingTool.cs:1008)
    LightmappingTool.OnGUI () (at Assets\LightmappingTools\Editor\LightmappingTool.cs:679)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000]

    thanks

    • Does it crash ELT or stop you from making baking lightmaps? If no ignore it, just tell some more details so I can fix it in next release. In which situation does it occur?

      • 18 Alex

        It happens when I try to export the scene.
        I click on the export button and it clears the list, gives me the error and does nothing.
        I have no UV errors on the lightmap list and everything seems ok.

    • I wasn’t able to recreate the problem, would you call me on skype so I could look for the cause?

      • 20 Alex

        sorry I dont have skype at work so its a little problematic.
        But I was experimenting. I have downloaded the sample scene with the shop and tried to do the same.. Now I dont get the error but still nothing happens.
        I linked the Open with: to 3dsmax (2009 x64) and also reset the *.max file association in windows in case it was some FBX issue.
        Still nada…
        Now I am trying to go even simpler.. creating one object scene. I will keep you posted how it goes…

    • You can send me the scene you’d problems with.
      For now the only thing that comes to my head is an invalid path to 3dsmax, but I’m pretty sure that you’ve double checked it already.

      • 22 chico

        I hope I am not too late to help you, but check if there are any missing meshes in your game objects – that’s what was causing a similar problem ( CalcArea.CheckIfNormalized (UnityEngine.MeshFilter temp) (at Assets\LightmappingTools\Editor\CalcArea. ) in my project.

  17. hi,

    i am trying to export my scene from unity using the lightmapping tool. but it is coming up with the error –

    “the uv package cannot be done or either cannot be done efficiently, consider a different lighnmap arrangment”

    do you know how i can fix this?

    thanks

  18. the cause can be either to many or to less objects on your lightmap, try rearranging them

  19. 25 Preston

    Hey Ranza. Thank you for the tool, I’ve *mostly* had a great experience with it ;)

    Two questions about some difficulties I’ve been having.

    1) I’m getting a huge disparity between what I’m seeing in the frame buffer view when baking my textures in Max vs. what I see when those lightmaps are loaded back into Unity. I’m using Max 2010 and Vray 1.5 sp3. I’ve set up my scene and checked my light and (physical)camera settings before the bake making sure everything looks as it should. The bake goes fine and what I’m seeing in the frame buffer looks exactly how I want it. When the lightmap is loaded into the Unity project, the color is all wrong. It looks like the brightness of the lightmap was cranked up at some point after it left Max. The colors are washed out and really dull. So far I’ve only had one map bake out correctly. I haven’t been able to track down why, because it’s using all of the same settings as the rest of my level.

    I’m preparing some examples I’ll post after this when they finish rendering.

    2) On rounded objects, when they’re exported out of Unity and loaded into Max, they come in as a mesh of unconnected faces. Think a cube with 24 vertices overlapping at the corners instead of 8. This isn’t a big deal for rooms and things with sharp angles, but for smooth objects, it gives them a very faceted look in their lightmap even if they’re smooth in Unity. It’s really frustrating having to go through the entire exported scene and weld vertices and set smoothing groups all over again.

    Have I managed to screw something up really badly in my work to cause these kinds of problems?

    • 26 Preston

      Okay, I’ve got a few examples for number 1.

      http://img696.imageshack.us/i/comparisonh.png/

      This is a quick comparison shot showing a hallway in my scene. The top image is from the Vray frame buffer. The bottom is after the ceiling, wall and floor lightmaps have been baked and loaded in my scene. The only one that seems to have made it intact is the one for the ceiling.

      Here’s a comparison between the render window in Max and the actual image outputted for the floor:

      http://img688.imageshack.us/i/fbbad.png/

      Note in the render window version(top), there are shadows cast from the garbage cans, a nice progressive gradient of light from the bright parts of the floor to the darker areas at the edges. This is basically exactly what I’m trying to achieve in Unity. The bottom image shows that almost all of the light information has been lost. It’s totally blown out. No shadows to be found, sharp transition between light and dark where there shouldn’t be one, etc. If you open the bad one in Photoshop, the levels tool shows a completely flat curve. There isn’t anything there. It’s like the exposure settings were changed after the render, but before saving out the file.

      And here’s the one for the ceiling:

      http://img707.imageshack.us/i/fbgood.png/

      Not too far off! The bottom, outputted lightmap is basically exactly what you should get if you unmultiplied the diffuse. Both of these examples were rendered at the exact same time. Same settings. Everything.

      I found a thread in another forum about the Esperient software where someone was saying that the kind of calculations that Vray uses(and thusly outputs to baked textures) aren’t ideal for real-time use. They made it sound like there wasn’t a good way to get that floating-point light information out in a static, non-floating point form. This makes sense, but it doesn’t really explain why I sometimes get perfect output and sometimes don’t.

      • Hi Preston,
        Thanks for your feedback and screens that you’ve attached.
        It seems that some of your settings are bad, at the beginning I would get sure that your scene models are using Vray Materials. You can convert to vray Materials using Batch Convert Materials button.
        Then I would check if your lights are using VRay shadow type, it will probably get you better looks.
        I’ve just tried to bake something in max2010 with vray sp3, to check if everything works there as it should and it did. If anything would need adjustment, it should be only the case of Lightmap modifier parameter on the shader.
        I would recommend you rendering a few times using a small resolution, checking what’s exacly happening there.

        The smoothing thing – check if you don’t have ‘smoothing groups’ turned on in your import parameters inside max

        Hope it helps.

      • 28 Preston

        Definitely made sure all of my materials were vraymats. I’ve run the converter and manually checked all the multisub materials to be totally sure. All of my lights are vraylights(plane). After lots and lots of re-rendering, I’ve found that it seems totally arbitrary whether the results come out correctly, regardless of what I see in the render window. It’s very strange. I’m just rerendering everything over and over until something comes out right and then leaving that one out of the next render batch. At this point I think it may just be a software problem on my end, unfortunately. After I get past this point in my project, I may just fall back to Mental Ray and see if it gives more consistent results :\

        As for the smoothing groups, all of my original assets are setup in their own .max files with the smoothing groups set and all the relevant UV information. They’re used as prefabs in Unity. It’s after they’re exported from Unity by the tool and loaded back into Max when the smoothing gets messed up.

        Thanks for the response, I really appreciate it. My problems haven’t been resolved, but at least I can narrow things down a bit.

      • About the smoothing – my tool doesn’t open your prefab files, the mesh gets exported verticle by verticle and triangle after triangle. All those meshes are combined into an fbx file which is imported to max when you hit “Export scene”, so 2 things could be wrong there – either the max fbx importer version is old, or it has wrong import settings. I’m using FBX Plugin version 2010.2, with Smoothing groups import option off.
        The smoothing groups work correct and the object with hard edges will have more verticles then in orginal max file.

        The thing you said in your response interested me, if I understand you correctly, it works ok (produces nice lightmaps) but after n-th bake it makes it incorrectly, right?

        I know that it may not be what you want to achieve, but how about trying to move to normal, max lights and see what happens?

  20. 30 leroi

    hi ranza,

    i’m having some problems with baking the materials with V-ray in max, after exporting the scene from unity and setting up the lights and GI in max, i ‘click bake all now’ it shows a error message :Type error: call needs function or class, got: Undefined

    it works fine when i bake textures with default scanline render. can you help me out please

    thanks

  21. is this everything that maxscript log window shows?
    Seems a little bit like the renderer haven’t loaded properly

    • 32 leroi

      yes maxscript shows this message

      • you can call me on skype, and share a screen with me user id is the same as nick here.

      • hey there, i think ,the unsmooth surfaces Preston is talking about are caused by the wrong Unwrapping procedure.

        in your tutorial vvideo,in your unwrapping,uv falttenning section, you choose a value of 45.00 for cubic geometries but ,for round geometries(the teapot in your tut video) it was 70.00

        i think that is what is causing him the rough geometry.as he was using 45.00 value for both geometry types.

  22. I’m getting errors that some geometrys UV2 has overlapping areas and isnt normalized. I’ve tried to unwrap several times but no change. Also tried to close and open elt window as mentioned above without luck. Please help. Is there no way of overriding this error message?

    • Please be sure that you’re not unwrapping several objects at the same time. If you’ve already checked this, then please send me more data on my mail address. masteranza at gmail dot com

  23. I’m trying to make lightmapping for an apartment and have spent some time tweaking settings to get what I want. This has taken a few days on and off with test renders and now I’m wondering how I can start the baking process from the saved Max file directly in Max? I tried to copy the “maxscriptEngine.ms script to the script folder but when I try running the script I get an error: “Runtime error: Cant access file “.ms” at line 279: getFileModDate (presetDir + sceneName + “.ms”) The Ui pops up but I can’t start the baking process.

    Please tell me I can make it work without having to reexport from Unity and remake all my settings.

    And some feature requests:

    I’d like a button in Max to Cancel all baking. If I click the ordinary Cancel button it keeps going for all the following lightmaps which can be frustrating if you got like 40 lightmapps in the pipeline.

    It would also be good to be able to rename/write a comment in Unity what objects are on each Lightmap.

    And a way of selecting objects in the scene view by clicking in the lightmap list. To see what object it is. (Can be good if object names arn’t descriptive.)

    • How to open file directly in max:
      Note: don’t move maxscriptEngine.ms

      1. edit file .ms from MaxFiles folder and remove all lines after line which says “toRemove =#()”
      (this will simply stop max from reimporting the fbx)
      2. Open the .max file and drag and drop the edited script onto it (.ms) that should work

      Answers to other things you’ve asked:
      – I’ll added this global Cancel option soon, it was bothering me also ;)
      – I don’t quite get the idea “It would also be good to be able to rename/write a comment in Unity what objects are on each Lightmap.” could you tell something more?
      -“And a way of selecting objects in the scene view by clicking in the lightmap list. To see what object it is. (Can be good if object names arn’t descriptive.)”
      Pretty nice idea, goes to my todo-list

      Thank you for your feedback! :)

      • Thanks, I will try this.

        What I meant was that if you have lots of lightmaps I tend to forget what objects was on what Lightmap so If there was a way of either renaming the Lightmap to lets say “Floor Lightmap” or somewhere where one could write a comment like: “Main Floor Lightmap” to make it easier remembering it.

      • Hmm, having tried to edit the script the way you mentioned it still imports from the fbx file. If I remove everything from line 23 (“toRemove =#()”) and below It opens the scene correct but the Lightmapping UI is not visible?

  24. Sorry, my mistake, indeed you’ve got to remove everything from line saying “toRemove =#()”
    If the lightmapping UI is not visible then it either the path to maxscriptEngine.ms is not right ( it’s in the line that starts with fileIn(“…”) ) or it’s not passing the if statement – you can remove it though (if (preserveLights==undefined) then )
    you can also write me on skype

  25. 42 ben

    hello Ranza,

    my light maps have dark splodges in some areas in unity, when i render in 3ds max it looks fine, im using Vray to render. can you suggest anything
    thanks

  26. 43 jeremie

    Hi nice feature. I’m trying to get the best out of your plugin but I4m experimenting few problem. When I use your lugin the ambient color is equal to the diffuse color which make baking really slow. IS there a way to fix it?

    I’m using mya on mac snow leopard

    • 44 Lutzen

      Hello. Very good app! But I’m wondering if there is a way to bake the ambient light into the lightmap aswell in 3dsmax?

      • Right now I don’t know how to do that, but
        in my understanding ambient light doesn’t add anything to the final render as long as it’s white. If it’s in some other color all you’d need to do is to manually change the hue of the lightmap in photoshop for instance.

      • 46 Lutzen

        Ok. I found a way to do it. You can’t bake ambient lighting with the tool but in render setup – advanced lighting, you can choose light tracing, and set the extra ambient: to what you like and this will work just like ambient lighting and will be baked into the lightmap.

        Though I have another problem.
        When exporting from unity to 3dsmax the size isn’t right at all, the objects seem to be much to small, making the light reflecting on the surfaces much too strong.
        and the range of the lights don’t mach that in unity at all. I have to make the objects much bigger in unity, and that makes it very difficult to compose the scene in unity since the proportions of the lights and objects don’t match.

      • 47 Lutzen

        Nevermind, it wasn’t a size problem, the problem was 3ds max lights work differently from unity’s so I have to do some manual adjusting.

  27. 48 jeremie

    Just read the article about the plugin for modo. Are you still working on it ? If not what would be the process for creating one ?

    • Yeah, you’ve touched a hot one. I’ve planned to make one, but I’m not a modo user. Therefore by now I would need someone who would make a simple baking script for modo(in modo scripting language), which would consist of two buttons: bake all and bake selected and maybe some more stuff. If you feel up to the idea please contact me by skype.

    • thank you for the link, I don’t know if’ll find time tomorrow, but surely I’ll need to get a closer look on it

  28. 52 cupsster

    Hello,
    it is possible to alter/skip packing so that no atlas building is performed? I have very good unwrap with virtually almost all lightmap texture space filled. Also I know which objects will be on which lightmap so all I need is to just assign objects to lightmap table without altering 2nd UV set. So every object in current lightmap have equal same 0-1 space without offset or texture shift..
    My lightmap look like this: http://www.blackpawn.com/texts/lightmaps/ex1.jpg
    There are multiple object unwraped on it. So all I need is ask If I just import my geometry and properly named lightmaps, will unity accept them so I can skip step of packing and destroing my perfectly unwraped geometry [Export Scene button]?
    It’s complicated system for me to alter it properly.
    Can I ask for some hint where to disable or alter this scripts?
    I only need to assign objects to their lightmaps in same shared 0-1 texture space nothing more..

    Thankx for any insight.. :)

  29. 53 Stefan

    Hello Ranza!

    Can you tell me if SOFTIMAGE XSI 6 or higher will be supported by your amazing External Lightmapping tool in the near future? It will be a welcoming feature seeing 1 of the 3 most professional 3D modeling tools supported equally (or close to).

    Thank you in advance!

    Cheers,
    Stefan

  30. @cupsster: the 2nd uv set doesn’t get altered, it all goes over the 3rd uv set. You’d rather need to change the maxscriptEngine.ms script so that it renders the 2nd uv set instead of the 3rd.
    @Stefan: Right now I don’t see a possibility to develop it further [lack of funds & time]

  31. 55 Pixeldamage

    Hi masteranza

    Thankyou for your tool. I’m finding there is a huge amount of wasted space in the lightmap being generated for my scene. I noticed I can find the same UV set on the 3rd uv channel in 3dsmax. However if I alter the UVs here will they export them back with the texture? Is there any other way of changing the lightmap layout?

  32. 56 Pixeldamage

    ok I tried manually editing uv3 in max and it didn’t update the coordiantes when baking (as I’d expected). I’m guessing I could export the whole scene as an Fbx back to unity but then i’d have to delete and replace everything and save uv3 as uv2 to use the lightmapping shader. Is there a better way I can change the layout of the uvs in your lightmapper? The only option i’ve found is packing space. I’ve tried to pack the uv2 of each object as optimized as possible but this just results in them taking up tiny squares of the uv3 of the final ELT scene (with tonnes of wasted non used space).

  33. first question @Pixeldamage: you can’t change the UV’s in max and get it changed in unity.
    second question: On your place I would just try to add more little objects to the lightmap. The poor packaging is the result of using a simple algorithm built in Unity (see Texture2D.PackTextures) it’s no match to heavy algorithms such as unwrella.
    Still you can write your own packing function and swap the functions.

  34. 58 Pixeldamage

    “Still you can write your own packing function and swap the functions.”

    haha i wish! I’m not a coder and have no idea where i’d start. There are no coders here with experience of 3d or available to help on this aspect of the project. It’s a shame because your plugin could be very useful but it uses maybe 20% of the available uv space. If I could write a script to fix this I would love to. So there is no way for a non coder to get a good lightmap using your script? It looks very blurry but ok at 2048 but at the final res I have doubts as to how useful it’ll be as we’ll be using very low res maybe 256 or 512 max.

  35. hi masteranza,

    i am all lost but i dont know where to start as i have so many unknowns, where do you think i should start from.

    atm, i cant import a materialized scene from max, and cant export a textured scene to max.

    all i can do with your tool is a lightmap with grey/white illumination.

    i cant add textures to models nor blurry reflections…
    thanks for anykind of help
    /cry

  36. You’ll have to give me more details, you can find me on skype, use my blog name

  37. I imported the lightmapping tools package into unity, yet i dont now how to get the
    lightmapping interface in unity.
    as shown, in the videos.

    help please.

  38. Window -> External Lightmapping Tool

  39. 63 orion

    ELT wont work in Unity 3.0 but works fine in 2.6 !!

    In 3.0 I get error that my video card does not support sub shaders yet I dont get these errors in 2.6 !! Any ideas for a solution, I am new to unity btw ;)

    Thanks for ELT btw :)

  40. I’m having the same issue with Unity 3.0

    Assets/LightmappingTools/Editor/LightmappingTool.cs(918,25): error CS0103: The name `AssetUtility’ does not exist in the current context
    Assets/LightmappingTools/Editor/LightmappingTool.cs(864,37): error CS0103: The name `AssetUtility’ does not exist in the current context
    Shader warning in ‘ExternalLightmappingTool/LightmappedDiffuseAlpha': No subshaders can run on this graphics card

    are the errors I get.

  41. Hi, I’m aware of the problem.
    The work is in progress and I’m contacting Unity team in order to deliver better integration with Unity than before.
    Stay tuned.

  42. 66 j Anderson

    Help Master Masteranza
    we need lightmapping tools!!
    Im mired in having to learn vray over here……………..

  43. 67 Seto

    Unity 3 is come with beast lightmapping. Yet, I still want to lightmapping with external tools. Could you please update the plugin for Unity 3? It’s not compatible with the Unity 3.

  44. I’m sorry for the long delay, I had to reconstruct the way the script works.
    Right now it’s potentially easier that it worked before, although not everything is done.
    You can get it here: http://unitylightmapper.googlecode.com/files/elt3.zip

    Main changes? No more External Lightmapping Tool window, everything is done using one position in menu and Beast lightmapping window.

    How to use it?
    1. Unpack it and import the unitypackage to your project.
    2. Set all the objects that you want to be lightmapped to static (as in beast lightmapping)
    3. use lightmapping resolution from beast lightmapping window to setup resolution and scale on lightmap per object
    4. export it and bake it in max using menu: Windows->External Lightmapping Tool
    (at first use it will ask for the location of 3dsmax or maya)
    5. after lightmapping come back to unity to see the results
    (remember to set auto-refresh ON or do refresh manually)

    What this version lacks?
    It doesn’t support lightmap format .EXR, I need to increase my knowledge before further developing if someone has experiance of rendering to .EXR files over maxscript, and would like to help please contact me.

  45. 69 Tim

    It works… thank you

  46. 70 Andre

    Max Script Startup Error
    Unknow system exception

    Max 2011×64 Vray1.5 Unity 3.1

    • 71 caue

      The same problem with me.

    • I have the same problem, too.
      I use Max 2011 X64 Unity 3.0

      • could any of you send me the scene to my email address?
        At the beginning I’ve been suspecting that it’s started occurring in unity 3.1, but at my place it works properly.
        Although one thing to notice perhaps: Unity planes for now will export incorrectly this is because they have smaller number of UV than vertices.

        So, to make the simplest test, please try exporting 2 boxes and a light. Be sure that the ‘static’ option is selected.

  47. 74 caue

    Good evening, I’m having problems with external lighting. Use the Max 2011 and Unity 3.0, also using the latest FBX. But when I export from Max to Unity pair, the following message appears: “Mental ray assign”, I click ok, and it appears an error message maxscript “unkdown command” if I remember correctly.
    Could you help me?

    • probably the same issue as above, please try the following experiment and describe me the results. or/and if you can send me the scene file that generates the problem.

  48. Hi Masteranza, i send my file to masteranza@gmail ok.

    Thx a lot

    • You’re objects (2 simple cubes) didn’t have any UV2.
      You need to unwrap them in 3dsmax or make the UV’s for lightmapping using Unity 3 importer option

  49. 78 Chanchal B. Naik

    Hi,

    I am facing problem to exporting my mash for backing with external light map tool from Unity3.1,

    it show me all process till my MAYA file opens, but inside Maya no data,

    is it because i am using Maya 2008 or something which i am not getting right ?

    please let me know what should i have to do, to resolve this problem, to back my files in Maya or max.

    thanks
    Chanchal B. Naik

    • Hi, it seems like it’s just not centered, try center the selected object with a shortcut button (I can’t recall it now but it might have been F)
      if not please paste here what the console says.

  50. Hi-
    I’ve recently been tinkering at ELT’s code for Unity 3, and was somewhat curious; have you considered instead of splitting up objects based on lightmap index, creating different UV channels per index? The main benefit for this is for apps that bake based on the current UV instead of object selection.

    I’d love to include ELT as part of my GzRNM package, however baking per-object can be troublesome in some external applications.

    Thanks!

    • Hi Geenz, First of all I have to apologize for reading this never-actually-cleaned code. I didn’t think about about it since my primary target was 3dsmax, however if there are no fbx limitations to the number of exported/imported uv channels then I think this could be done. Although I didn’t find a solution for HDR lightmapping as I wrote on the page, which is what I consider a bigger problem.

      Right now I’m a little buse, but next week I’ll have a little more time and I could help you out, also if you’d be interested in collaboration I’m open to propositions. I saw your RNM sometime ago, very cool idea indeed.

      Best regards, Michal Mandrysz

      • Oh I’d definitely be interested in some collaboration work!

        HDR-wise, there’s alot caveats that come into play I noticed when working with OpenEXR lightmaps. When working with EXRs, I noticed that while they “work” in Unity, they don’t seem to really retain the luminance values you would expect them to, like Beast’s EXRs tend to.

        My guess is that somewhere you have to basically define in the EXR file how many “steps” of brightness is encoded within it, though again that’s just a guess (I haven’t completely read through the OpenEXR spec, I was considering writing some EXR file handling library for Unity for my CRNM merger and my RNM Basis maker for 3D apps since an RNM basis would benefit from 16-bit floating point values).

        Just email me whenever you have some time, and we’ll discuss some collaboration work.

  51. 83 André

    Any plans to update the ELT3 to work with unity 3.2?
    Cant wait to get external lightmap in my game!!!
    Cheers

  52. HI
    Firstly I’m using Max design 2009 and Unity3
    I have installed the ELT3 package and imported into my current Unity project.
    The Package appears in the Windows drop down but when I access it it wants to immediately go to bake it in Max!
    At first no matter I clicked it would open up Max and then fail with a runtime error.
    So I made new project re-imported the elt3 package and started again.. Now when I use the window drop down to access the Lightmapper tool .. it completely hangs Unity.. if I go and save the Unity file.. it hangs Unity!!
    Looks like the perfect tool if only I could get it to work.. my skype is hattozippa
    if you up at our time … I’m in New Zealand

    All The Best Peter

  53. Ah ha.. just reloaded this blog and saw the last comment about getting it to work in Unity 3.2!! which is what I’m using .. so maybe this is the issue?
    Cheers
    Peter

  54. Actually got it all to work.. great stuff.. now trying to export it via our propriety exporter which involves creating a prefab from the scene.
    With Beast (which is why I’m using this) it looses it connection with the lightmap as it’s attached to the scene rather than an object. I’m hoping this won’t be the case with this method…..

    • Hey, write to me on skype username: masteranza , I’ll be online in about 5 hours and we’ll try to find a solution for you.

    • 88 Alan Kennedy

      Hey Peter, how did you get it to work? When i click on the External Lightmapping Tool, it will also try to open max directly and crashes MAX with a runtime error. Using Unity Pro 3.2, and Max 2010

  55. 89 omega

    same here got problem with the tool, it stuck at creating object in Max.
    I using 3ds max 2011 64bits and Unity 3.2 . And btw how do i change 3ds max path for external lightmap tool?

    • Problem creating object in max? You could change the existing path, by removing all settings. For that use static Reset() method from StorePreferences.cs
      Cheers,

      • 91 omega

        yea , problem creating object in max ,the loading bar at btm it just stuck at loading around 30 percent. I did try import a simple box from unity, but it didn success as well.i wonder this tool able to support 3ds max 2012? coz i got another version which is 2012 with Hotfix 1,

        thx ya

      • Elt3 is able to support 3ds max 2012 (with Unity 3.3), I am working on it. But your FBX exporter is maybe not updated.
        And check that the Ambient Occlusion = 0 in the “Bake” menu in Beast Lightmapping tool. Beast ambient occlusion crash the export from Unity to 3ds max.

  56. A very great tool. Thanks for sharing !

    I conducted several tests (I use 3ds Max 2012 – Student version – and Unity 3.3), and was able to identify a problem:
    When using the lightmapping Tool to export the scene to max, it will crash if ever an ambient occlusion value was given in the parameters of lightmapping (beast) in Unity. Check that the ambient occlusion is egal to 0, and there it works.
    For the compatibility with EXR, it is possible to convert lightmaps to another format (png for my part) and to set these new textures as “lightmap” (in unity texture setting). It might then be easier to connect with 3Ds Max. This is only a suggestion. ;)

    Hope you will continue your great work.

  57. hiiii,

    what does this mean ??

    “New version for Unity 3, note: NO support for .EXR lightmaps”

    where will i be lacking ?? shall i download new version ?? will it have the sample scene and if yes will it work in unity 3…

    is it possible that this tool will have to be updated on every unity release as they are all set for 3.4

    please update me on these before i start off..

    • Currently there are no plans at fixing the issues that appeared in Unity 3.x.
      You can download the Unity 3 version that exist but possibly it’ll have some errors.
      If you can switch to Beast for now.

  58. 97 Manolo

    Hi,
    I went to assets/import package/custom package/ and selected the ELT package that i previously copied to my assets folder.
    When i hit the import button it finnishes but i get this message.
    “Shader warning in ‘ExternalLightmappingTool/LightmappedDiffuseAlpha': No subshaders can run on this graphics card”
    And the external lightmapping tool doesn’t appear in my Window menu.
    I’m using Unity 3.4.0f5 Pro. I don’t think it doesn’t work because of my graphics card,,any way i have a Nvidia Quadro 2000.
    Thanks

  59. Hi!

    This plugin is OK with unity 3.4 and Vray 1.5 / 2.0 in 3Dsmax?

  60. 99 monah62rus

    I chose the first time wrong path to 3ds max. How to change the path to the 3ds max?

  61. 100 Gabriek

    May I suggest unrolling just the FBX export part of this tool and putting it in the Asset store? I know a number of people who are using the OBJ exporter since they don’t know this exists. I’m sure a number of them would pay for it. I know I would. The OBJ file format is extremely limited.

    The way I use it is I create sprite buttons using ezgui, but then use Max to animate them.

  62. 102 jelmer

    Hi, I am trying to use this potentially great tool with unity 3.5, but after some export screens, unity freezes, although it does not become white like programs normally do when they freeze. No processing is going on according to task manager. Unity simply stops responding to everything..
    Is this a known issue with Unity 3.5?

    • I’m sorry, this tool will no longer work with Unity 3.5.

      You can try to fix it for your own purpose, though I don’t recommend it.
      Use Beast instead.

  63. I think they pus on him to not propagate it cause of Beast.. When I will have time and will I will come back to this and make it work.. From previous testing renders were almost perfect! And fact that you can control v-ray made it even more powerful…

  64. I actually wanted to present this blog post, “Unity External Lightmapping Tool
    Ranza Research” along with my own good friends on
    facebook or twitter. I reallysimply just wanted to disperse ur terrific posting!
    Thanks, Corey

  65. WOW just what I was looking for. Came here by searching for blog
    link

  66. Je suis agée de quarante-huit ans ; je ne fait pas de complexe là dessus .

    Mes parents m’ont appellée Charline et j’aime beaucoup ce
    prénom.
    J’ai repris mes études pour devenir graphiste … Mon caractère est plutôt timide.A

  67. My website s7 200 siemens

    I am really inspired together with your writing talents
    and also with the structure on your blog.

    Is this a paid subject matter or did you modify it yourself?
    Anyway stay up the excellent high quality writing, it’s uncommon to see a nice weblog like this one these days..
    My website s7 200 siemens

  68. What’s Happening i am new to this, I stumbled upon this I’ve found It absolutely useful and it has aided
    me out loads. I am hoping to give a contribution & help other customers like its aided me.
    Great job.

  69. La principale question qui se pose avant de faire un voyage est quels
    types de bagages on va emmener ?
    Pour un long voyage, trouver les bagages appropries n’est pas une
    tache aisee.
    Trouver ces bagages ne necessite plus trop d’effort
    ni de depenses parce que les moyens sont deja nombreux.

    Les sites en ligne qui offrent des bagages pas chers sont diverses et
    prennent de l’ampleur.

    De plus, de nombreux choix de prix et de qualites sont offerts.

    Toutes les marques comme Samsonite, Tumi, Little Marcel et autres sont disponibles sur ces
    boutiques.
    Les tarifs sont moins chers a cause de la competition.

    Ces boutiques en ligne offrent, presque tout le temps, des couts inhabituels et font des promotions.

    De nos jours, ces boutiques en ligne representent la meilleure solution pour ceux qui n’ont pas le temps de faire les magasins.

    Ces boutiques peuvent repondre a tout nos besoins en terme de
    bagages que ce soit pour un long ou court voyage.

    Par exemple la boutique en ligne Bagage Bagage, Mesbagages et autres qui presentent plusieurs types de bagages de toutes
    grandeurs et de diverses marques.

    Bref, ces boutiques en ligne sont pour certains une meilleure
    solution mais pour d’autres faire les magasins directement demeure un plaisir incomparable.

    Les boutiques en ligne ne sont seulement que des propositions de facilite d’achat pour ceux qui en
    ont besoin.
    Neamoins, il faut noter que les clients de ces boutiques en ligne s’accroissent de plus en plus.

  70. comment va ? Je suis une vieille de trente-deux printemps !

    je suis Alita
    Ce que je fais , hôtesse d’accueil ! Mon naturel est plutôt souriant.

  71. Ici Demi
    Je suis jeune de 18 piges !
    Mon travail surveillant pénitentiaire . Est-ce un défaut d’être très cool ?

  72. bonsoir je suis Voleta
    Je suis jeune de 33 printemps .
    Mon occupation principale, hydrobiologiste . Mon caractère est plutôt timide.

  73. Je suis agée de 33 années j’assume totalement mon age !
    Mon nom est Julienne.
    je suis un stage pour devenir agent de maintenance . On dit que je parais enjouée.

  74. Wow, incredible blog layout! How long have you been blogging for?
    you made blogging look easy. The overall look of your website is
    wonderful, let alone the content!

  75. Bonjour,

    J’ai trente-deuxA , je n’ai pas de problème à le dire !

    je suis Galatee
    Je suis aide comptable ! Mon caractère est plutôt souriant.

  76. Found your web-site on del.icio.us today and genuinely loved it.
    . i saved as a favorite it and will be back to check it out some more later .
    . As a Noob, I am constantly seeking online for posts
    that can help me. Regards! My best wishes, Julio.

  77. I used to be recommended this blog by way of my cousin.
    I am not certain whether or not this post is written through him as no one else understand such specific approximately my trouble.

    You’re wonderful! Thanks!

  78. Wonderful work! This is the variety of info which have been supposed to be contributed around the internet. Disgrace around the get search engines because of not placement this specific offered superior! Can occur through as well as talk to this website. Cheers Equals)

  79. Incredible! This blog looks exactly like my old one! It’s on a entirely different subject but it has
    pretty much the same layout and design. Superb choice of colors!


  1. 1 Unity External Lightmapping Tool « b4vibe's Blog
  2. 2 Unity Help Tutorials « Forum
  3. 3 Unity Technologies Blog » Blog Archive » Summer of Code: External Lightmapping Tool Released!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

Join 36 other followers

%d bloggers like this: