-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Editor: Update realistic viewport packages #27780
Conversation
It is not correct but it was the quickest way to get things working last month 😇 |
I'll merge and try to remove the |
I guess now that we're on the topic... If the scene graph changes, or a geometry changes, or a material changes... What should I update? |
I can take a look and adjust things once "init" is changed to actually just init once (simplifying the boilerplate for a renderer is on my list). Mostly it's the textures that are being generated with "buildColorTexture" every time "init" is called right now. Everything else is guarded behind "pathtracer === null" right now which is good. |
Ah! These doesn't seem that bad then... |
Yeah the textures aren't so bad. I'm playing around a bit more, though, and the other issue is that right now the BVH and merged geometry are rebuilt every single change. This isn't a memory issue but it can be very slow if the scene / geometry is complex. If objects are moved or adjusted then we can refit the BVH but I don't know how easy it is to determine when to do that. At the least the model shouldn't be rebuilt if just the camera is moved or user clicks. I'll have to think about it a bit more. Longer term it would be good to use a worker to build the BVH, as well. |
Yes, I can take care of these. |
Done! 5838c86 Seems like we also need to call |
I can take a look later. What exactly is happening? |
Just seems like there is no way to change the background/environment settings without calling |
Oh I see - as it's implemented now, yes. From the commit I see how events are propagated, now, so it should be possible to provide a more granular message to the pathtracer telling it what should be updated. At the moment init is updating everything including the geometry, bvh, environment map, etc. |
Related issue: -
Description
Spot lights working:
cc @mrdoob it looks like
init
gets called every time the scene is modified. Is this correct? If so that means a lot of textures and materials are getting recreated with out ever being disposed.