I'm trying to create a rounded cube using the ThreeCSG expand function on a csg model, but the resulting mesh looks wrong. I can't figure out what the problem is though. Does anyone have experience with ThreeCSG and see what's up ? thanks. the code:
var a = CSG.cube();
var b = a.expand( 0.4, 6 );
this.m_scene.add( new THREE.Mesh( THREE.CSG.fromCSG( b ), new THREE.MeshNormalMaterial() ) );
the resulting mesh is here:
(source: jvanderspek.com)
thanks,
Jonathan
Your vertexNormals somehow fail. Seems they got "lost in translation".
Check my answer on another question here. It might be the same problem.