Question

I want to bake my model lightmap in blender then load them all in three.js.
So in blender i set two uvs for each objects and baked ambient occlusion in second uv. finally i exported whole scene via three.js exporter into js file.
(exporter has problem that the baked texture goes for diffuse-map not light-map which is correctable by editing exported js file).
But the problem is when i load js with SceneLoader, the textures especially for my floor goes wrong, like upside down. here is my test files: Test Light Map
So is there something wrong with my blender file or ...? Which loader i should use for it?
Thanks.

I just upload some images to see what i mean:
Messed up textures: enter image description here
After edit js file, it's get better. but still there is problem at the edges:
enter image description here
And specially at floor, the light-map goes wrong:
enter image description here

Was it helpful?

Solution

Ok, i don't know why, but it seems my uvs was messed up in blender. i did some recaculate normals and flip normals in blender and now textures map fine on objects.
But i still need to edit exported scene to change map:texture.png to lightMap:texture.png.

[EDIT]
Actually this is a bug related to three.js scene exporter: Blender Exporter - Scene Exporting

[Final Answer]
The problem was about my model which had a negative scale in blender. i select my model, hit crtl+a then choose scale. now everything's fine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top