top | item 42818577

(no title)

barathr | 1 year ago

Any chance that Threlte makes it easy to do view-independent rendering / ray tracing? Basically if you have many surfaces in your scene and you want to not just visualize the scene but find out how much light is arriving at any surface (even ones the camera currently can't see), is that something Threlte enables?

I'm interested in computing light that trees receive and want to be able to visualize it but also have even leaves that aren't in view to continue to receive light during the simulation.

discuss

order

______|1 year ago

The main Raycaster class in three.js (which you can access / use via refs from Threlte) isn't tied to the view, but can be used to cast from any point.

It might get computationally expensive to point that raycaster in many directions and intersect with all leaves. I'm not aware of a way to do "bulk" raycasting in three.js yet.

Separately, the lighting / shadows can compute visually shadow and lighting. But I'm not aware of a way to then easily measure out how much of a mesh is in shadow.

I am also interested in tree simulation -- I'm tinkering on a arborist/lumberjack game where you trim / cut down trees :)

jhurliman|1 year ago

three.js might not be the right fit for computational rendering/raytracing, optimization techniques like frustum culling are more or less baked into the engine.