How do I limit the number of volumes in which shadows are cast?

Discussion in 'Priority support' started by Markus Klar, Mar 30, 2020.

  1. Hi,

    I want to remove the shadow of some particular geoms, for example this one:
    <geom name="origin_i" type="box" pos="0.30 -0.024 -0.38" size="0.4 0.4 0.4" rgba="0 0 1 0.05" contype="0" conaffinity="0"/>

    Is that possible and if yes, what's the easiest way to achieve this?

    Thanks and best regards

    In body/ light it says: "Higher quality of the shadows is achieved by increasing the value of the shadowsize attribute of quality, as well as positioning spotlights closer to the surface on which shadows appear, and limiting the volume in which shadows are cast."
    But I guess that only means that you can downsize the space in which shadows are cast by one particular light...
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    Indeed you cannot control whether or not individual geoms cast shadows. You can control the properties of the light only.
  3. Thanks!
    So one could possibly build a spotlight for each of the elements that should cast a shadow. Combined with a main light source that does not cast shadows, that may work. Maybe I will try that out.
  4. Emo Todorov

    Emo Todorov Administrator Staff Member

    Yes, in general one can do a lot with lighting. MuJoCo exposes the fixed-function OpenGL lighting model essentially one-to-one.
    Markus Klar likes this.