question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

overrideMaterial for nested scenes

See original GitHub issue

It is possible to add a scene to another scene. However, setting an overrideMaterial on a nested scene has no effect. Only the overrideMaterial of the root scene is honored (and changes the material of children of nested scenes also as expected).

I expected (and am suggesting now) that it is possible to set an overrideMaterial on any scene, and that it overrides the overrideMaterial of parent scenes. Though that may be debatable. But the documentation in this regard could be improved in either case.

My use case: I have several Sub-Scenes loaded from different GLTF files in my root scene, and want to highlight specific ones under certain conditions with a special material.

Live Demo

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:20 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
WestLangleycommented, Jan 10, 2020

@donmccurdy Can scene be a Group and scenes be a Group[]?

2reactions
donmccurdycommented, Jan 9, 2020

Ok, let’s change the return type of GLTFLoader to {scenes: Object3D[], ...}. If we want to do something to more explicitly prevent Scenes from being nested, library-wide, I’ll leave that decision to others.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scene#overrideMaterial – three.js docs
Scenes allow you to set up what and where is to be rendered by three.js. This is where you place objects, lights and...
Read more >
3ds Max 2017 Help: XRef_Material : Material
overrideMaterial Standardmaterial default: Material #67:Standard -- material; ... Contains true if the XRef material is nested, false otherwise. Read-only.
Read more >
FP7 and Corona Override Material - Itoo Software Forum
I want to be able to turn off all of the materials in my scene and focus on the vegetation. Using the nest...
Read more >
Override - V-Ray for Rhino - Chaos Help
This page provides information about the Override material in V-Ray for Rhino. ... The first scene is rendered with two VRay materials.
Read more >
RenderManAPI: Group Class Reference
Override material binding. More. ... The scene graph DAG hierarchy is constructed of parent-child ... Nested DAGs avoid flattening during scene transveral.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found