THREE.js - Cloned and rotated LOD objects - wrong shading
I have a txt. file exported from 3ds Max with name of objects, position, rotation and scale.
Secondly I have a javascript initial list of this objects with paths on extern obj. and mtl. files.
From initial list I create a LOD objects that are cloned across my scene according to txt file.
But I have a problem with shading/lighting of these cloned object that are rotated in the scene.
Please do you know what needs updating after I place the objects in scene?
Two clones of same LOD object with different shading
Here is a link on my project
Piece of txt files with positioning of objects (name-of-LOD+number;positionXYZ;rotation;scale):
tree_small013;17.5686;0.15;34.1358;-0.0001;180.0;0.0;1.0;1.0;1.0
tree_small014;17.5686;0.15;44.5792;-0.0001;180.0;0.0;1.0;1.0;1.0
tree_small015;17.5686;0.15;13.1515;-0.0001;180.0;0.0;1.0;1.0;1.0
tree_small016;17.5686;0.15;65.6183;-0.0001;180.0;0.0;1.0;1.0;1.0
tree_small017;17.5686;0.15;55.1539;-0.0001;180.0;0.0;1.0;1.0;1.0
pavement_corner;20.0;0.0;73.5;0.0;0.0;0.0;1.0;1.0;1.0
pavement;20.0;0.0;70.0;0.0;0.0;0.0;1.0;1.0;1.0
pavement_tree;20.0;0.0;63.0;0.0;0.0;0.0;1.0;1.0;1.0
pavement001;20.0;0.0;66.5;0.0;0.0;0.0;1.0;1.0;1.0
pavement_tree001;20.0;0.0;52.5;0.0;0.0;0.0;1.0;1.0;1.0
pavement002;20.0;0.0;56.0;0.0;0.0;0.0;1.0;1.0;1.0
pavement003;20.0;0.0;59.5;0.0;0.0;0.0;1.0;1.0;1.0
pavement004;20.0;0.0;34.9999;0.0;0.0;0.0;1.0;1.0;1.0
Example of importList.js with initializing LOD objects:
// STATIC MODELS IMPORT LIST
var models = {
tree_small:
levels:
0:
name:"high",
obj:"models/tree_small_high.obj",
mtl:"maps/mtl/tree_small_high.mtl",
mesh:null,
dist:10
,
1:
name:"mid",
obj:"models/tree_small_mid.obj",
mtl:"maps/mtl/tree_small_mid.mtl",
mesh:null,
dist:15
,
2:
name:"low",
obj:"models/tree_small_low.obj",
mtl:"maps/mtl/tree_small_low.mtl",
mesh:null,
dist:20
,
lod: null,
shadows: true
,
pavement_corner:
levels:
0:
name:"high",
obj:"models/pavement_corner_high.obj",
mtl:"maps/mtl/pavement_corner_high.mtl",
mesh:null,
dist:10
,
lod: null,
shadows: true
,
pavement:
levels:
0:
name:"high",
obj:"models/pavement_high.obj",
mtl:"maps/mtl/pavement_high.mtl",
mesh:null,
dist:10
,
lod: null,
shadows: false
,
Function Obj() in models.js which take a clone of LOD object and set it in scene by a txt. file:
function Obj(objName, x,y,z, rx,ry,rz, sx,sy,sz, mass, friction, flag)
var offset = 0;
var pos = new THREE.Vector3();
var quat = new THREE.Quaternion();
this.obj = models[objName].lod.clone(false);
this.obj.layers.set(objName);
this.obj.name = objName;
this.obj.position.set(x,y,z);
this.obj.rotation.set(rx,ry,rz);
this.obj.scale.set(sx,sy,sz);
this.obj.matrixWorldNeedsUpdate = true;
this.obj.matrixAutoUpdate = true;
this.obj.updateMatrixWorld();
this.obj.children[0].geometry.tangentsNeedUpdate = true;
makeObj(this.obj, 0); // add to collision system
this.obj.levels[0].object.updateMatrix();
this.obj.children[0].updateMatrix();
this.obj.levels[0].object.updateMatrixWorld();
this.obj.children[0].updateMatrixWorld();
this.obj.levels[0].object.geometry.computeFaceNormals();
this.obj.levels[0].object.geometry.computeVertexNormals();
this.obj.children[0].geometry.computeFaceNormals();
this.obj.children[0].geometry.computeVertexNormals();
this.obj.updateMatrix();
this.obj.updateMatrixWorld();
scene.add(this.obj);
return this.obj;
javascript three.js lighting shading level-of-detail
add a comment |
I have a txt. file exported from 3ds Max with name of objects, position, rotation and scale.
Secondly I have a javascript initial list of this objects with paths on extern obj. and mtl. files.
From initial list I create a LOD objects that are cloned across my scene according to txt file.
But I have a problem with shading/lighting of these cloned object that are rotated in the scene.
Please do you know what needs updating after I place the objects in scene?
Two clones of same LOD object with different shading
Here is a link on my project
Piece of txt files with positioning of objects (name-of-LOD+number;positionXYZ;rotation;scale):
tree_small013;17.5686;0.15;34.1358;-0.0001;180.0;0.0;1.0;1.0;1.0
tree_small014;17.5686;0.15;44.5792;-0.0001;180.0;0.0;1.0;1.0;1.0
tree_small015;17.5686;0.15;13.1515;-0.0001;180.0;0.0;1.0;1.0;1.0
tree_small016;17.5686;0.15;65.6183;-0.0001;180.0;0.0;1.0;1.0;1.0
tree_small017;17.5686;0.15;55.1539;-0.0001;180.0;0.0;1.0;1.0;1.0
pavement_corner;20.0;0.0;73.5;0.0;0.0;0.0;1.0;1.0;1.0
pavement;20.0;0.0;70.0;0.0;0.0;0.0;1.0;1.0;1.0
pavement_tree;20.0;0.0;63.0;0.0;0.0;0.0;1.0;1.0;1.0
pavement001;20.0;0.0;66.5;0.0;0.0;0.0;1.0;1.0;1.0
pavement_tree001;20.0;0.0;52.5;0.0;0.0;0.0;1.0;1.0;1.0
pavement002;20.0;0.0;56.0;0.0;0.0;0.0;1.0;1.0;1.0
pavement003;20.0;0.0;59.5;0.0;0.0;0.0;1.0;1.0;1.0
pavement004;20.0;0.0;34.9999;0.0;0.0;0.0;1.0;1.0;1.0
Example of importList.js with initializing LOD objects:
// STATIC MODELS IMPORT LIST
var models = {
tree_small:
levels:
0:
name:"high",
obj:"models/tree_small_high.obj",
mtl:"maps/mtl/tree_small_high.mtl",
mesh:null,
dist:10
,
1:
name:"mid",
obj:"models/tree_small_mid.obj",
mtl:"maps/mtl/tree_small_mid.mtl",
mesh:null,
dist:15
,
2:
name:"low",
obj:"models/tree_small_low.obj",
mtl:"maps/mtl/tree_small_low.mtl",
mesh:null,
dist:20
,
lod: null,
shadows: true
,
pavement_corner:
levels:
0:
name:"high",
obj:"models/pavement_corner_high.obj",
mtl:"maps/mtl/pavement_corner_high.mtl",
mesh:null,
dist:10
,
lod: null,
shadows: true
,
pavement:
levels:
0:
name:"high",
obj:"models/pavement_high.obj",
mtl:"maps/mtl/pavement_high.mtl",
mesh:null,
dist:10
,
lod: null,
shadows: false
,
Function Obj() in models.js which take a clone of LOD object and set it in scene by a txt. file:
function Obj(objName, x,y,z, rx,ry,rz, sx,sy,sz, mass, friction, flag)
var offset = 0;
var pos = new THREE.Vector3();
var quat = new THREE.Quaternion();
this.obj = models[objName].lod.clone(false);
this.obj.layers.set(objName);
this.obj.name = objName;
this.obj.position.set(x,y,z);
this.obj.rotation.set(rx,ry,rz);
this.obj.scale.set(sx,sy,sz);
this.obj.matrixWorldNeedsUpdate = true;
this.obj.matrixAutoUpdate = true;
this.obj.updateMatrixWorld();
this.obj.children[0].geometry.tangentsNeedUpdate = true;
makeObj(this.obj, 0); // add to collision system
this.obj.levels[0].object.updateMatrix();
this.obj.children[0].updateMatrix();
this.obj.levels[0].object.updateMatrixWorld();
this.obj.children[0].updateMatrixWorld();
this.obj.levels[0].object.geometry.computeFaceNormals();
this.obj.levels[0].object.geometry.computeVertexNormals();
this.obj.children[0].geometry.computeFaceNormals();
this.obj.children[0].geometry.computeVertexNormals();
this.obj.updateMatrix();
this.obj.updateMatrixWorld();
scene.add(this.obj);
return this.obj;
javascript three.js lighting shading level-of-detail
Does the bug happen only when you rotate them? Or does the position also affect their color?
– Marquizzo
Nov 16 '18 at 18:04
Only rotation. The same problem is on tops of houses models - facade is back to the sun but top cornice is lightened from below. Correct lighting is only on clones they have default rotation from 3ds Max.I thought that was wrong normal map, but if I turn off normal maps its same.
– Martin Smola
Nov 16 '18 at 18:23
Have you tried using threejs.org/docs/index.html#api/en/helpers/VertexNormalsHelper to see where the normals are pointing? At first glance, it sounds like your vertices are being rotated, but the normals aren't responding nicely to the rotation.
– Marquizzo
Nov 16 '18 at 18:25
Now I tried VertexNormalsHelper and all normals seems good. imgur.com/a/pnGRpr7
– Martin Smola
Nov 16 '18 at 19:15
add a comment |
I have a txt. file exported from 3ds Max with name of objects, position, rotation and scale.
Secondly I have a javascript initial list of this objects with paths on extern obj. and mtl. files.
From initial list I create a LOD objects that are cloned across my scene according to txt file.
But I have a problem with shading/lighting of these cloned object that are rotated in the scene.
Please do you know what needs updating after I place the objects in scene?
Two clones of same LOD object with different shading
Here is a link on my project
Piece of txt files with positioning of objects (name-of-LOD+number;positionXYZ;rotation;scale):
tree_small013;17.5686;0.15;34.1358;-0.0001;180.0;0.0;1.0;1.0;1.0
tree_small014;17.5686;0.15;44.5792;-0.0001;180.0;0.0;1.0;1.0;1.0
tree_small015;17.5686;0.15;13.1515;-0.0001;180.0;0.0;1.0;1.0;1.0
tree_small016;17.5686;0.15;65.6183;-0.0001;180.0;0.0;1.0;1.0;1.0
tree_small017;17.5686;0.15;55.1539;-0.0001;180.0;0.0;1.0;1.0;1.0
pavement_corner;20.0;0.0;73.5;0.0;0.0;0.0;1.0;1.0;1.0
pavement;20.0;0.0;70.0;0.0;0.0;0.0;1.0;1.0;1.0
pavement_tree;20.0;0.0;63.0;0.0;0.0;0.0;1.0;1.0;1.0
pavement001;20.0;0.0;66.5;0.0;0.0;0.0;1.0;1.0;1.0
pavement_tree001;20.0;0.0;52.5;0.0;0.0;0.0;1.0;1.0;1.0
pavement002;20.0;0.0;56.0;0.0;0.0;0.0;1.0;1.0;1.0
pavement003;20.0;0.0;59.5;0.0;0.0;0.0;1.0;1.0;1.0
pavement004;20.0;0.0;34.9999;0.0;0.0;0.0;1.0;1.0;1.0
Example of importList.js with initializing LOD objects:
// STATIC MODELS IMPORT LIST
var models = {
tree_small:
levels:
0:
name:"high",
obj:"models/tree_small_high.obj",
mtl:"maps/mtl/tree_small_high.mtl",
mesh:null,
dist:10
,
1:
name:"mid",
obj:"models/tree_small_mid.obj",
mtl:"maps/mtl/tree_small_mid.mtl",
mesh:null,
dist:15
,
2:
name:"low",
obj:"models/tree_small_low.obj",
mtl:"maps/mtl/tree_small_low.mtl",
mesh:null,
dist:20
,
lod: null,
shadows: true
,
pavement_corner:
levels:
0:
name:"high",
obj:"models/pavement_corner_high.obj",
mtl:"maps/mtl/pavement_corner_high.mtl",
mesh:null,
dist:10
,
lod: null,
shadows: true
,
pavement:
levels:
0:
name:"high",
obj:"models/pavement_high.obj",
mtl:"maps/mtl/pavement_high.mtl",
mesh:null,
dist:10
,
lod: null,
shadows: false
,
Function Obj() in models.js which take a clone of LOD object and set it in scene by a txt. file:
function Obj(objName, x,y,z, rx,ry,rz, sx,sy,sz, mass, friction, flag)
var offset = 0;
var pos = new THREE.Vector3();
var quat = new THREE.Quaternion();
this.obj = models[objName].lod.clone(false);
this.obj.layers.set(objName);
this.obj.name = objName;
this.obj.position.set(x,y,z);
this.obj.rotation.set(rx,ry,rz);
this.obj.scale.set(sx,sy,sz);
this.obj.matrixWorldNeedsUpdate = true;
this.obj.matrixAutoUpdate = true;
this.obj.updateMatrixWorld();
this.obj.children[0].geometry.tangentsNeedUpdate = true;
makeObj(this.obj, 0); // add to collision system
this.obj.levels[0].object.updateMatrix();
this.obj.children[0].updateMatrix();
this.obj.levels[0].object.updateMatrixWorld();
this.obj.children[0].updateMatrixWorld();
this.obj.levels[0].object.geometry.computeFaceNormals();
this.obj.levels[0].object.geometry.computeVertexNormals();
this.obj.children[0].geometry.computeFaceNormals();
this.obj.children[0].geometry.computeVertexNormals();
this.obj.updateMatrix();
this.obj.updateMatrixWorld();
scene.add(this.obj);
return this.obj;
javascript three.js lighting shading level-of-detail
I have a txt. file exported from 3ds Max with name of objects, position, rotation and scale.
Secondly I have a javascript initial list of this objects with paths on extern obj. and mtl. files.
From initial list I create a LOD objects that are cloned across my scene according to txt file.
But I have a problem with shading/lighting of these cloned object that are rotated in the scene.
Please do you know what needs updating after I place the objects in scene?
Two clones of same LOD object with different shading
Here is a link on my project
Piece of txt files with positioning of objects (name-of-LOD+number;positionXYZ;rotation;scale):
tree_small013;17.5686;0.15;34.1358;-0.0001;180.0;0.0;1.0;1.0;1.0
tree_small014;17.5686;0.15;44.5792;-0.0001;180.0;0.0;1.0;1.0;1.0
tree_small015;17.5686;0.15;13.1515;-0.0001;180.0;0.0;1.0;1.0;1.0
tree_small016;17.5686;0.15;65.6183;-0.0001;180.0;0.0;1.0;1.0;1.0
tree_small017;17.5686;0.15;55.1539;-0.0001;180.0;0.0;1.0;1.0;1.0
pavement_corner;20.0;0.0;73.5;0.0;0.0;0.0;1.0;1.0;1.0
pavement;20.0;0.0;70.0;0.0;0.0;0.0;1.0;1.0;1.0
pavement_tree;20.0;0.0;63.0;0.0;0.0;0.0;1.0;1.0;1.0
pavement001;20.0;0.0;66.5;0.0;0.0;0.0;1.0;1.0;1.0
pavement_tree001;20.0;0.0;52.5;0.0;0.0;0.0;1.0;1.0;1.0
pavement002;20.0;0.0;56.0;0.0;0.0;0.0;1.0;1.0;1.0
pavement003;20.0;0.0;59.5;0.0;0.0;0.0;1.0;1.0;1.0
pavement004;20.0;0.0;34.9999;0.0;0.0;0.0;1.0;1.0;1.0
Example of importList.js with initializing LOD objects:
// STATIC MODELS IMPORT LIST
var models = {
tree_small:
levels:
0:
name:"high",
obj:"models/tree_small_high.obj",
mtl:"maps/mtl/tree_small_high.mtl",
mesh:null,
dist:10
,
1:
name:"mid",
obj:"models/tree_small_mid.obj",
mtl:"maps/mtl/tree_small_mid.mtl",
mesh:null,
dist:15
,
2:
name:"low",
obj:"models/tree_small_low.obj",
mtl:"maps/mtl/tree_small_low.mtl",
mesh:null,
dist:20
,
lod: null,
shadows: true
,
pavement_corner:
levels:
0:
name:"high",
obj:"models/pavement_corner_high.obj",
mtl:"maps/mtl/pavement_corner_high.mtl",
mesh:null,
dist:10
,
lod: null,
shadows: true
,
pavement:
levels:
0:
name:"high",
obj:"models/pavement_high.obj",
mtl:"maps/mtl/pavement_high.mtl",
mesh:null,
dist:10
,
lod: null,
shadows: false
,
Function Obj() in models.js which take a clone of LOD object and set it in scene by a txt. file:
function Obj(objName, x,y,z, rx,ry,rz, sx,sy,sz, mass, friction, flag)
var offset = 0;
var pos = new THREE.Vector3();
var quat = new THREE.Quaternion();
this.obj = models[objName].lod.clone(false);
this.obj.layers.set(objName);
this.obj.name = objName;
this.obj.position.set(x,y,z);
this.obj.rotation.set(rx,ry,rz);
this.obj.scale.set(sx,sy,sz);
this.obj.matrixWorldNeedsUpdate = true;
this.obj.matrixAutoUpdate = true;
this.obj.updateMatrixWorld();
this.obj.children[0].geometry.tangentsNeedUpdate = true;
makeObj(this.obj, 0); // add to collision system
this.obj.levels[0].object.updateMatrix();
this.obj.children[0].updateMatrix();
this.obj.levels[0].object.updateMatrixWorld();
this.obj.children[0].updateMatrixWorld();
this.obj.levels[0].object.geometry.computeFaceNormals();
this.obj.levels[0].object.geometry.computeVertexNormals();
this.obj.children[0].geometry.computeFaceNormals();
this.obj.children[0].geometry.computeVertexNormals();
this.obj.updateMatrix();
this.obj.updateMatrixWorld();
scene.add(this.obj);
return this.obj;
javascript three.js lighting shading level-of-detail
javascript three.js lighting shading level-of-detail
asked Nov 15 '18 at 22:56
Martin SmolaMartin Smola
82
82
Does the bug happen only when you rotate them? Or does the position also affect their color?
– Marquizzo
Nov 16 '18 at 18:04
Only rotation. The same problem is on tops of houses models - facade is back to the sun but top cornice is lightened from below. Correct lighting is only on clones they have default rotation from 3ds Max.I thought that was wrong normal map, but if I turn off normal maps its same.
– Martin Smola
Nov 16 '18 at 18:23
Have you tried using threejs.org/docs/index.html#api/en/helpers/VertexNormalsHelper to see where the normals are pointing? At first glance, it sounds like your vertices are being rotated, but the normals aren't responding nicely to the rotation.
– Marquizzo
Nov 16 '18 at 18:25
Now I tried VertexNormalsHelper and all normals seems good. imgur.com/a/pnGRpr7
– Martin Smola
Nov 16 '18 at 19:15
add a comment |
Does the bug happen only when you rotate them? Or does the position also affect their color?
– Marquizzo
Nov 16 '18 at 18:04
Only rotation. The same problem is on tops of houses models - facade is back to the sun but top cornice is lightened from below. Correct lighting is only on clones they have default rotation from 3ds Max.I thought that was wrong normal map, but if I turn off normal maps its same.
– Martin Smola
Nov 16 '18 at 18:23
Have you tried using threejs.org/docs/index.html#api/en/helpers/VertexNormalsHelper to see where the normals are pointing? At first glance, it sounds like your vertices are being rotated, but the normals aren't responding nicely to the rotation.
– Marquizzo
Nov 16 '18 at 18:25
Now I tried VertexNormalsHelper and all normals seems good. imgur.com/a/pnGRpr7
– Martin Smola
Nov 16 '18 at 19:15
Does the bug happen only when you rotate them? Or does the position also affect their color?
– Marquizzo
Nov 16 '18 at 18:04
Does the bug happen only when you rotate them? Or does the position also affect their color?
– Marquizzo
Nov 16 '18 at 18:04
Only rotation. The same problem is on tops of houses models - facade is back to the sun but top cornice is lightened from below. Correct lighting is only on clones they have default rotation from 3ds Max.I thought that was wrong normal map, but if I turn off normal maps its same.
– Martin Smola
Nov 16 '18 at 18:23
Only rotation. The same problem is on tops of houses models - facade is back to the sun but top cornice is lightened from below. Correct lighting is only on clones they have default rotation from 3ds Max.I thought that was wrong normal map, but if I turn off normal maps its same.
– Martin Smola
Nov 16 '18 at 18:23
Have you tried using threejs.org/docs/index.html#api/en/helpers/VertexNormalsHelper to see where the normals are pointing? At first glance, it sounds like your vertices are being rotated, but the normals aren't responding nicely to the rotation.
– Marquizzo
Nov 16 '18 at 18:25
Have you tried using threejs.org/docs/index.html#api/en/helpers/VertexNormalsHelper to see where the normals are pointing? At first glance, it sounds like your vertices are being rotated, but the normals aren't responding nicely to the rotation.
– Marquizzo
Nov 16 '18 at 18:25
Now I tried VertexNormalsHelper and all normals seems good. imgur.com/a/pnGRpr7
– Martin Smola
Nov 16 '18 at 19:15
Now I tried VertexNormalsHelper and all normals seems good. imgur.com/a/pnGRpr7
– Martin Smola
Nov 16 '18 at 19:15
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53329044%2fthree-js-cloned-and-rotated-lod-objects-wrong-shading%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53329044%2fthree-js-cloned-and-rotated-lod-objects-wrong-shading%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Does the bug happen only when you rotate them? Or does the position also affect their color?
– Marquizzo
Nov 16 '18 at 18:04
Only rotation. The same problem is on tops of houses models - facade is back to the sun but top cornice is lightened from below. Correct lighting is only on clones they have default rotation from 3ds Max.I thought that was wrong normal map, but if I turn off normal maps its same.
– Martin Smola
Nov 16 '18 at 18:23
Have you tried using threejs.org/docs/index.html#api/en/helpers/VertexNormalsHelper to see where the normals are pointing? At first glance, it sounds like your vertices are being rotated, but the normals aren't responding nicely to the rotation.
– Marquizzo
Nov 16 '18 at 18:25
Now I tried VertexNormalsHelper and all normals seems good. imgur.com/a/pnGRpr7
– Martin Smola
Nov 16 '18 at 19:15