-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Handling multiple scenes without a default scene #815
Comments
Most basic application can visualize first scene. |
@lexaknyazev what do you think? Since |
Off-topic but somehow related: A similar recommendation could be included for the |
My point was a different one: I think that scenes and cameras are implicitly "connected", via the nodes that they contain or attached to. (EDIT: But I might have been wrong. One could simply say that the list of cameras that can be selected by the user are only the ones that are attached to nodes of the currently active scene. So even though it might be based on a misunderstanding, I'll leave the remaining part of this comment here) Assume that you have two scenes
And there are two cameras:
When only I think that Patricks comment did not refer to the nodes or an empty |
@javagl I don't think we can make any default camera requirements. For example, in Cesium, if a glTF model includes cameras, the user most likely does not want to use it by default since they already set up their camera in the engine.
Not exactly, I am proposing:
|
I did not propose that, but see that if there was an explicit |
I'm working on library (C99) based on COLLADA specs and working on viewer (currently Cocoa), after finished implement full COLLADA specs I'll work on glTF as well (will be open source soon) Here how to I select camera for my scene: In viewer, currently I'm rendering with default camera but I'll list all cameras, user may pick any camera in scene. @javagl I think you are right, cameras which are only referenced in visual scene must be selectable... Also I it seems it is a viewer/engine issue Sorry when started working on glTF I'll speak more specific to glTF :/ |
@recp slightly tangential, but when your glTF engine is ready, please open a pull request to add it to https://github.com/KhronosGroup/glTF#gltf-tools |
PS: I'll also mix glTF with COLLADA through technique/profiles (sorry this is out of topic :), I'm a little excited): <mesh>
<source id="mesh-data">
<technique profile="gltf">
<gltf type="binary" url="gtlf-mesh.bin" />
</technique>
</source>
<vertices id="mesh-vertices">
<input semantic="POSITION" source="#mesh-data"/>
</vertices>
<triangles count="...">
<input semantic="VERTEX" source="#mesh-vertices" offset="0"/>
<input semantic="NORMAL" source="#mesh-data" offset="0"/>
<p>...</p>
</triangles>
<mesh> I'm really working hard to finish this importer/exporter/runtime lib and rendrer lib both are written in C99 |
Just to be clear: are |
Ah, I remember now. We wanted to be very loose with what was required so that users could use bits and pieces of glTF, e.g., a user might not want a scene hierarchy, they just want to access the Do you think it is reasonable to require |
Let's look at all combinations:
The question about nodes not participating in any scene remains. |
I would ignore them like glTF does for other extra properties like But this
makes it sound like they should be one node scenea that are rendered by default. Perhaps if |
Makes sense. This should clear remaining ambiguity, given that |
Cool, let's do it! |
@pjcozzi
Currently, each top-level array is empty by default. {
"scene" : {
"allOf" : [ { "$ref" : "glTFid.schema.json" } ],
"description" : "The index of the default scene."
},
"scenes" : {
"type" : "array",
"description" : "An array of scenes.",
"items" : {
"$ref" : "scene.schema.json"
},
"minItems" : 1,
"default" : []
}
} What do you prefer:
I think that we should disallow empty arrays throughout the whole spec: when an asset doesn't need some kind of objects, it mustn't define corresponding top-level array at all. |
+1 |
Updated in #826 |
The 1.0 specification says about scenes :
Hereby, the
glTF.scene
property is not requiredSeveral loaders and viewers are assuming that the
glTF.scene
property is present. Moreover, it is not clear what should happen when there are multiplescenes
, but no defaultscene
.Should viewers then load and display all scenes? Or only the first scene? Or an arbitrary one?
(This question has some analogies to the
cameras
: There is no defaultcamera
, and viewers seem to be free to pick any camera for the initial rendering).Pull request where this issue originated from: KhronosGroup/glTF-Sample-Models#18 (comment)
Related issues: #39 , #150 , and maybe others...
The text was updated successfully, but these errors were encountered: