[x3d-public] Demo of loading glTF assets into an X3D scene -- using X3DOM

Leonard Daly Leonard.Daly at realism.com
Thu Aug 8 09:47:03 PDT 2019


Vince,

I have not looked at the details of your model (from SketchFab) or the 
X3D scene. My comments are mostly related to glTF and how that interacts 
with the renderer and animator.

glTF only uses Physically Based Rendering. PBR is "lit" using 
environment maps, not regular lights. It is possible to get some 
lighting from regular (point, spot, directional, rectangular, linear, 
hemisphere) lights; however, it will generally be insufficient and not 
have the proper look. Reflective surfaces (those with a high metalness 
value) will not correct. To my knowledge X3DOM does not environment maps.

The animation stored inside a glTF model is typically deformed skin 
joint animation. The only way to practically do this (make it move) is 
to use the GPU for those computations. The animator (may be the same as 
the modeler) defines the animation as either rigid (X3D mechanism) or 
deformed skin (GPU calculation based). It may be computationally 
possible to do a rigid animation in X3D.

Most objects are initially modeled as a single quad-mesh. This creates a 
single object with no inner transforms. The triangulation is done prior 
to writing out glTF as it only supports triangles. The interpolators 
would need access to the transforms of the various joints. Depending on 
how the figure was modeled, those may not exist.

Note that there are (typically) transforms for the various bones (aka 
joints). It may be possible to animated those; however, it will take 
special calculations to animate the skin of the model. There is no 
geometry associated with bones (unless the modeler explicitly models the 
skeleton).

Leonard Daly


> [cc: hanim group, other principals]
>
> Interesting work, thanks!
>
> Michalis, Andreas, Timo: the comment by Vince regarding lighting is important.  As we work towards detailed specification of loading glTF into X3D, presumably application of scene lighting to the inlined model is allowed... is that correct?  are there any special considerations or issues?
>
> Vince, Anita and William: it would also be great if we got the animation file for the "too much coffee" guy.  If BVH, we can model it with HAnimMotion node or interpolators.  If something else, we can try to adapt it.  Hoping you can get this, perhaps as part of our IEEE 3D Body Processing collaboration.
>
> v/r Don
>
>
> On 8/8/2019 7:10 AM, vmarchetti at kshell.com wrote:
>> I have prepared demonstrations of loading glTF assets into an X3D scene using X3DOM's extended capability of the Inline node.
>> The purpose of these demos was to test whether the inlined glTF asset can generate X3D events when a sibling of a TouchSensor, and the
>> answer, yes they can. Each model should respond to a mouse-over the human figure by showing a text caption above the figure.
>>
>> The demos are:
>> http://www.kshell.com/pages/gltfassets/sharpdressedman/
>> which loads a glTF exported from a SketchFab model: https://sketchfab.com/3d-models/sk-high-res-7b740c6dcf6e4c06b2ea666298fc66f4
>> My comment on this one:  I would like to add more lighting, but the X3D rendered asset doesn't seem to be effected by X3D lights -- any comments?
>>
>> http://www.kshell.com/pages/gltfassets/toomuchcoffee/
>> loading a gltf exported from SketchFab model : https://sketchfab.com/3d-models/127-333-06f2cff1d71942deaba085785dab443a
>> My comment : Don't know if it's possible to use the animation data, which seems to be referenced in the JSON index into the glTF data. The animation is displayed on the SketchFab page, the X3DOM representation is a static pose. Any Comments?
>>
>> Some common information
>>
>> For both pages I am loading the release X3DOM full library http://x3dom.org/release/x3dom-full.js,  which as of Aug 8 2019 is redirecting to X3DOM v 1.8 at https://x3dom.org/download/1.8.0/x3dom-full.js
>>
>> These models were exported from SketchFab as a folder, with a JSON index file named scene.json, a separate binary data file, and a subfolder of texture images. X3DOM make several network calls to retrieve these components of the glTF asset. My next test will be to package each model into a single .glb file to verify that X3DOM can load thge asset with a single network call.
>>
>> Vince Marchetti
> all the best, Don


-- 
*Leonard Daly*
3D Systems & Cloud Consultant
LA ACM SIGGRAPH Past Chair
President, Daly Realism - /Creating the Future/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190808/817b64c4/attachment.html>


More information about the x3d-public mailing list