By the way, Normen thank you for the tip. I have done a separate Texture Atlas addon for blender based on the baker.
It can make a group of objects and make a Texture Atlas for them. Then it’s possible to select the group and bake it with the standard baker in blender.
@mifth said:
By the way, Normen thank you for the tip. I have done a separate Texture Atlas addon for blender based on the baker.
It can make a group of objects and make a Texture Atlas for them. Then it's possible to select the group and bake it with the standard baker in blender.
http://pastebin.com/WQHRTUp9
TextureAtlas.py
It has one bug still. Only one textureAtlas group will work.
Tried it out but didn’t manage to get it working for anything but one box in the scene. Probably I do something wrong so I’ll look at your tutorials.
My goal isn’t so much lightmaps as baking blender textures (and normal maps from multitextures). Will that work do you think? In other words I really like the atlas part of it
The good thing this plugin does is always use texcoord2 for lightmaps and doesn’t create a new UVMap each time you want to unwrap. If you’re using this plugin for actual level design then you probably have to unwrap and bake many times, you don’t want to have to delete the UVMap each time to do this. Also if I understand correctly, if you use “Full Render” in baking, does it render the material with the lightmap that is assigned? The correct thing to do in “Full Render” mode is to disable the lightmap while baking, and enable it when done so the previous lightmap doesn’t “leak” on the generated one.
Also, one idea is if it could automatically create lightmap unwrap groups for you based on how much surface area each object uses. So as it goes through objects and notices there’s no more space in the texture, and creates a new texture / group for the next set of objects. This way you might have like 100 lightmaps each one 4096x4096 (for really huge environments maybe).
@Momoko_Fan said:
The good thing this plugin does is always use texcoord2 for lightmaps and doesn't create a new UVMap each time you want to unwrap. If you're using this plugin for actual level design then you probably have to unwrap and bake many times, you don't want to have to delete the UVMap each time to do this. Also if I understand correctly, if you use "Full Render" in baking, does it render the material with the lightmap that is assigned? The correct thing to do in "Full Render" mode is to disable the lightmap while baking, and enable it when done so the previous lightmap doesn't "leak" on the generated one.
Also, one idea is if it could automatically create lightmap unwrap groups for you based on how much surface area each object uses. So as it goes through objects and notices there's no more space in the texture, and creates a new texture / group for the next set of objects. This way you might have like 100 lightmaps each one 4096x4096 (for really huge environments maybe).
If Object has texcoord1, so the TextureAtlas script will create texcoord2.
You can unwrap lightMap group just one time then disable unwrapping. There are 2 ways to disable Unwrapping:
1 - switch "bake" off
2 - set "No Unwrap" button
If you want to use "Full Render" and if you have objects with assigned materials, so you can make a trick:
1 - Unwrap a lightMap group with the TextureAtlas script
2 - duplicate the lightMap group and move duplicated objects to another layer
3 - merge duplicated objects into one object
4 - remove all materials from the duplicated-merged object
5 - Bake a texture with "Full Render" and save a texture.
6 - delete duplicated-merged object.
I did another video for better explanation:
http://www.youtube.com/watch?v=OfwLQMx9NXs&feature=youtu.be
@mifth said:
If you want to use "Full Render" and if you have objects with assigned materials, so you can make a trick:
1 - Unwrap a lightMap group with the TextureAtlas script
2 - duplicate the lightMap group and move duplicated objects to another layer
3 - merge duplicated objects into one object
4 - remove all materials from the duplicated-merged object
5 - Bake a texture with "Full Render" and save a texture.
6 - delete duplicated-merged object.
Yes, I know it can be done manually, but it is tedious to do it for each object (which depending on group may have different lightmap). I was thinking that there could be a button to modify the materials of the objects to use their group's lightmap for rendering (e.g. use as ambient map with texcoord2) and another button to disable that map. This way you can preview how the actual material will look in jME3 in Blender.