load 3D object issue
MalekBEKRI97 opened this issue · 13 comments
@MalekBEKRI97 , thanks for creating an issue!
Do you mean the texture can't be seen, even though you applied it to the cube?
Do you have some demo / code snippet I can try?
I tried your example, I see the code that adds the cube:
canvas.onclick = evt => {
//Create the three.js cube
const geometry = new THREE.BoxGeometry(100, 100, 100);
const material = new THREE.MeshStandardMaterial({ color: 0x00ff00fe });
const cube = new THREE.Mesh(geometry, material);
cube.renderOrder = 100000;
//Get the position of the click
const geoPosition = map.getGeoCoordinatesAt(evt.pageX, evt.pageY);
cube.geoPosition = geoPosition;
//Add object to the map
map.mapAnchors.add(cube);
map.update();
}
But I don't see any code which adds a texture to the cube.
Are you referring to textures on the cube or on the buildings?
i mean the color of the cube for example "const material = new THREE.MeshStandardMaterial({ color: 0x00ff00fe })" it's not visible in the all sides
thanks @MalekBEKRI97
Yes, I can reproduce, I tried removing the code that adds all fbx
files, but keep the code to place the boxes and they are rendered correctly, i.e. without the models, I get the cubes looking solid pink, quite strange!
It seems something weird goes on when loading the models. I don't quite know what the problem is... I would have to look further but I don't have the time to look now sorry. Perhaps you can take a look?
yes thank you , i will try again and look for other solutions and thank you again or your time
One think you can look at is what lights are in the scene? Maybe there are too many being added?
@MalekBEKRI97 , I read that fbx can export lights. Best fix your models to not contain any lights.
@MalekBEKRI97 , is there anything that I can help you with? Did you find the solution?
@MalekBEKRI97 , will close this issue, and please re-open if you need further help.