GLTF object are grounding when loaded The 2019 Stack Overflow Developer Survey Results Are InStrange out of memory issue while loading an image to a Bitmap objectLazy load of images in ListViewHow to send an object from one Android Activity to another using Intents?How to load a gltf model to Three.js?GLTF on demand and LOD for masive GLTF loadgltf 2.0 BoxTextured sampleHide Loading Screen In ArFragment.gltf object black on loading in three.jsis it posible to accurately place a circle relevant to real life object using arcore?Can I load a .gltf or .glb file from the external storage
What do the Banks children have against barley water?
Did Scotland spend $250,000 for the slogan "Welcome to Scotland"?
Can a flute soloist sit?
Building a conditional check constraint
Is there any way to tell whether the shot is going to hit you or not?
What to do when moving next to a bird sanctuary with a loosely-domesticated cat?
Does the shape of a die affect the probability of a number being rolled?
Identify This Plant (Flower)
Can a rogue use sneak attack with weapons that have the thrown property even if they are not thrown?
Which Sci-Fi work first showed weapon of galactic-scale mass destruction?
Why didn't the Event Horizon Telescope team mention Sagittarius A*?
Where to refill my bottle in India?
Are children permitted to help build the Beis Hamikdash?
How technical should a Scrum Master be to effectively remove impediments?
Why hard-Brexiteers don't insist on a hard border to prevent illegal immigration after Brexit?
If a Druid sees an animal’s corpse, can they wild shape into that animal?
Why did Acorn's A3000 have red function keys?
If I score a critical hit on an 18 or higher, what are my chances of getting a critical hit if I roll 3d20?
Return to UK after being refused entry years previously
For what reasons would an animal species NOT cross a *horizontal* land bridge?
What does ひと匙 mean in this manga and has it been used colloquially?
Why isn't the circumferential light around the M87 black hole's event horizon symmetric?
Can someone be penalized for an "unlawful" act if no penalty is specified?
Falsification in Math vs Science
GLTF object are grounding when loaded
The 2019 Stack Overflow Developer Survey Results Are InStrange out of memory issue while loading an image to a Bitmap objectLazy load of images in ListViewHow to send an object from one Android Activity to another using Intents?How to load a gltf model to Three.js?GLTF on demand and LOD for masive GLTF loadgltf 2.0 BoxTextured sampleHide Loading Screen In ArFragment.gltf object black on loading in three.jsis it posible to accurately place a circle relevant to real life object using arcore?Can I load a .gltf or .glb file from the external storage
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
On loading GLTF files from the server, objects are not taking the origin but counting as position (0,0,0) from the bottom,
but when the same file we check in blender all the objects are in correct order.
Do we have to manually set the vertex location for all meshes in GLTF's, to be the origin because their relative transforms are not being respected by Sceneform.
I have tried using setRecenterMode() but didn't work.

