gz-sim icon indicating copy to clipboard operation
gz-sim copied to clipboard

Light visuals are enable by default

Open nkoenig opened this issue 2 years ago • 9 comments

Environment

  • OS Version: Ubuntu 18.04
  • Fortress Source

Description

The green light visuals should not be visible by default. Similar to other diagnostic visuals, such as joints an inertia, the light visuals should be toggled on/off manually by the user via the right-mouse menu.

nkoenig avatar Oct 05 '21 03:10 nkoenig

+1 for having the ability of toggling the visibility through the GUI. It would also be nice to do it on the SDF, like how sensors have the <visualize> tag, we could add one for lights.

I'm not so sure about hiding them by default though. The user view is meant to help build and debug the simulation. Hiding the light visuals may confuse users who don't know how to find the lights. I believe other 3D software packages also display lights to the user in edit mode by default.

chapulina avatar Oct 05 '21 17:10 chapulina

Is the light visualization logic in ign-gui or ign-gazebo now?

My reasons for off-by-default are:

  1. The light visuals are a debug tool, which doesn't seem like it should appear unless you need it. Like turning up verbosity.
  2. It's not entirely intuitive what the green lines are unless you are familiar with Ignition.
  3. We don't display other meta-visuals by default.
  4. Probably the most important is that people creating videos and screenshots will likely not turn off the light visuals. This will result in media and videos containing the green light visuals.

nkoenig avatar Oct 05 '21 23:10 nkoenig

Is the light visualization logic in ign-gui or ign-gazebo now?

It's here:

https://github.com/ignitionrobotics/ign-gazebo/blob/fc2a98ec5e1b149d773eeb6cae4a407bd82a81a2/src/rendering/SceneManager.cc#L1000

The light visuals are a debug tool, which doesn't seem like it should appear unless you need it. Like turning up verbosity.

I get the point. I think it would be good to be consistent though. Should the grid be invisible by default too? That's currently on by default as per the SDF spec.

Maybe it makes sense to make world light visuals on by default, like the grid, but link light visuals off by default, like joint, collision, etc?

It's not entirely intuitive what the green lines are unless you are familiar with Ignition.

I'd argue that Gazebo classic users are familiar with the lines, but I'm not the best person to judge.

We don't display other meta-visuals by default.

See the point above about the grid. The world origin is also displayed by default on Gazebo classic, but it hasn't been ported to Ignition yet.

people creating videos and screenshots will likely not turn off the light visuals

If they create them with a camera sensor, then the lights will not show. If they create them with the GUI camera, then I think we should offer them the tools to toggle the visualization. They also need to explicitly toggle the grid right now.


Another use case is when users insert a light from the GUI; I think it's good to show the light visuals by default then, no?

chapulina avatar Oct 06 '21 00:10 chapulina

+1 for not displaying light visuals by default. From the perspective of creating videos and screenshots, the grid doesn't really get in the way unless you have a textured ground plane. The light visualizations however do get in the way and can be distracting. Maybe its because I'm more used to having the grid on the ground.

I get the point. I think it would be good to be consistent though. Should the grid be invisible by default too? That's currently on by default as per the SDF spec.

Consistency is good in general, but in this case I don't think we should have a binary approach where we either enable all debug visualizations by default or not. If we did that, like you said, we'd have to display link and joint frames, collisions, contacts, etc. Instead, we should make judgment calls as to what are good defaults and allow users to enable the ones that are disabled by default when they need to.

azeey avatar Oct 11 '21 16:10 azeey

These are all fair points, @azeey . I just think they're coming from a specific use case of creating videos and screenshots, which I don't think most users are concerned about. When you open a scene to edit on Blender, Unity, etc, the light has a visual representation to aid in scene construction. These other applications do have a very clear separation between "edit" and "run" views though, which is different from Gazebo's workflow. I just want us to keep the most common use case in mind.

chapulina avatar Oct 11 '21 16:10 chapulina

I found it interesting that a user is missing the light visuals on Citadel; and they thought it was related to sensors.

https://answers.gazebosim.org//question/27446/visible-sensor-ray-in-citadel/

chapulina avatar Oct 13 '21 02:10 chapulina

with these two PRs we can consider this as done

  • https://github.com/ignitionrobotics/ign-gazebo/pull/1387
  • https://github.com/ignitionrobotics/ign-gazebo/pull/1343 ins't it @chapulina ?

ahcorde avatar Mar 21 '22 19:03 ahcorde

The question here is about whether we should flip the default behavior.

@azeey / @nkoenig , are you ok keeping the default behavior now that the visibility is configurable through SDF?

chapulina avatar Mar 21 '22 19:03 chapulina

My preference would be to have them off by default similar to how debugging visuals for inertials are off by default.

azeey avatar Mar 21 '22 21:03 azeey

I think a default of on from something you drag in the GUI is fine, but if the light was defined in an SDF file, it should follow not only the default in the specification, but the actual value specified in the file. See https://github.com/gazebosim/gz-sim/issues/1948 for something I just found.

sea-bass avatar Mar 30 '23 12:03 sea-bass