Fastest way to make whole-scene prebaked textures?

Fastest way to make whole-scene prebaked textures?

Hi,

I bought Cheetah 3d just this week. I'm pretty sure I'm up to speed on the things I'm about to talk about, but don't spare my feelings if I'm not...

I'm experimenting with Cheetah as part of a game-oriented workflow. I want to model in Cheetah 3d, have it prebake light maps and get the various bits of geometry (with object names preserved) into my code where an ambient map will be multiplied into the light map on the GPU as memory constraints mean that the light map will likely be of a quite low resolution.

Quick youtube video of efforts to date (the target device is an iPhone, hence the relatively low quality video that features quite a lot of my finger): http://www.youtube.com/watch?v=gfzazLI46kM.

So far it seems like this is going to be a labour intensive way to proceed. Can anyone tell me if I'm correct about the following assertions?

(1) you may convert only exactly one object at a time to polygons (eg, multiple selecting objects via the object browser and selecting 'make editable' will convert only the first selected);
(2) there is no Javascript interface for converting objects to polygons;
(3) texture baking is exclusively a per-object function (eg, you cannot say "I want to pre-bake a single texture to cover objects X, Y and Z"); and
(4) the 'Import Children' tool is not available in Javascript.

Assuming all those assertions are true, is it correct to say that probably the most optimal way to automate the light map generation task would be to write a script that saves the document out to an obj (which seems to convert all objects to polygons), issue a system tool to execute some command or another that can parse the OBJ and kill all the 'g <object name>' lines (assuming for argument's sake that I want a single light map for the entire scene though smarter methods could be applied), have the result OBJ opened so that all objects are collapsed to a single object, then manually set up the baking parameters I want and bake?

I'm actually a really awful artist and the basic castle model in the video is probably the single most artistic thing I've ever done. I therefore claim no real experience of modelling or modelling packages, and may still be missing obvious solution or trying to fight the user interface rather than just figuring out how to work with it...

Thanks in advance for any responses!
 
In general, object baking (in other 3d programs too) is not very much fun to do. Just going through the tutorials on how to bake a scene in Lightwave or Blender will make your eyes glaze over. (And C3D, unlike many other packages) supports dual UV sets per object.)

All that said:

You are pretty much correct in everything you say, however it's quite easy to combine meshes so that, for example, an entire game level is converted into a single mesh. The restriction on only converting one object to an editable mesh is hardly bothersome since almost any non-trivial object in a scene will already be editable.

The tough part with baking is almost always going to be modeling, texturing, and UV-mapping. Unless your models are cubes, the texture baking part of it is NOT going to be the bottleneck.

The real problem in my experience is that baking is -- again as you've surmised -- not a very automatable part of a workflow, so in general I would keep a model in its pre-baked state as the "final" model, then do the steps necessary to bake it and save that as the "final final" model, bake, and then that's the game object. But I have to go back one step if I need to make changes -- and there's no real way around that. This is a shame since without baking the C3D --> Unity workflow is totally seamless (and you could easily engineer something similar yourself by getting C3D to convert its files to FBX via the command line -- I assume Martin will provide the details on request).

In the worst case, there's really nothing preventing you from doing the baking yourself in your own engine.
 
In general, object baking (in other 3d programs too) is not very much fun to do. Just going through the tutorials on how to bake a scene in Lightwave or Blender will make your eyes glaze over. (And C3D, unlike many other packages) supports dual UV sets per object.)
Don't get me wrong, Cheetah 3d is a marvel. My eyes glaze over at the mere thought of Blender. It's a testament to the quality of Cheetah 3d that I've had the package something like 3 or 4 days now, and this is the only thing I'm having to ask about, it being — as you note*— not exactly critical.
The tough part with baking is almost always going to be modeling, texturing, and UV-mapping. Unless your models are cubes, the texture baking part of it is NOT going to be the bottleneck.
Although the texture baking may not be <i>the</i> bottleneck, it could easily be <i>my</i> bottleneck, given the role I'll be taking within a team should this project go ahead. Though obviously it's substantially much less of a bottleneck than it might have been because of Cheetah 3d. I almost feel guilty to have jumped on board while the software is reduced in price.
The real problem in my experience is that baking is -- again as you've surmised -- not a very automatable part of a workflow, so in general I would keep a model in its pre-baked state as the "final" model, then do the steps necessary to bake it and save that as the "final final" model, bake, and then that's the game object. But I have to go back one step if I need to make changes -- and there's no real way around that. This is a shame since without baking the C3D --> Unity workflow is totally seamless (and you could easily engineer something similar yourself by getting C3D to convert its files to FBX via the command line -- I assume Martin will provide the details on request).
I think I'm going to avoid FBX for the time being. Having to sign up just to download the SDK and with no description of the format available does tend to focus the mind on the exploration of other options. Given that the target is the iPhone (the original, irrespective of anything announced later today), we're restricted to two texturing units anyway so while there has to be an explicit "this is the map, it's done, now bake the lighting" step, we're going to end up with pre-baking and post-baking files with identical geometry in any event. So I can grab the iPhone's maximum usable two sets of UVs from those two separate files, as OBJ probably. As none of the vertex locations or normals will have changed, it should be trivial to match up the two files.

Anyway, I guess this is all way off topic for this board now that the initial questions have been answered. Thanks for replying, you've given me lots to think about.
 
Back
Top