Page 1 of 2
Baking Multiple Objects at Once
Posted: Thu Jan 21, 2016 9:05 pm
by pixelvspixel
Hey guys, just installed the V3 alpha for Cinema, so exciting to finally have baking in the native app! One question. Is there currently a feature to allow me to bake and export multiple maps for many different objects at once. Currently, when I tried to bake with more than one object in the scene, everything just became stacked. I was only able to skirt this issue by assigning every object an Octane Object tag and then giving each object a different Bake ID. Then I had to cycle through the numbers with the camera and change my output names 1 by 1.
Perhaps I'm doing it wrong or these are yet to come features. Can anyone shed any light? My hope is to bake out entire game levels and import all these baked maps into Unity.
Cheers!
Re: Baking Multiple Objects at Once
Posted: Thu Jan 21, 2016 9:53 pm
by aoktar
I suppose current method is fine. Why don't you combine meshes and unwrap uv to avoid uv-stacking?
Re: Baking Multiple Objects at Once
Posted: Thu Jan 21, 2016 11:30 pm
by pixelvspixel
Well, it's a larger level for game export. I've been pretty good about optimizing UV space, but there is a lot of instanced geometry and I'd prefer to use all the UV's I've currently got setup. Everything is quite large in scale as well, so I was hoping to maintain a good bit of resolution in these maps. Combining everything would become miserably small even at 4k.
Is there a method to setup all these separate outputs in the standalone version of Octane if I export my scene or will I just hit a similar wall?
Re: Baking Multiple Objects at Once
Posted: Thu Jan 21, 2016 11:50 pm
by aoktar
No, I just added current system as in Standalone. If you share some tangible samples and advices we can think about that. I haven't worked on baking of complex scenes, just small/medium things in past. So it can be useful to take a look.
Re: Baking Multiple Objects at Once
Posted: Fri Jan 22, 2016 12:03 am
by ZombieDisco
pixelvspixel wrote:Hey guys, just installed the V3 alpha for Cinema, so exciting to finally have baking in the native app! One question. Is there currently a feature to allow me to bake and export multiple maps for many different objects at once. Currently, when I tried to bake with more than one object in the scene, everything just became stacked. I was only able to skirt this issue by assigning every object an Octane Object tag and then giving each object a different Bake ID. Then I had to cycle through the numbers with the camera and change my output names 1 by 1.
Perhaps I'm doing it wrong or these are yet to come features. Can anyone shed any light? My hope is to bake out entire game levels and import all these baked maps into Unity.
Cheers!
Hi pixelvspixel!
An object tag with a unique baking ID is needed to separate out baking groups. It gives you some flexibility about what objects you make into a single map, but usually you want to make each object have its own baking ID to avoid overlap. So you're correct, this is how it works. Unfortunately the built-in C4D baking behaviour isn't any better as it also makes you bake and save each object one at a time.
It sounds like you've probably already worked this out, but you also need to target a UV channel that's been properly laid out to receive a lightmap, eg. no overlapping UVs.
Can I ask what game engine you're exporting to? I'm currently working on the Unreal Engine plugin which will support baking object lighting and automatic group assignment as the use case there is fairly clear. We have a similar Unity plugin in the works as well.
Re: Baking Multiple Objects at Once
Posted: Fri Jan 22, 2016 12:13 am
by pixelvspixel
Hey guys thanks for the input so far. Sounds like it just doesn't have that functionality for kicking out, say 70 lightmaps at once. I'd guess the next best thing would be a native script that turned on each Bake ID, changed the output file name to match the currently selected object and then keep repeating this process. Seems a little caveman-ish but probably the best option for the moment.
Justin - a plugin in like that sounds amazing. I'm quite familiar with light baking in UE4 and would be using this under most circumstance. But I'm exporting to Unity 5 at the moment to wrap my head around that process for work. Not a fan of Unity's in-engine baking atm, but perhaps I'm missing what's good about it. Just feels sooo slow. I hope that at some point Octane can handle that a lot of that baking work for entire level. Which a plugin for reducing all the manual hookup would be even better.
Re: Baking Multiple Objects at Once
Posted: Fri Jan 22, 2016 12:24 am
by ZombieDisco
pixelvspixel wrote:Hey guys thanks for the input so far. Sounds like it just doesn't have that functionality for kicking out, say 70 lightmaps at once. I'd guess the next best thing would be a native script that turned on each Bake ID, changed the output file name to match the currently selected object and then keep repeating this process. Seems a little caveman-ish but probably the best option for the moment.
Justin - a plugin in like that sounds amazing. I'm quite familiar with light baking in UE4 and would be using this under most circumstance. But I'm exporting to Unity 5 at the moment to wrap my head around that process for work. Not a fan of Unity's in-engine baking atm, but perhaps I'm missing what's good about it. Just feels sooo slow. I hope that at some point Octane can handle that a lot of that baking work for entire level. Which a plugin for reducing all the manual hookup would be even better.
It certainly is a bit of a tedious process at the moment. Someone enterprising could make a temporary solution using a LUA script object that handles assignment of baking IDs and then iterates over them, say during an animation.
Just FYI here's a discussion we had about baking and game engines, along with some preview screenshots from the plugin:
viewtopic.php?f=40&t=51954&start=10
Re: Baking Multiple Objects at Once
Posted: Fri Jan 22, 2016 9:42 am
by bepeg4d
Hi pixelvspixel,
for now, you could export your already set up scene to standalone and give a try to my Lua script to automate the baking process:
viewtopic.php?f=73&t=52085
Then, you only need to run the Batch script to render all the textures at once. Let me know if you need help in doing this

ciao beppe
Re: Baking Multiple Objects at Once
Posted: Fri Jan 22, 2016 10:13 pm
by pixelvspixel
Thanks everyone for their input. Justin - love the content of that thread, this is the stuff that made it a no brainier to pick up a license.
Bepeg4d - Very awesome script! I was working with it this morning to half success. The problem I kept running into was that the script wants me to select a mesh and render output. In your video you obviously had 22 outputs, but had selected a specific .obj I take it, there is a way to use this on multiple mesh. My question is, does the scene have to be setup in a specific manor? Here is my setup;
I haven't spent a ton of time in Octane Standalone, so maybe I some fault in my setup, but this was an exported scene from Cinema. Thanks again!
Re: Baking Multiple Objects at Once
Posted: Sat Jan 23, 2016 8:25 am
by bepeg4d
Hi pixelvspixel,
I guess that the easiest way is to duplicate your prefered Render Target, connect it to the desired mesh node, select both the mesh and the Render Target and run the script

Let me know if this works for you

ciao beppe