here is my code below
hair_render = ModelRenderable.builder()
.setSource(this, RenderableSource.builder().setSource(
this,
Uri.parse(hair_gltf),
RenderableSource.SourceType.GLTF2)
.setRecenterMode(RenderableSource.RecenterMode.NONE)
.build())
.setRegistryId(hair_gltf)
.build();
body_render = ModelRenderable.builder()
.setSource(this, RenderableSource.builder().setSource(
this,
Uri.parse(body_gltf),
RenderableSource.SourceType.GLTF2)
.setRecenterMode(RenderableSource.RecenterMode.NONE)
.build())
.setRegistryId(body_gltf)
.build();
top_render = ModelRenderable.builder()
.setSource(this, RenderableSource.builder().setSource(
this,
Uri.parse(top_gltf),
RenderableSource.SourceType.GLTF2)
.setRecenterMode(RenderableSource.RecenterMode.NONE)
.build())
.setRegistryId(top_gltf)
.build();
CompletableFuture.allOf(
body_render,
top_render,
hair_render)
.handle((notUsed, throwable) ->
if (throwable != null)
DemoUtils.displayError(this, "Unable to load renderable", throwable);
return null;
try
body = body_render.get();
top = top_render.get();
hair = hair_render.get();
// Everything finished loading successfully.
hasFinishedLoading = true;
catch (InterruptedException );
add a comment |
On loading GLTF files from the server, objects are not taking the origin but counting as position (0,0,0) from the bottom,
but when the same file we check in blender all the objects are in correct order.
Do we have to manually set the vertex location for all meshes in GLTF's, to be the origin because their relative transforms are not being respected by Sceneform.
I have tried using setRecenterMode() but didn't work.

here is my code below
hair_render = ModelRenderable.builder()
.setSource(this, RenderableSource.builder().setSource(
this,
Uri.parse(hair_gltf),
RenderableSource.SourceType.GLTF2)
.setRecenterMode(RenderableSource.RecenterMode.NONE)
.build())
.setRegistryId(hair_gltf)
.build();
body_render = ModelRenderable.builder()
.setSource(this, RenderableSource.builder().setSource(
this,
Uri.parse(body_gltf),
RenderableSource.SourceType.GLTF2)
.setRecenterMode(RenderableSource.RecenterMode.NONE)
.build())
.setRegistryId(body_gltf)
.build();
top_render = ModelRenderable.builder()
.setSource(this, RenderableSource.builder().setSource(
this,
Uri.parse(top_gltf),
RenderableSource.SourceType.GLTF2)
.setRecenterMode(RenderableSource.RecenterMode.NONE)
.build())
.setRegistryId(top_gltf)
.build();
CompletableFuture.allOf(
body_render,
top_render,
hair_render)
.handle((notUsed, throwable) ->
if (throwable != null)
DemoUtils.displayError(this, "Unable to load renderable", throwable);
return null;
try
body = body_render.get();
top = top_render.get();
hair = hair_render.get();
// Everything finished loading successfully.
hasFinishedLoading = true;
catch (InterruptedException );
Have you tried opening this model in a few other viewers, like gltf-viewer.donmccurdy.com or sandbox.babylonjs.com? If the model appears correctly there, you may want to file a bug on Sceneform. If not, you may want to file a bug on the exporter.
– Don McCurdy
Mar 9 at 6:53
Yes, I have tried different viewers and it comes perfectly fine, also have filed a bug in sceneform. I guess they have these issue but till then am looking out for some workaround for this.
– Hemant
Mar 12 at 6:28
add a comment |
On loading GLTF files from the server, objects are not taking the origin but counting as position (0,0,0) from the bottom,
but when the same file we check in blender all the objects are in correct order.
Do we have to manually set the vertex location for all meshes in GLTF's, to be the origin because their relative transforms are not being respected by Sceneform.
I have tried using setRecenterMode() but didn't work.

here is my code below
hair_render = ModelRenderable.builder()
.setSource(this, RenderableSource.builder().setSource(
this,
Uri.parse(hair_gltf),
RenderableSource.SourceType.GLTF2)
.setRecenterMode(RenderableSource.RecenterMode.NONE)
.build())
.setRegistryId(hair_gltf)
.build();
body_render = ModelRenderable.builder()
.setSource(this, RenderableSource.builder().setSource(
this,
Uri.parse(body_gltf),
RenderableSource.SourceType.GLTF2)
.setRecenterMode(RenderableSource.RecenterMode.NONE)
.build())
.setRegistryId(body_gltf)
.build();
top_render = ModelRenderable.builder()
.setSource(this, RenderableSource.builder().setSource(
this,
Uri.parse(top_gltf),
RenderableSource.SourceType.GLTF2)
.setRecenterMode(RenderableSource.RecenterMode.NONE)
.build())
.setRegistryId(top_gltf)
.build();
CompletableFuture.allOf(
body_render,
top_render,
hair_render)
.handle((notUsed, throwable) ->
if (throwable != null)
DemoUtils.displayError(this, "Unable to load renderable", throwable);
return null;
try
body = body_render.get();
top = top_render.get();
hair = hair_render.get();
// Everything finished loading successfully.
hasFinishedLoading = true;
catch (InterruptedException );
On loading GLTF files from the server, objects are not taking the origin but counting as position (0,0,0) from the bottom,
but when the same file we check in blender all the objects are in correct order.
Do we have to manually set the vertex location for all meshes in GLTF's, to be the origin because their relative transforms are not being respected by Sceneform.
I have tried using setRecenterMode() but didn't work.

here is my code below
hair_render = ModelRenderable.builder()
.setSource(this, RenderableSource.builder().setSource(
this,
Uri.parse(hair_gltf),
RenderableSource.SourceType.GLTF2)
.setRecenterMode(RenderableSource.RecenterMode.NONE)
.build())
.setRegistryId(hair_gltf)
.build();
body_render = ModelRenderable.builder()
.setSource(this, RenderableSource.builder().setSource(
this,
Uri.parse(body_gltf),
RenderableSource.SourceType.GLTF2)
.setRecenterMode(RenderableSource.RecenterMode.NONE)
.build())
.setRegistryId(body_gltf)
.build();
top_render = ModelRenderable.builder()
.setSource(this, RenderableSource.builder().setSource(
this,
Uri.parse(top_gltf),
RenderableSource.SourceType.GLTF2)
.setRecenterMode(RenderableSource.RecenterMode.NONE)
.build())
.setRegistryId(top_gltf)
.build();
CompletableFuture.allOf(
body_render,
top_render,
hair_render)
.handle((notUsed, throwable) ->
if (throwable != null)
DemoUtils.displayError(this, "Unable to load renderable", throwable);
return null;
try
body = body_render.get();
top = top_render.get();
hair = hair_render.get();
// Everything finished loading successfully.
hasFinishedLoading = true;
catch (InterruptedException );
edited Mar 8 at 17:07
Jonathan Leffler
574k956881041
574k956881041
asked Mar 8 at 9:18
HemantHemant
315
315
Have you tried opening this model in a few other viewers, like gltf-viewer.donmccurdy.com or sandbox.babylonjs.com? If the model appears correctly there, you may want to file a bug on Sceneform. If not, you may want to file a bug on the exporter.
– Don McCurdy
Mar 9 at 6:53
Yes, I have tried different viewers and it comes perfectly fine, also have filed a bug in sceneform. I guess they have these issue but till then am looking out for some workaround for this.
– Hemant
Mar 12 at 6:28
add a comment |
Have you tried opening this model in a few other viewers, like gltf-viewer.donmccurdy.com or sandbox.babylonjs.com? If the model appears correctly there, you may want to file a bug on Sceneform. If not, you may want to file a bug on the exporter.
– Don McCurdy
Mar 9 at 6:53
Yes, I have tried different viewers and it comes perfectly fine, also have filed a bug in sceneform. I guess they have these issue but till then am looking out for some workaround for this.
– Hemant
Mar 12 at 6:28
Have you tried opening this model in a few other viewers, like gltf-viewer.donmccurdy.com or sandbox.babylonjs.com? If the model appears correctly there, you may want to file a bug on Sceneform. If not, you may want to file a bug on the exporter.
– Don McCurdy
Mar 9 at 6:53
Have you tried opening this model in a few other viewers, like gltf-viewer.donmccurdy.com or sandbox.babylonjs.com? If the model appears correctly there, you may want to file a bug on Sceneform. If not, you may want to file a bug on the exporter.
– Don McCurdy
Mar 9 at 6:53
Yes, I have tried different viewers and it comes perfectly fine, also have filed a bug in sceneform. I guess they have these issue but till then am looking out for some workaround for this.
– Hemant
Mar 12 at 6:28
Yes, I have tried different viewers and it comes perfectly fine, also have filed a bug in sceneform. I guess they have these issue but till then am looking out for some workaround for this.
– Hemant
Mar 12 at 6:28
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55060055%2fgltf-object-are-grounding-when-loaded%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55060055%2fgltf-object-are-grounding-when-loaded%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you tried opening this model in a few other viewers, like gltf-viewer.donmccurdy.com or sandbox.babylonjs.com? If the model appears correctly there, you may want to file a bug on Sceneform. If not, you may want to file a bug on the exporter.
– Don McCurdy
Mar 9 at 6:53
Yes, I have tried different viewers and it comes perfectly fine, also have filed a bug in sceneform. I guess they have these issue but till then am looking out for some workaround for this.
– Hemant
Mar 12 at 6:28