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

Octree light partitioning #2

Open
cjcliffe opened this issue Nov 22, 2010 · 3 comments
Open

Octree light partitioning #2

cjcliffe opened this issue Nov 22, 2010 · 3 comments
Assignees

Comments

@cjcliffe
Copy link
Owner

Need a way to calculate the lights that apply to each sceneObject so that when rendering we're not doing excessive drawing of objects that are outside the range of a particular light.

Perhaps having an .active_lights array for each sceneObject with two lists in it, one for dynamic and one for static lights (so we can splice them together on render). If the octree can somehow fill these lists on each pass we'd have a forward-run of just visible objects with their active lighting set.

We'll need a static/dynamic flag for objects and lights and hopefully the static stuff can be computed when a light/object is added and the dynamic can be a slightly more efficient system that uses object tracking like we have now.

@cjcliffe
Copy link
Owner Author

Some additional notes:

For static light source clusters or dynamic lights attached to objects (i.e. car headlights) we could group them into single sets with unified bounds, might save a fair bit of time iterating individual light sources when there are many clustered together.

@cjcliffe
Copy link
Owner Author

Another note:

Add the ability for SceneObjects to have a static/dynamic setting. SceneObjects with at static flag vs. a static light we can perform additional more expensive bounding box check on insert (not AABB, BB planes) to reduce the need for high-resolution octree to accomplish the same overlap resolution.

humphd pushed a commit to humphd/CubicVR.js that referenced this issue May 21, 2011
@cjcliffe
Copy link
Owner Author

Investigate to ensure octree.js in #26 will work with octree light partitioning and if not, what needs to change.

@ghost ghost assigned secretrobotron Sep 28, 2011
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