transparency in walkthrough + radiaosity

Hi there,

I want to have transparent objects in my walkthrough (generated runtime.exe). So I use only uv-mapping for textures. For semitransparent objects I use a .tga with alphachannel and in uv-editing I have set the texture face properties “tex” “collision” “alpha” and use “copydrawmode”. If I test the scene with “p” or exporting it to runtime.exe everything is fine (transparent texture) but lacks shadows. To get static shadows I use the radiotool and replace the meshes. But now the transparent material is becoming to much transparent. I have tested out the same object with a .tga-image without an alphachannel (but “alpha” still selected in the texture face properties) - the result is an aproximated 50% transparency of the non-transparent uv-texture. Why? I thought, blender has to take the trancparency in this case directly from the alphavalues in the .tga, but it seems that Blender don’t do so. Blender adds some odd extra transparency after radiosity mesh replacement. And: the shadows seems to generated as if the transparent Objects would be opaque (to dark).

Does someone know how to get along with these two things? Or do I need to exclude the objects containing semitransparent .tga from radiosity calculation (with the effect of looking flat an not throwing shadows at all)?

tested scene without radiosity and mesh replacement (the ball in front):

http://www.larswinkelmann.de/test1.jpg

with radiosity and mesh replacement (the ball in front):

http://www.larswinkelmann.de/test2.jpg

because darker vertex colors make transparent objects more transparent and i’m guessing it make it all really dark

hello, i’ve been experimenting with the new object material baking options and i think it could help you.

you’ll need a recent CVS build. go to Graphicall and grab it.

quick tut

  1. set up your scene, UV map your objects.

2 run the radio sim, when it finishes hit the add new meshes button(not replace meshes) on a different layer

  1. select the new radiosity mesh (all seperate objects become one mesh after radio sim) and enter face mode. hover the mouse cursor over one of your objects (Sphere for example)and press’L’. faces sharing UV information will be selected, press tab to enter edit mode and press ‘P’ seperate selected.

  2. the seperated ‘Sphere’ still retains the UV layout it had before the radio calculations were done.

  3. with the ‘Sphere’ selected go to render drop down menu at top of screen>Bake-render meshes>Full (make sure there are no lamps in your scene and ambient occulsion is off)

  4. the radio calc is baked to a texture and you can go back to your original ‘Shpere’ object (without radio) and apply it as a UVtexture.


this should solve your problem as it takes the use of -vertex colours out. it also has the advantage of using the original resolution meshes and not the subdivided radion mesh.

of course you can edit to baked UV image in gimp. adding a transparency.

Aout the new bake option, there are a few things i have noticed.

  1. you must have a resonably well UV layout. minimal stretching.

  2. keep space between your UV sections, the baking extends the edges of the uv sections a few pixels to avoid black seams.

  3. make sure you have an image in the uv window for the object your going to bake or it just wont work. (with object selected in face mode, with faces selected, go to uv window- Image>new, set size values and it will give you a new blank black image)

  4. Save your UV texture image after baking! when you move on to bake your next object the one you have done previously will revert back to its last saved state.


P.s, you could use this same technique to bake Ambient Occlusion to get nice shadows. it’d be a bit slower but slighty less set up.

hope this helps you ( and i haven’t gone on a bit of an off topic rant…)
there is a post somewhere on this, just search for Baking Radiosity.

good luck,
Mark