I would like to use Rhino’s rendering capabilities to calculate shadows on objects and bake those shadows into a texture bitmap. This bitmap can then be used as texture, either in Rhino or other visualization platforms to show good looking scenes without the need for advanced rendering.
I have discovered the “Bake” command, which is very similar to what I am looking for, except it doesn’t include the shadows in the resulting bitmap.
Is there a way to bake shadows like this in Rhino? Either through vanilla Rhino, plugins or scripting - all suggestions are welcome!
Got it, thanks @BrianJ! Is there a workaround, or any way to achieve this through scripting? Does RhinoCommon provide access to an object’s render results?
Hi,
Possible in Blender useing the Cycles render engine. You can bake a range of stuff to a single diffuse texture.
Also possible in 3DCoat as lightmap baking.
I’ll add my support for such a feature in Rhino Cycles.
That’s great news @Steve_Howden, thanks! Do you know where I can read more about the Blender Cycles texture baking workflow? Any documentation or tutorial? I’m not super familiar with Blender.
Assuming I’m able to get the baked texture including shadows in Blender, Is there a way this texture can be exported and brought back into Rhino?
Wow. Idk that this feature of extracting textures exists in Rhino.
I was actually looking for this a while back.
Maybe the Mcneel team can change the name of the command to something else so that this doesn’t get confused with bake of
grasshopper. “ExtractTexture” or something like that.
Sort of right. When you say textures (plural) you might be exporting a variety of textures that had lighting applied in Blender. If you then plugged those textures into slots in Rhino materials and lit them in Rhino, you would get visual conflicts.
Much better to bake everything down to a single diffuse texture and apply that single texture to a material in Rhino.
When I say single texture, I mean single texture per object
Yes, that makes sense. Thanks for clarifying that.
Actually, when I think about it, what I’m really after is the shadow/ambient occlusion effects. So ideally, the export from Blender would be a single texture per object containing only a greyscale bitmap of the shadows. That would allow me to apply the bitmap as a transparancy map, so that I can control and calibrate the object’s “real texture” (let’s say wood panel) from Rhino.
Not sure if it makes sense to do it like this - I would love feedback, See below for more info about the propsed workflow.
Setup
This scene contains two surfaces with a small distance between them. The upper surface will be used a transparancy texture calculated in Blender.
This geometry is a duplicate of the real object (or perhaps with a small offset to prevent Z fighting). It is imported to Blender (along with other objects) where the texture is caluclated. The texture is then applied in Rhino as a transparancy texture.
You’ve got it. Just export the baked shadows or ambient occlusion you want and then composite in Photoshop to create new material or do as you describe with the extra object
Have fun, Steve