Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean/Improve Graphics #37

Open
costashatz opened this issue May 10, 2020 · 7 comments
Open

Clean/Improve Graphics #37

costashatz opened this issue May 10, 2020 · 7 comments
Assignees

Comments

@costashatz
Copy link
Member

costashatz commented May 10, 2020

The Magnum GUI is working well, but there remains to be a lot of cleaning and more features. In particular:

  • Clean up the code related to graphics/Magnum
  • Go through the OpenGL stuff and investigate if we can be better/faster
  • Provide all the parameters to the user (e.g., shadow map sizes, light features, etc.)
  • Integrate Magnum UI in a generic way
@costashatz
Copy link
Member Author

costashatz commented May 11, 2020

One idea to (possibly) make the GUI faster (credits to @mosra for this idea):

  • call draw(), let the gpu work on that
  • simulate physics while the gpu works
  • only then call swapbuffers

Instead of the current:

  • simulate physics (takes CPU time)
  • draw() (takes GPU time)
  • swapbuffers (CPU idle, waits until GPU is done)

To test if it is actually going to help..

@costashatz
Copy link
Member Author

costashatz commented May 11, 2020

Other ideas to improve rendering times (again credits to @mosra):

  • Instancing, e.g. see here, see also Bullet example of Magnum
  • When constructing the Magnum GUI, the user could request the types of lights and max lights per type; this way we do not need to allocate before-hand all the textures (saves quite a lot of GPU memory)

One more thing to check is the way I am plotting transparent objects (I have a feeling that I am wasting too much time there, even if we do not have any transparency).

@costashatz costashatz self-assigned this May 11, 2020
@costashatz costashatz added this to the RobotDART 1.0.0 milestone May 12, 2020
@costashatz
Copy link
Member Author

A first cleaning was done with #47... Another thing to investigate is the defines for the plugins; it should not be needed for newer versions of Magnum.

@jbmouret
Copy link
Collaborator

I think the graphics do not need to be faster (graphics is not slowing us down, I think). But simpler is better for long-term maintenance.

Also, we need maximum performance in no graphics mode. We usually do not care much in graphics mode (in the worst case, we record a video and play it at the right framerate).

@Aneoshun
Copy link
Contributor

I agree that graphics should remain simple for long-term maintenance. However, we are more and more using cameras during the training, and more and more in video streams. So, faster graphics without overwhelming complexity would be welcome.

(And I agree, max perf in no graphics mode is priority).

@costashatz
Copy link
Member Author

costashatz commented May 18, 2020

I agree that graphics should remain simple for long-term maintenance. However, we are more and more using cameras during the training, and more and more in video streams. So, faster graphics without overwhelming complexity would be welcome.

I tend to agree with Antoine. I am planning to use the cameras quite a lot in the coming future and thus faster graphics would make my life easier. Of course, faster does not necessarily mean more complex.

Also, we need maximum performance in no graphics mode.

I think we do not really add any serious overhead over plain DART, do we?

@costashatz
Copy link
Member Author

Implement Cascaded Shadow Maps for Directional Lights (see here and here).

@costashatz costashatz removed this from the RobotDART 1.0.0 milestone Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants