Sergio Solorzano
Sergio Solorzano

Reputation: 665

render of low poly model tris showing very hard/marked in three.js compared to sketchfab/unit3d/Iray

I've edited this post with a clean edge flow model and maps you can access if that helps in getting feedback. I can replicate the hard marked edges issue for this case too:

I'm finding the rendering result in three.js shows very hard marked polygons of the low poly object, I'm comparing this to sketchfab , unity3d and Iray render results.

Here's a snapshot of the edge flow shown in maya : https://drive.google.com/open?id=1qNA4VoZf-rSyq3_MQdeZqdFC6BxsE3un

Here's what the model looks in maya's view panel (not subdivided): https://drive.google.com/open?id=1US-fv5-v2ygReqjRPgcsQSusrAXTxVG5

Here's a snapshot of the three.js render (marked in red box more noticeable)

https://drive.google.com/open?id=1K3CIBLvA7skVUPWL0qInLcFrK74DtriK

here sketchfabs without shadows/post-processing filters

https://drive.google.com/open?id=1rozZyBSU1HwPPk4EnKFyc7SVvFNXQBwz

here Iray render in substance painter: https://drive.google.com/open?id=1cXJzw780-kWH0nANy5ekM0HjRKAdaVQ2

Here's Unity render: https://drive.google.com/open?id=1lLFLd8UT48OSvxJcp7arwygZZISsaHkS

Here is the fbx if you'd need to inspect mesh / edge flow: https://drive.google.com/open?id=1BwljZNKL3dWJSSca6WYlqSK7os1Hp4pT

I'm also adding the normal map as I thought the problem may relate to my three.js setup for this(?): https://drive.google.com/open?id=149r3n9JGnb9xEJkf9Eh7ELK2bM83bJX_

albedo map: https://drive.google.com/open?id=1rGgDUOKbbeE6mrAlTG_6C7b8LgqQ1DF0

I'm reusing envmap hdr example and hdr setting.

Can someone please share some thoughts on what I can try differently?

Thank you for your help, Sergio.

I tried the following: I softened edges in maya. I also tried the lines below separately and combined but there was not result.

//vaseMesh.geometry.mergeVertices(); and //vaseMesh.geometry.computeVertexNormals();

normalScale appears to be best at material.normalScale.x = -1;

I also tried but had same result without hdr or tonemapping settings as per displacement three.js example https://threejs.org/examples/?q=displ#webgl_materials_displacementmap

renderer = new THREE.WebGLRenderer();
renderer.toneMapping = THREE.LinearToneMapping;

//load vase material textures once loaded
                manager.onLoad=function () {
                    material = new THREE.MeshStandardMaterial( { 
                        color: 0xffffff,
                                roughness: params.roughness,
                                metalness: params.metalness,
                                map: albedoM,
                                normalMap: normalMap,
                                normalScale: new THREE.Vector2( 1, -1 ),
                                aoMap: aoMap,
                                aoMapIntensity: 1,
                                flatShading: true,
                                side: THREE.DoubleSide
                    } );

                    var myObjectLoader = new THREE.FBXLoader(  );

                    myObjectLoader.load( "Piece1.fbx", function ( group ) {
                        console.log("On object loading");
                        var geometry = group.children[ 0 ].geometry;
                        geometry.attributes.uv2 = geometry.attributes.uv;
                        geometry.center();

                        vaseMesh = new THREE.Mesh( geometry, material );
                        vaseMesh.material=material;
                        //vaseMesh.geometry.mergeVertices();
                        //vaseMesh.geometry.computeVertexNormals();
                        material.normalScale.x = -1;
                        scene.add( vaseMesh );
                        console.log("Finished adding to scene");
                        vaseMesh.position.set(0,0,0);
                        animate();
                    } );                    
                }

                var textureLoader = new THREE.TextureLoader(manager);
                var albedoM = textureLoader.load( "vaseTextures/albedo.png");
                var normalMap = textureLoader.load( "vaseTextures/normal.png");
                var aoMap = textureLoader.load( "vaseTextures/ao.png");

Upvotes: 0

Views: 498

Answers (1)

Sergio Solorzano
Sergio Solorzano

Reputation: 665

Giving credit to @Mugen87 for the answer, removing the setting flatShading to true did it!

https://discourse.threejs.org/t/render-of-low-poly-model-tris-showing-very-hard-marked-in-three-js-compared-to-sketchfab-unit3d-iray/6829/2?u=mugen87

Cheers, Sergio

Upvotes: 1

Related Questions