Texture baking is your friend
Texture baking has been known to the Flash 3d community since a long time, but a quick look into Google shows us that it is not a very popular topic. I think it definitely should get more attention. In Flash performance is always an issue, and high quality is always expected by our clients. Texture baking helps to achieve this goal.
In short, it consists of getting all the lightning effects of a material and “burning” them directly on the material itself. After such operation, the lights cannot change anymore, but the material gets a nice effect of depth and it doesn’t require any more computations at runtime.
Most of the available 3D software offers a texture baking function. For the demo above, I did choose Blender because it’s free (it also has a very weird user interface, but I digress). On the Flash side, it runs on Away3d.
To create a model with baked textures in Flash I followed this steps:
- Create the 3d model of the chair in Blender
- Project all the faces of the model on to an bitmap (in Blender its called UV Unwrapping)
- Paint the texture in Photoshop
- Import the texture to Blender and apply it to back the model
- Add lights and bake the texture on to another bitmap
- Export the geometry with the UV information included (Collada or Wavefront)
- Export the baked texture as a jpg
- Import both into Flash and use your favorite 3d engine to render
Each of the steps above could require a separate tutorial, so instead I published some files created in the process to give you a better idea. You can get them here. Please note, that this is only a reference material – it is not supposed to be built or compiled or anything.
Additionally, for those of you who use Blender a nice tutorial on both UV Texture Mapping and Texture Baking is available here.
In the current state of Flash 3D and its overall performance, texture baking is a highly useful technique that allows to achieve very good results. If you do not believe me, take look at some of the most awesome Flash 3d pieces that came out in the last few months:
- Bunker demo by Alternativa3d team (sources available here)
- EcoDaZoo by Roxik
I am sure you’ve seen them before anyway. They both combine great visual effects with a very high performance. And guess what… in both of them, you’ll find baked textures all over the place!




Very nice looking effect.
Hey if you want a step-by-step simple tutorial on prepping a COLLADA file from Blender with UV map, go to http://www.alteredegg.com/cms/index.php?option=com_content&task=view&id=42&Itemid=18
[...] > Everyday Flash / » Texture baking is your friend / by Bartek Drozdz [...]
Hi, I’m wondering if you can use this teqnice to render animations from blender and show them in pv3d?
technique i meant :)
thanks allan!!
@Allan thanks for this link. I forgot about that one, but it is definitely the best tutorial on the matter.
It was my guide some time ago in my first attempt to import 3d objects from Blender to Pv3d. I wrote a small note on that here: http://www.everydayflash.com/blog/index.php/2008/03/01/from-blender-to-papervision3d/
@dave While I did not try this so far, I am pretty much sure that baked textures can be applied to a mesh that is animated afterwards and exported into a Collada file.
i have the same question like dave (i know its posible but how) CAN I IMPORT ANIMATION FROM BLENDER, MAYA OR ANY 3D PACKAGE TO FLASH IN PV3D? I’VE GOOGLE AND NO RESULT
@cris I didn’t do any experiments with imported animation yet, but Collada files (DAE) support animation channels that can be exported from Blender/Maya and imported into Flash. I found the following examples:
http://www.infiniteturtles.co.uk/blog/away3d-multimario – Collada animation in Away3d
http://blog.r3c7.net/?p=216 – another animation example in Away3d
http://blog.r3c7.net/?p=160 – Collada animation in Papervision3d
(both post are in Japanese, but the demos are definitely worth seeing)
nice one. One question comes to my mind… isn’t it possible to make texture baking in flash? Take a model, take the texture, take light positions, BAM, texture baking :) why don’t? :)
@bartek Hi, nice to meet a namesake among my readers.
To answer your question: yes it would be perfectly possible to bake the textures like that if you use a light source in Away3D or Papervision3D. However, 3D IDEs will be able to bake textures with a lot more detail including shadow cast by other objects and some advanced settings.
Take a look at an interesting experiment by Fabrice Closier from the Away3D team: http://www.closier.nl/blog/?p=80 He doesn’t bake textures, but does create a normal map in Flash based on the mesh, which is a bit in the same spirit.
Love your site it’s got some great stuff on it. Is it possible to get a copy of the Action script you have used for the char rotation? I have done something like this already but it does not work anywhere near as well as this one.
Regards Geraint
[...] Texture baking is your friend Everyday Flash Posted by root 20 hours ago (http://www.everydayflash.com) Texture baking has been known to the flash 3d community since a long time leave a comment cancel reply name e mail not published website blog twitter url entries rss comments rss powered by wordpress Discuss | Bury | News | texture baking is your friend everyday flash [...]
[...] Checkout this tutorial by Blitz Lab about Unwrap, Baking a texture and Collada exports. Checkout Texture Baking is your friend. Checkout this tutorial about AS3exporter and [...]