سؤال

I am using the r65 of Three.js. When I light a scene in 3ds max I then export it as a an obj to load in Three.js. I take a second step and export the model to FBX so I can extract the lighting and load in Three.js. I am noticing that the lights are not as "strong" in Three.js, almost like a multipier should be added to the intensity possibly? Could it be that I am missing some property on the light in Three.js?

Here is what the scene looks like in 3ds Max 3ds max

Here is what it looks like when it's imported to Three.js Three.js

After playing around with settings, after turning on the gammaOutput and gammaInput gammaOutput on

So it looks a little better with the gamma output on, but still not what I was hoping it would look like from 3ds max. I created a fiddle but due to the Access-Control-Allow-Origin errors I couldn't figure out how to get the fiddle to work, but hopefully the code there will help see what I am trying to do.

// scene
scene = new THREE.Scene();

renderer = new THREE.WebGLRenderer();
renderer.setSize(SCREEN_WIDTH, SCREEN_HEIGHT);

renderer.gammaOutput = true;
renderer.gammaInput = true;

container.appendChild(renderer.domElement);

loader = new THREE.OBJMTLLoader();

var modelFilePath = "http://goo.gl/ecHpSf?gdriveurl";
var materialFilePath = "http://goo.gl/bZWZEA?gdriveurl";

loader.load(modelFilePath, materialFilePath, function (object) {

        materials.push.apply(materials, object.children);

        scene.add(object);      
        object.position.set(0, 0, 0);
    });

// setup lighting
var light = new THREE.PointLight(0xffffff, 1);
light.position = new THREE.Vector3(32.2274, 54.6139, 38.2715);
light.distance = 103.74199676513672;
light.intensity = 1;
scene.add(light);

Can anyone suggest anything that might help, it seems like I am close. Thanks!

هل كانت مفيدة؟

المحلول 2

After further experimenting I have found that 3ds max has values set for far attenuation start/end. As far as I can tell, there is no way to export this value into Three.js since far attenuation [End] == Distance. Doing a search, it looks like I am limited by the values the light source takes in Three.js. I will follow this up with another post on SO.

نصائح أخرى

Do check out material specular component. R65 changed a bit specular component computation: #4636 (WebGLRenderer: Specular component implementation) I've got similar problem implementing A3dsViewer 3ds converter to the three.js. Try to export/save 3ds file and do conversion with the A3dsViewer to the three.js maybe such workflow will help.

Additionally maybe such settings can help:

renderer.gammaInput = false; // do false
renderer.gammaOutput = true; 
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top