- Home /
How can I increase the Texture Size of the Lightmaps created with Beast?
I want to increase the size of the textures created by Beast as their defauilt is 1024x1024 and I need something higher, right now. I know there is a way as I have found a few topics in the Unity forums. Thoguh - I don't get them to work.
I was trying to get Robert's Instructions on how to increase the Lightmap Size to work but somehow it didn't work as expected (http://forum.unity3d.com/threads/56435-light-map-max-at-1k-solved?). Specifically - it created the entry in the menu bar but did nothing more.
What can I do to control the texture size of Beast's Lightmaps? And especially HOW do I do it?
Thanks :)
Answer by motionblur · Nov 30, 2010 at 03:42 PM
Okay - I finally DID find a way to get this to work, myself:
The problem with Robert's Script was that it somehow did not produce a pulldown menue to actually select the desired size. Being the brute force, unknowing programmer that I am I created a less sophisticated but at least for me (hopefully for others as well) working Script:
using UnityEditor;
public class AtlasSize_512 : EditorWindow { [MenuItem("LightmapSize/AtlasSize_512")] static void Init() { LightmapEditorSettings.maxAtlasHeight = 512; LightmapEditorSettings.maxAtlasWidth = 512; } }
public class AtlasSize_1K : EditorWindow { [MenuItem("LightmapSize/AtlasSize_1K")] static void Init() { LightmapEditorSettings.maxAtlasHeight = 1024; LightmapEditorSettings.maxAtlasWidth = 1024; } }
public class AtlasSize_2K : EditorWindow { [MenuItem("LightmapSize/AtlasSize_2K")] static void Init() { LightmapEditorSettings.maxAtlasHeight = 2048; LightmapEditorSettings.maxAtlasWidth = 2048; } }
public class AtlasSize_4K : EditorWindow { [MenuItem("LightmapSize/AtlasSize_4K")] static void Init() { LightmapEditorSettings.maxAtlasHeight = 4096; LightmapEditorSettings.maxAtlasWidth = 4096; } }
It's a C# Script and has to be put inside the 'Assets/Editor' Folder inside the project folder. What the script does is add a Lightmap Size Menue with four entrys: 512, 1K, 2K and 4K. As was stated in the thread after baking you need to set the max texture size of your lightmap to the according resolution in the inspector.
So if the script did not work four anyone else - maybe this one does. Hopefully. :)
You can see if it did work by setting the Resolution in the Lightmap Menu pretty high and then In the Editor under "lightmap Display" > Show Resolution. :)
Answer by SmaLL_D Productions · Oct 22, 2013 at 06:10 PM
How to fix?? Error CS0246: The type or namespace name `EditorWindow' could not be found. Are you missing a using directive or an assembly reference?
It means your missing:
using UnityEditor;
at the top of the class.
Your answer
Follow this Question
Related Questions
Blinking lines on model after lightmapped? 0 Answers
Beast Light-mapping maxAtlasWidth / maxAtlasHeight 0 Answers
Lightmapping: Low Quality shadows / strange mapping 0 Answers
Can I improve the resolution quality of a photosphere applied as texture to a 3d sphere gameobject? 1 Answer
How do I downsize all textures for mobile version? 3 Answers