Common problems

I’ve lost my External lightmapping tool window inside 3dsmax – what do I do now?

You can open it again using menu Utilities->Maxscript->Unity Lightmapping Tool

Can I render the scene using Scanline renderer?

Of course, just change your renderer in ‘assign renderer’.

Can I setup the “Render to Texture” in more details than just pressing the “Bake all now!” button?

Yes. After the first render using “Bake all now!” button, all the render to texture options (like lightmap paths to your Unity project directory) are setup and available to modify.

I’ve rendered a 2048×2048 lightmap but it doesn’t look good, what shall I do?

Try changing the maximum resolution of the texture that can be imported to Unity – it’s usually set to 1024×1024, so click your lightmap file in Assets/Lightmaps/sceneName/ and change the Max Texture Size option

My lightmap is completly black! What am I doing wrong?

1. Are you using VRay renderer? If yes than get sure if you’re using VRayMtl as materials. You can use “Batch convert materials” button for this

2. Try using Utilities -> XFrom and Normals modifier to flip the normals and then render again.

3. Look at renderer debug window, it may come handle

My shadow is not correctly aligned to the edges

There could be two reasons.

1. You’re trying to pack to much objects onto too small lightmap. Try adding another lightmap and moving the objects there, or increasing the resolution

2. Your unwrapped UV elements may be too close to each other. See lightmap UVs tutorial by Stephen Jameson

Similar, but different problem is the one below

All my shadows seem to be offseted/biased!

Go to your lights in 3dsmax and try to set shadow bias option to 0 (or at least close to it)

I’ve been lightmapping succesfully for a while, but after I’ve edited a little my mesh I get “Unknown system exception”

Of course this exception doesn’t precise exacly what happend, but I know for sure one situation in which it can happen.

If you’ll remove some verticles from an unwrapped mesh, then some UV verticles will still try to call them and this causes an error. For now please re-unwrapp your mesh. Probably I’ll fix that with the next release.

Why can’t I add Unity primitives to the lightmapping list?

That’s because Unity primitives aren’t currently unwrapped on uv channel 2, maybe in future that will change.

I see numerous color bleeds on my lightmaps, how can I reduce them?

First way of reducing color bleeds is by both increasing the value of “packing spacing” and space between unwrapped elements of an object. You may try decreasing photon energy too.


