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

Large number of draw calls on road demo #2

Closed
kfarr opened this issue Oct 20, 2020 · 2 comments
Closed

Large number of draw calls on road demo #2

kfarr opened this issue Oct 20, 2020 · 2 comments

Comments

@kfarr
Copy link

kfarr commented Oct 20, 2020

Hi there, I really appreciate the work you've put in to the road geometry creation logic, it seems to work very well. However I am seeing a large number of draw calls (it appears to be correlated with the # of lengthSegments and "segments" of road)

To reproduce issue:

Impact:

  • it is difficult for me to use this inside of a more complicated scene that is already draw call constrained
  • For example opening this scene in an oculus quest results in dropped frames, ostensibly due to draw call count not total polygon count

Instead:

  • is it possible to refactor the road creation functions such that only 1 draw call is used for the length of each segment? ie in this demo case there would be 5 draw calls regardless of lengthSegments value

Workaround:

  • In the meantime I will try testing with much lower values for lengthSegments and curvePoints to see if I can get draw calls to a useable threshold with the existing code base
@hofk
Copy link
Owner

hofk commented Nov 28, 2020

Sorry for the late reply.

I am currently not working on the project. The solution was based on a request. See https://discourse.threejs.org/t/create-a-curved-plane-surface-which-dynamically-changes-its-size/6161

I then added a variant to the addon.
https://discourse.threejs.org/t/addon-to-create-special-extended-geometries/1855/

I also had a similar performance problem. There is a reference to renderer.info.render there.
See https://discourse.threejs.org/t/jerky-camera-movement-with-many-objects/15168.
But I don't know much about the internals of three.js, I am not an expert.

You could be in the topic
https://discourse.threejs.org/t/create-a-curved-plane-surface-which-dynamically-changes-its-size/6161/ make a request.

We may receive an explanation and a suggestion for improvement from an expert.

@kfarr
Copy link
Author

kfarr commented Dec 7, 2020

Thanks @hofk appreciate the project background info! I have some work to continue that doesn't depend on this but if it becomes a true blocker then I will dig in more and add more requests for help from others.

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

2 participants