Hello!
I’m Marco Jacovone, developer of LightmapMagic.
As requested from some users, I create this thread for LightmapMagic support.
Suggestions and questions are welcome.
Hello!
I’m Marco Jacovone, developer of LightmapMagic.
As requested from some users, I create this thread for LightmapMagic support.
Suggestions and questions are welcome.
In the meantime, a brief description of the asset:
LightmapMagic is a UNITY editor extension that allows to define multiple lighting configurations, based on enabled/disabled lights, skyboxes and lightprobes/reflection probes configuration, and switch them at runtime.
For each configuration, you specify what light should be enabled, what disabled, and what skybox you want to use. LightmapMagic starts a complete process of multiple lightmaps generation by managing scene objects and registering generated maps, light probes coefficients and reflection probes textures.
You can then switch from a configuration to another with a simple visual call at runtime (or in edit mode of course).
Features
Here’s the asset store link: LightmapMagic | Utilities Tools | Unity Asset Store
Take a look at the features video.
So to understand correctly - for a game where you are generating levels procedurally from prebuilt rooms, which might be instanced at different angles to how they were authored - this would allow you to author lightmaps for various orientations of rooms and switch them in as needed? If so, my money is yours
Not understand what you mean with “instanced at different angles”… The workflow should be:
At development time
At play time
In all configurations, the scene should not change, except for lights.
Hope I was clear in description.
Hey Marco
Bought it and tested it and it works great. The ability to bake different light configurations and switch between them is fantastic. And so easy. Would it possible to fade between lightmaps in future?
Cheers
Michael
@lazygunn
I´m really new to this. But as i understand in
https://unity3d.com/learn/tutorials/modules/beginner/graphics/lighting-and-rendering
described this as Precomputed Realtime GI Lightning. Just scroll down.
LightmapMagic makes this process really easy. And you can switch between the generated solutions without effort.
Cheers
Hi Michael,
It is possible in theory, and it is a very good idea! I have to make some research about performance behavior…
I will let you know when I know more.
Thanks
There is a very annoying behavior on Unity 5.3 baking process that stops LightmapMagic working…
I’m writing a work around and will release it soon.
Sorry.
Found a temporary solution to the problem. For Unity 5.3+ in file LightmapMagicEngine.cs, replace
assetPath = AssetDatabase.GetAssetPath (LightmapSettings.lightmaps [j].lightmapFar);
with
#if UNITY_5_3
string curScene = UnityEditor.SceneManagement.EditorSceneManager.GetActiveScene ().path;
string[ ] parts = curScene.Split (‘/’, ‘\’);
string sceneName = parts [parts.Length - 1].Split (‘.’) [0];
string lightmapPath = Path.GetDirectoryName (curScene) + “/” + sceneName + “/”;
assetPath = lightmapPath + “Lightmap-” + j + “_comp_light.exr”;
#else
assetPath = AssetDatabase.GetAssetPath (LightmapSettings.lightmaps [j].lightmapFar);
#endif
and
assetPath = AssetDatabase.GetAssetPath (LightmapSettings.lightmaps [j].lightmapNear);
with
#if UNITY_5_3
assetPath = lightmapPath + “Lightmap-” + j + “_comp_dir.exr”;
#else
assetPath = AssetDatabase.GetAssetPath (LightmapSettings.lightmaps [j].lightmapNear);
#endif
This works, but assume to know the exact file name and path of generated light maps, and may be not robusto for the future. I’m awaiting for answers from Unity developers.
Bye.
@mensch-mueller
Experimenting with blending lightmaps, lightprobes, reflection probes, skyboxes…
Very CPU expensive, but at low resolution very good.
Take a look, and give feedback!
Hey Marco!
This looks very useful!
Wish you a great new year!
Cheers
Michael
Another experiment with low-resolution light maps blending using LightmapMagic.
24 lightmaps, 2 skyboxes.
Only baked lights, lightmaps and skyboxes are blended.
Het Guys,
another feature is coming: lightmap patching!
Basically, you can switch lightmap for a given object (renderer) only, with one from another configuration.
Take a look!
A new version of LightmapMagic is out! Version 1.2.
With Lightmap Blending and Lightmap Patching!
Try out!
Hi.
This works really well for completely static scenes, but I really need to show and hide some meshes in some light configurations.
I’ve tried disabling the gameobjects - which unsurprisingly resulted in mismatched lightmaps,
moving out of view - which resulted in scrambled lightmaps - i’m guessing atlasing is done in some spatial fashion,
and scaling to 0,0,0 - which resulted in UV error messages and similarly scrambled lightmaps.
Could you possibly look into this as a feature?
The need is only to toggle a mesh on and off, and the baked lightmaps to match the presence or absence of the mesh
Ok,
I am experimenting on this.
I’ll let you know when I’ve found a solution.
Marco
I can’t build a standalone build with Lightmap Magic included.
Since it uses the UnityEngine namespace with editor specific code. What do I have to comment out to get it to work? Removing the Lightmagic script isn’t a solution. Am I the first one to actually try and build a game with this asset?
Ok I have to comment out the fourth line, very strange why it isn’t commented out by default.
Hi Skolstvo,
the problem was the fourth line of LightmapMagic.cs script, as you said (“using UnityEditor.Macros;”).
The problem was already fixed on the development trunk, but it is not yet released.
Sorry.
Hi, nice plugin, I would like to use with Assetbundle or prefabs, this will keep the lightmap info for each instantiate prefabs or assetbundle from web or local??
Hi,
thank you. LightmapMagic manager the entire light mapping process and collect all output light maps. After, allows to switch them, so there should not be any problem using with AssetBundles.
With coming version of LightmapMagic you can configure objects to appear/disappear on some light configuration, so light maps number may vary from a configuration to another.
Prefabs are not supported.
Marco.