23 Responses to “Common problems”

  1. 1 tuck

    Hi,

    I seem to be having alpha sorting issues with the “External Lightmapping Tool” textures that have Alpha map capabilities. The Alpha maps seem to be sorting incorrectly. I presume this might have to do with the mapping channels?

  2. 2 Rodrigo Silva

    Hi,

    First of all, great tool. Thanks for sharing it.

    I´m using Unity 2.6.1f3 and the latest ELT (just downloaded it).
    When I try to open the lightmap editor windows it opens a
    black window and unity stops working.

    TIA,
    R.

    Edit: I discovered the “error”. If I move the ELT folder into
    another folder the above behaviour happens.

    • You shouldn’t move the folder anywhere, there are some hard coded functions.
      Thanks for the question anyway🙂

  3. 4 Vasco C

    Awesome tool!

    Is there a way to bring also the “non-Unity-compatible” assets back to Max when pressing the export button?

    I’m using things like the daylight system, sky portals, etc. in my Max scene and it would be really cool if those would “travel” back from Unity when I press the export button from the lightmapping tool. That way, my lighting setup would stay consistent, even if bake the lightmaps multiple times.

  4. Your lighting setup will stay consistent. You see, when you clicked ‘Export’ in Unity a new .max file gets created and it takes care of remembering lightning setup and meterial setup.
    Take a try and see.
    cheers

    • 6 Vasco C

      Thanks for the quick reply!

      Hmm, Perhaps I’m still not doing this right?

      I made a simple test: Just a box for a ground plane and a teapot on top of that. Then I added a daylight system and photographic exposure control.

      I imported the entire .max file to Unity and set up the materials for the teapot and the box. Then I clicked on the export scene button in external lightmapping tool. When it opens in Max, I don’t see the daylight system anywhere – should I? Also exposure control is not there, and I assume the render settings are at their defaults?

  5. The concept standing behind the tool is a little bit different😉

    First you import all the objects to Unity and add them to the lightmapping tool list (they don’t necessarily have to come from one .max file )
    After you you hit ‘Export’ a new max file will get created and this is the right time to set your lightning.

    Whenever you’ll reexport the scene the same file will get opened. If you’d like to use it without opening unity, you can always look into ‘MaxFiles’ folder in your unity folder and search for a file called .max

  6. 9 bora

    Hello masteranza!,

    i have been fiddling with your special tool for weeks and i have some observations which maybe false or in accurate, but i will continue incase someone tells me beter options…

    first steps in 3dsmax with a prepared scene which has lightning and textures and shader applied.

    * select all objects and attach them into one editable poly.

    *run a script on the editable poly to extract elemens BY MATERIAL

    *Convert all materials to standart scanline renderer material.

    *run a script that unwraps all objects in scene in UV channel 2, individually.

    * export all extracted objects into “unity’s asset folder” via fbx file.(as unity cant import 3dsmax 2011’s max file )

    as the fbx file is imported in to unity, all objects have correct diffuse color and texture files. already applied. if i had not converter vray materials to standart, FBX conversion would be faulty, thus creating random materials for unity to understand.

    *merge the scene into unity and drag them into the ELT. create a few light maps untill all objects are added to lightmaps list. then hit the export button.
    (the problem i have here is, i can not determine how many objects i should add to each lightmap.,as i cant not figure which objects need bigger lightmap files and which do not… there should be an area calculator for the objects and advise on how many lightmaps and about resolutions needed).

    *as the ELT exports a new fbx file into max. i merge the lights and cameras back from the original scene where we did material convertions and unwraps. set up exposure with a standart camera, and produce the lightmaps which will be autoassigned to the models in unity.

    how was that so far?

  7. 10 Sriram

    hi Masteranza

    its a great tool.

    pls help me. when i am clicking ELT its exporting to max its not opening ELT window.

    • Hello Sriram,
      Which version of Unity & max are you using? Also what does the maxscript listener say?

      • 12 Sriam

        i am using unity 3.0 and max2011

      • 13 stefan

        Hi masteranza,
        Ive got the same problem,
        is there any solution for this issue?
        Thanks a lot,
        Stefan

  8. 14 Mike

    how to reset location of Max executable after installing Max in different directory

  9. Hi Maestranza:
    I’m using Unity Pro 3.2, and 3DStudio Max 2009. I’m working on a racing game. If i add a couple of objects as static, let’s say only the road, and some fences, when i hit External Lightmapping Tool, it won’t export the corresponding FBX to Max. It just hangs there, and thebeast.exe, shows up consuming full CPU and some descente memory (actually looks like as it would restart over and over).

    This won’t happen if i export, let’s say, two or three objects. If i stop thebeast.exe with task manager so i can take back control of Unity, the logger will show:

    ArgumentOutOfRangeException: Index is less than 0 or more than or equal to the list count.
    Parameter name: index
    -1
    System.Collections.ArrayList.ThrowNewArgumentOutOfRangeException (System.String name, System.Object actual, System.String message)
    System.Collections.ArrayList.get_Item (Int32 index)
    LightmappingTool2.getAllStaticObjects () (at Assets/LightmappingTools/Editor/LightmappingTool2.cs:110)
    LightmappingTool2.ExportFBX () (at Assets/LightmappingTools/Editor/LightmappingTool2.cs:249)
    LightmappingTool2.Init () (at Assets/LightmappingTools/Editor/LightmappingTool2.cs:71)

    ¿Any hints?

    Best Regards, Great Job!, hopefully this will simplify a lot of work for me.

  10. 19 xanseviera

    I downloaded the latest ELT and tried this tool in Unity 3 but everytime I hit the External lightmapping tool in windows menu, it didn’t show any lightmapping tool instead it’s trying to import everything to FBX in 3D Max 2010 without any warning and when 3D Max loads the file, 3D Max got crashed. I just wondering am I doing it the wrong way? or how am I gonna make sure that everytime I click on the tools only the menu tool comes out, not trying exporting stuffs…

  11. 20 danzo

    Hi.. looks like a nice tool but it does not work for me. I´m using unity 3.1 pro. and max 2011. The external lightmapping tool menu does not even show up. but i get a lot of errors in the console.
    ——
    ssets/LightmappingTools/Editor/LightmappingTool.cs(165,38): error CS0117: `CalcArea’ does not contain a definition for `CheckIfNormalized’

    Assets/LightmappingTools/Editor/CalcArea.cs(15,7): (Location of the symbol related to previous error)

    Assets/LightmappingTools/Editor/LightmappingTool.cs(179,34): error CS0117: `CalcArea’ does not contain a definition for `CheckIfNormalized’

    Assets/LightmappingTools/Editor/CalcArea.cs(15,7): (Location of the symbol related to previous error)

    Assets/LightmappingTools/Editor/LightmappingTool.cs(197,47): warning CS0618: `UnityEngine.Object.FindObjectsOfTypeAll(System.Type)’ is obsolete: `Please use Resources.FindObjectsOfTypeAll instead’

    Assets/LightmappingTools/Editor/LightmappingTool.cs(864,37): error CS0103: The name `AssetUtility’ does not exist in the current context

    Assets/LightmappingTools/Editor/LightmappingTool.cs(875,42): error CS0117: `CalcArea’ does not contain a definition for `CheckIfNormalized’

    Assets/LightmappingTools/Editor/CalcArea.cs(15,7): (Location of the symbol related to previous error)

    Assets/LightmappingTools/Editor/LightmappingTool.cs(918,25): error CS0103: The name `AssetUtility’ does not exist in the current context

    Assets/LightmappingTools/Editor/LightmappingTool.cs(929,30): error CS0117: `CalcArea’ does not contain a definition for `CheckIfNormalized’

    Assets/LightmappingTools/Editor/CalcArea.cs(15,7): (Location of the symbol related to previous error)

    Assets/LightmappingTools/Editor/LightmappingTool.cs(1201,30): error CS0176: Static member `SaveFBX.ExportFBX(ref System.Collections.ArrayList, ref System.Collections.ArrayList, ref System.Collections.ArrayList, ref System.Collections.ArrayList, ref UnityEngine.Light[], int, int)’ cannot be accessed with an instance reference, qualify it with a type name instead

    Assets/LightmappingTools/Editor/LightmappingTool.cs(1210,50): error CS0117: `SaveFBX’ does not contain a definition for `offsetsArray’

    Assets/LightmappingTools/Editor/SaveFBX.cs(17,7): (Location of the symbol related to previous error)

    Assets/LightmappingTools/Editor/LightmappingTool.cs(1211,133): error CS0117: `SaveFBX’ does not contain a definition for `offsetsArray’

    Assets/LightmappingTools/Editor/SaveFBX.cs(17,7): (Location of the symbol related to previous error)

    Assets/LightmappingTools/Editor/LightmappingTool.cs(1211,176): error CS0117: `SaveFBX’ does not contain a definition for `offsetsArray’

    Assets/LightmappingTools/Editor/SaveFBX.cs(17,7): (Location of the symbol related to previous error)

    Assets/LightmappingTools/Editor/LightmappingTool.cs(1211,199): error CS1502: The best overloaded method match for `UnityEngine.Vector4.Vector4(float, float, float, float)’ has some invalid arguments
    ——-

    I hope this is can be fixed, i would love to use this tool.

    Cheers!

    DFX

    • Most likely, you’ll do a refresh and the errors will be gone, please note also that the project is now obsolete and you should rather use beast light mapping

  12. 22 monah62rus

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

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


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


%d bloggers like this: