blender baking technique

I want to create a better indoor scene demo from this example:

I’ve modified it a bit such that it uses fewer polygons. This is the render image:

I bake some objects accordingly (not all objects yet), and export it:

Looks like a lot of lights and details are missing. What should I looks into and any techniques in texture baking ?

looks like you’r missing objects on export. be sure to select them all when exporting.
note that specular effects form lights are not baked. those have to applied in panda using materials or shader.
volumetric lights are also un-bake-able and have to be added later on again.
same with reflections for the watersurface

Yes, not all the objects are exported, because I have not yet finish the modifications yet.

About the volumetric lights, is it possible to bake to a 3d texture and write a shader to handle it in panda ?

nope. you have to go other ways.
one would be to use fog-volumes (not very common)
another would be to simply use some planes to make up some pseudo-volumetric object. it’s used from time to time and gives reasonable good results.
or you write some kind of fancy shader which does the job for you. there already is a volumetric-light shader in panda right now which might work good enough for you.

It’s a lot easier than that.
Make a separate render pass rendering everything black but the windows. Then create a CommonFilters for that buffer and call setVolumetricLighting.

But the most important in your scene is the missing materials, HDR and bloom.

All of these things can be handled by Panda without writing your own shaders.

Thank you for your advices…I will try it.

It would be great if later someone can provide a tutorial to guide a scene constructions from blender to panda, with all these mentioned tricks dealing with the blender scene. I can imagine the game/demos will look much better if I can have the rendered scene translated to the game.

Well, if you’ve defined materials in blender, they should show up in Panda, if you have lights. Do you have lights at all, in your scene? If not, don’t expect lighting to show up. :slight_smile:

To get the idea of fake scattering maybe its a good idea to put point lights in each of the windows or so.

Here’s a cheap trick to “bake” volume light:

Place a cube in the window, map it with so, that the end near the window is nearly opaque and the end inside the room in nearly transparent, move the verts to get a shape more or less in the shape of your light volume. Deleting the faces on both ends is a good move to (one will be facing outside and the other will be transparent any way). If your baking shadows it’s best to first bake them, and then placing this cone of light so that it will fit the shadow, with dynamic lights this “light geometry” should neither cast shadows, nor be affected by light - it should be self-illuminated.

Sounds very interesting, where did you learn that ?

The light volume is a bit hard at the edges, is it possible to make it softer ?

I think the first time I’ve seen this was in Unreal, so it’s ancient :smiley:
If you put a bloom filter on top of that (or something similar with a strong blur) it should soften the edges a bit… but well… it IS a CHEAP effect.

You could use a half transparent triangle (cone) on a billboard effect or even some particle effect, but I’m not good at these.

If you want something more fancy try googling for “god rays”… I’ve no idea how that works (fragment/vertex magic)

Excellent idea wezu. You should make a tute on this in blender and post it somewhere. I know that the concept is simple but simple to you and me might not be simple to everyone.

Well, it won’t work if you’re inside that light ray. Still, setVolumetricLighting is easier and a lot more realistic :slight_smile: