Jump to content

Question regarding light.


sayan751
 Share

Recommended Posts

Hi,

I have a question regarding use of light. In my scene I have a HemisphericLight:

var light = new BABYLON.HemisphericLight("light1", new Vec3(0, 1, 0), scene);

The result can be seen in the first attachment, "2015-10-17_18h36_41.png" (with a white light).

Doubting that this is caused by the specular of light (this is my referrence: https://github.com/BabylonJS/Babylon.js/wiki/06-Lights), I have added a specular color as following:

light.specular = new BABYLON.Color3(.00000000000001, 0, 0);

Which seems to be working as can be seen in the second attachment, "2015-10-17_18h38_13.png".

 

My question is this the right of doing it? Or I am completely on a worng track and it is not because of light, I am having a bright white patch of light in my scene. Need your expert advice on this.

 

Thanks,

Sayan

 

post-16459-0-39623900-1445100426.png

post-16459-0-41161000-1445100436_thumb.p

Link to comment
Share on other sites

Hi,

Yes, this is caused by the specular definitions. I can only assume this object is like a ground mesh, flat on the y axis. It's not necessarily because of the light's definitions. The standard specular color of the standard material is white (1,1,1). Try playing with the material definitions of the mesh, especially specularColor (a Color3 object) and specularPower (a number)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...