Jump to content

SceneLoader AppendSync GLB not being lit by light


KevinK
 Share

Recommended Posts

I am having problems with meshes and lighting when importing (appending ) glb files into a scene. I Use BABYLON.SceneLoader.AppendSync( "file:", sceneFile, scene, ...... ).

The image below has a box on the left that has been appended to scene, and a box on the right that was created directly to the scene. The one on the right is being lit properly by the spot light. The one on the left is not. It is hard to tell but the box appended to the scene appears to have the normals reversed. The appended box has the parent "__root__" node. 

The scene is set to useRighthandSystem == true, If I change the scene to UseRighthandSystem == false after import, the left box normal's are reversed, but still do not get lit by spotlight.

Any thoughts I why I cannot get the appended glb file to light( show) properly.

Thanks,

 

image.png

Link to comment
Share on other sites

17 hours ago, KevinK said:

I am having problems with meshes and lighting when importing (appending ) glb files into a scene. I Use BABYLON.SceneLoader.AppendSync( "file:", sceneFile, scene, ...... ).

The image below has a box on the left that has been appended to scene, and a box on the right that was created directly to the scene. The one on the right is being lit properly by the spot light. The one on the left is not. It is hard to tell but the box appended to the scene appears to have the normals reversed. The appended box has the parent "__root__" node. 

The scene is set to useRighthandSystem == true, If I change the scene to UseRighthandSystem == false after import, the left box normal's are reversed, but still do not get lit by spotlight.

Any thoughts I why I cannot get the appended glb file to light( show) properly.

Thanks,

 

image.png

Additional info, If I Use the same appendSync function with obj files it works fine. 

Also, if I use a directional light, the box is still dark. If I use a hemi-light, the colors and material appear.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...