0
votes

I want to render all the vertexes and the lines in the mesh.

I tried

1) A custom shader following this link

https://github.com/mrdoob/three.js/issues/2028

2) Set transparency with the material or like:

THREE.MeshNormalMaterial( { transparent: true, opacity: 0.5 } ),

3) Set ink material to the model in 3dMax and export to an obj file and load it in Threejs with objloader

None of them works fine.

Is there any solution to load mashes from 3dMax model (using objloader) and apply it with ink material in Threejs, just like what we can do in 3DMax?

See below as an example http://makeitcg.com/wireframe-rendering-techniques-in-3ds-max/160/

1

1 Answers

0
votes

First of all, Number 3) will NEVER work with OBJ, because obj will not export the ink shader from 3dsMax. And just to be clear, i don't think there is ANY way you can export the 3dsMax Shader. Then, I don't understand what 2) is about. What do you want to achieve anyway? Do you want to set an object to be transparent? What does this have to do with Ink 'n Paint? Btw. i am not sure if transparency works for MeshNormalMaterial, i guess it should but Lambert and Phong will definetly work with transparency.

The problem is that you do not state what you want to achieve. From 1) it seems you want an outline around an object. For an outline see this example: http://stemkoski.github.io/Three.js/Outline.html or this one as a more advanced example: http://stemkoski.blogspot.de/2013/07/shaders-in-threejs-glow-and-halo.html

If you want to set transparent objects, well try MeshLambert or meshBasic material if MeshNormal does not work (i am not sure Right Now and can't check)

3) if you want to have a Ink 'n Paint shader, you need a Custom Shader. See examples here:

http://www.chromeexperiments.com/detail/cel-shader/ and already done with three.js here: http://learningthreejs.com/data/THREEx/docs/THREEx.CelShader.html Just apply the shader, see examples for setting up a ShaderMaterial.