Doubts about maze env and odd images of first-person camera

Discussion in 'Visualization' started by lin, Mar 1, 2018.

  1. lin


    I'm working on a maze environment, and studying the scenario of first-person visual navigation. The attached are the xml file and two camera images.

    I have two questions:
    1) From the first image (named "world.png"), the colors of some walls are dark, which is problematic in the scenario of visual navigation. Is there any way to let the entire environment bright?
    2) From the second image (named "first-person.png"), which is the first-person view of the agent, and the box geom indicates the direction of first-person view. However, the image is quite odd. It seems that the images, which the agent collected during its exploration, sometimes contain information w.r.t the places inside walls (boxes) and outside the maze. The reason I guess might be the agent could see through walls. Can you give me some advices?

    You can simulate the xml to get the above images directly by pressing "]" to switch cameras.

    I'd appreciate if you could help me, and this will help me a lot with my research!

    Attached Files:

    Last edited: Mar 1, 2018
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    If the image is dark, you need extra lights. Note that animation studios hire large numbers of lighting artists whose job is to insert lights in simulated scenes and make them look good - this is essential.

    As for seeing through walls etc, cameras have clipping planes. In particular, if the near wall of the box is closer than the near clipping plane, that wall will be ignored and the camera will see inside the box (or even on the other side, if the entire box is closed than the near plane). You can set the clipping planes of MuJoCo cameras in the XML:

    <map znear="0.001" zfar="1000"/>
  3. lin


    Thanks for your reply.

    The adjustment of lights is quite a difficult thing for me. When I defined multiple lights, the geoms of walls became too bright, so much so that the color of geoms changed. Finally I remove all the self-defined lights, and set the ambient of headlights to a relatively large value, which looks not bad (just a little dark).

    The settings of "znear" and "zfar" solve my second question.

    Thanks again!
  4. Emo Todorov

    Emo Todorov Administrator Staff Member

    Note that each light has multiple parameters. Generally you get better looking scenes if you define multiple lights and turn down the light intensity -- which you can do by setting the various RGB attributes of the light.