1

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:

mesh
(source: jvanderspek.com)

thanks,

Jonathan

Glorfindel
  • 21,988
  • 13
  • 81
  • 109

1 Answers1

0

Your vertexNormals somehow fail. Seems they got "lost in translation".

Check my answer on another question here. It might be the same problem.

Community
  • 1
  • 1
Wilt
  • 41,477
  • 12
  • 152
  • 203