Jump to content

Emissive vs Illumination


V!nc3r
 Share

Recommended Posts

Hiya V!  https://github.com/BabylonJS/Babylon.js/blob/master/src/Materials/babylon.pbrMaterial.js#L255

A little note there... 

Quote

In this mode, the emissive information will always be added to the lighting once.  A light, for instance, can be thought-of as emissive.

Just passing-along what I found.  Probably not very helpful, but maybe.  :)

Link to comment
Share on other sites

Thanks @Sebavan!  Good question, @V!nc3r 

Sebavan (or anyone else, too)... can you please modify this scene and show us how it looks?

http://playground.babylonjs.com/#1PWPDF

Standard lights are low intensity. 

I've got scene.ambientColor happening in line 4 (green), sphere and box ambientColor set in lines 14 and 20 (dark gray).  It is my understanding that ambientColor needs to be set on scene and on materials... before ambient goes active.  This is the reason line 26 sets an ambientColor on all the other mesh materials (causing them to have an end-result color of green).  Only the box and sphere have red emissiveColors set.

The spheremat has UEAI set true, boxmat sets it false. (lines 17 and 23).

I don't know if I should be using diffuseColor, but I set box and sphere material.diffuseColor to a low-level gray.

I don't see a difference between sphere end-result color, and box end-result color.  Would someone like to help?  Thanks! 

This feature/property was added as part of the PBR project, yes?  Perhaps that is where we would best see its usage/affect.

Link to comment
Share on other sites

@Wingnut AmbientColor and AmbientTexture are fully different in BJS :-)

Ambient color is alwasy added to the result color at the end of the shader.

Ambient Texture is your Ambient Occlusion texture usually used to bake in occlusion which is expensive to do in Real Time.

your scene does not use AmbientTexture but AmbientColor only, so the result is identic. You would notice a difference by using an occlusion texture:

http://playground.babylonjs.com/#1PWPDF#1

As you can see the box goes brown (red is occluded by AO) and not the sphere.

Link to comment
Share on other sites

Ah, thanks!  Well done.  Thanks for the info/knowledge, too.  SSAO (screen space ambient occlusion) being the "expensive to do in Real Time" thing, I suspect.  Our "Advanced Textures" tutorial COULD get so so so much larger. 

But, heck, just teaching the terminology alone... takes up SO much tutorial space... that a central tutorial is impractical.  Yet, folks are curious, (like this thread) and it would be nice to find ways to ease users into these excellent advanced topics.

 

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...