2
$\begingroup$

I'm very new to blender and I'd like to know if it's capable of what I require from it before investing my time into learning the programme, so any help is greatly appreciated!

My problem as simplified as possible:
enter image description here

Is it possible when modelling the light source as the sun, to be able to numerically export information as to whether sections of the plane (shown above) are shaded, and maybe the percentage to which they are shaded?

If yes, could someone enlighten me on how to please!

$\endgroup$
1
  • $\begingroup$ What do you mean numerically? Like for a plane as a grid 10x10 faces (pixels) export as a table with two columns for x / y pixel position in the grid and one column for 0/1 info (shade/light)? It sound like something for image analyser app that can use baked texture from blender as source. Percentage in general can be represented by a grey color generated by Average filter in Photoshop or blender compositor (Blur>Flat multiply by image pixels), so since BW color space is 0-100% of black it could by written by python as a number ... means I think you will need someone with python skills. $\endgroup$
    – vklidu
    Sep 7 at 12:01
1
$\begingroup$

I'm not sure if this could be solved entirely within Blender, but you would start by baking the Shadow on the plane to an image texture. I'm not sure how you would process the amount of shadow on the final image, but here is how you can Bake a shadow map:

  1. Create the scene as intended, attached is a recreation of your screenshot

  1. Select the Plane or whatever target you want to take the shadow detail from

  2. In the Node Editor view (Easy way to achieve this is through the Shading Layout Tab at the top), create an Image Texture, but do not connect it to the principled BSDF. Click "New" and set the name, desired resolution of the map. Make sure the Image Node is selected in the editor before you go to bake. enter image description here

  3. Go to the Properties Tab and select the Camera icon. You will need to be in the 'Cycles' render engine.

  4. Scroll down until you see the 'Bake' tab. Change the Bake Type from Combined to Shadow

enter image description here

  1. Select "Bake" and wait, depending on scene size this may take longer.

  2. The resulting image texture:enter image description here

You can also bake to Vertex Colors of your plane, by instead adding a Vertex Colors layer to your Mesh's Data, then switching the Output -> Target under Bake to Vertex Colors. This will require extra geometry to accurately bake, but depending on the desired output information could be easier to work with. An image is likely easier to process and is far cheaper to deal with than geometry at the same scale.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.