va3c / viewer

3D Model Viewer with Three.js
http://va3c.github.io/viewer/
183 stars 118 forks source link

How to adjust light to make the scene brighter? #7

Open flower4wine opened 9 years ago

flower4wine commented 9 years ago

Theo,

While using viewer to render scene, I have problem to make the view brighter. The original scene in Revit is bright. But after I export it via RvtVa3c, and load JSON in vA3C viewer, the scene turns dark. You can find different screenshots in link "http://url.cn/XSCwrE".

To get "vA3C result", I modified ambient color to 0xcccccc in loadJS(). I also changed latlon[] from New York to Shanghai (where I live), and time from 7/4 5:00 to 7/4 12:00 in updateLight(). I think the latter is to control direction of the direction light.

However, I cannot get similar result to what in Revit. Could you please provide tips ? Thanks a lot!

David

theo-armour commented 9 years ago

Hi David

You can find different screenshots in link "http://url.cn/XSCwrE".

As happened previously, url.cn requests a user name and password and my ability to read Chinese characters - never very good - diminishes with each passing year. I would advise against using this site with anybody based outside of the mainland.

If you wish to attach images and files. GitHub allows you to do so directly on he Issues page.

While using viewer to render scene, I have problem to make the view brighter. The original scene in Revit is bright. But after I export it via RvtVa3c, and load JSON in vA3C viewer, the scene turns dark.

Does the scene you exported from Revit include the lights? If you import a scene into Three.js and there are no lights and you are asking for Lambert or Phong materials then objects will be very dark indeed.

To get "vA3C result", I modified ambient color to 0xcccccc in loadJS(). I also changed latlon[] from New York to Shanghai (where I live), and time from 7/4 5:00 to 7/4 12:00 in updateLight(). I think the latter is to control direction of the direction light.

This all sounds as if you are using vA3C Viewer R1.

The current release is vA3C Viewer R8dev. See:

https://github.com/va3c/viewer/tree/gh-pages/va3c-viewer-html5

You might consider updating to the current release.

And by the way there is a whole new - much simpler - stream at:

https://github.com/va3c/viewer/tree/gh-pages/va3c-hacker

In any case, the issue of figuring out if an incoming object has sufficient light is still a work in progress. We can talk more after you have had a look at the new stuff.


By the way, regarding creating smaller JSON files, I note that the Three.js Menubar.File.js does this a line 123 just before the export:

output = JSON.stringify( output, null, '\t' ); output = output.replace( /[\n\t]+([\d.e-[]]+)/g, '$1' );


I look forward to seeing some examples of your efforts...

Theo

On Fri, Nov 21, 2014 at 5:27 AM, flower4wine notifications@github.com wrote:

Theo,

While using viewer to render scene, I have problem to make the view brighter. The original scene in Revit is bright. But after I export it via RvtVa3c, and load JSON in vA3C viewer, the scene turns dark. You can find different screenshots in link "http://url.cn/XSCwrE".

To get "vA3C result", I modified ambient color to 0xcccccc in loadJS(). I also changed latlon[] from New York to Shanghai (where I live), and time from 7/4 5:00 to 7/4 12:00 in updateLight(). I think the latter is to control direction of the direction light.

However, I cannot get similar result to what in Revit. Could you please provide tips ? Thanks a lot!

David

— Reply to this email directly or view it on GitHub https://github.com/va3c/viewer/issues/7.

flower4wine commented 9 years ago

Theo,

Thanks a lot!

If you wish to attach images and files. GitHub allows you to do so directly on he Issues page. Embarassed ! Here you go. revit result va3c result

Does the scene you exported from Revit include the lights? The view settings is 'Only Sunlight'. But I cannot find any 'light' relative node in export JSON file. So I guess there's no light exported.

To Jeremy: am I right?

I'll try your latest viewer version and keep you posted.

David

jeremytammik commented 9 years ago

the Revit exporter originally created a scene including a light. when i modified it to export only objects, the light was removed, so that the Revit model can be more easily integrated with or into other existing models.