PrincessGod / objTo3d-tiles

Convert obj model file to 3d tiles
https://princessgod.github.io/objTo3d-tiles
Apache License 2.0
792 stars 236 forks source link

Why I have lost texture in single tile 3dtiles data that I have converted from OBJ #15

Open chm1781 opened 6 years ago

chm1781 commented 6 years ago

Thanks for your tools ,but I have some problems to use it.The OBJ data was exported from City Engine ,then I used your tools(Create a single tileset with .b3dm tile) converted to 3dtiles ,But the texture of Building modles had lost,.the texture of trees was had.Could you help me?

PrincessGod commented 6 years ago

Thanks.

CrashedBboy commented 6 years ago

Hi, I got the same problem, too, the texture of the model is missing.
here is the .obj model I've tried: obj_model.zip (with .mtl & .jpg files)

Could you help me with this? I'm not sure if the mistake is about the usage of command or structure of OBJ file. Thanks!

PrincessGod commented 6 years ago

@CrashedBboy Hi.

I found your model is upside down, which means like this in three viewer image

In this case, your normal is towards to negative y axis, which means towards to earth ground not sky, and Cesium have a direction light so it always get dark side, looks like not have texture. this is preview in Cesium viewer image

Hope that can help you.

CrashedBboy commented 6 years ago

@PrincessGod Thanks for such a detailed explanation!

abhijitgujar86 commented 6 years ago

while converting the obj to b3dm how to change or assign the correct direction ? or do we have to change in the obj file itself ? so you have any documentation on how to check this and correct this in obj file itself ?