Jump to content

Texture disappears and appears in specific camera angles


Hersir
 Share

Recommended Posts

Hi, I have exported model from 3dmax and loaded in babylon and meshes are cloned after load (also tried instance). But sometimes some meshes appear in scene with default color not with texture, but after changing angle of camera (ArcRotateCamera) some of them get texture back. I will try to isolate problem but meanwhile maybe someone seen similar behaviour? I use alpha version of babylon from npm.

Thanks.

Link to comment
Share on other sites

Ok I found something.

I load meshes from babylon file exported from 3d max. Original meshes are used just to make child instances (it has jpg diffuse texture, shared by all meshes).

Could it be so that original mesh needs to be in camera viewport for instance meshes to have texture?

I tried to wait for mesh to be ready but it didn't helped much.

material.isReady(mesh) && mesh.isReady();

Also I found hack to fix this if I change coordinatesMode of diffuse texture to any other value texture shows up and never disappears again. (looks like it is revalidated after that).

 

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...