V!nc3r Posted July 20, 2016 Share Posted July 20, 2016 Hi all, I've noticed the SdtMaterial property useEmissiveAsIllumination. I don't get why emissive is not... illumination ^^ Is emissive an add color, and illumination a multiply for example ? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 20, 2016 Share Posted July 20, 2016 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. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted July 20, 2016 Share Posted July 20, 2016 Hello, The naming is a bit confusing I agree. In emissive standard mode, emissive is added to diffuse before being multiplied by ambient (occlusion texture). In EmissiveAsIllumination, the emissive is added without being impacted by ambient. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted July 20, 2016 Author Share Posted July 20, 2016 Oké, that's clear, thanks for explanations ! Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 20, 2016 Share Posted July 20, 2016 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. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted July 20, 2016 Share Posted July 20, 2016 @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. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 20, 2016 Share Posted July 20, 2016 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. Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted July 22, 2016 Author Share Posted July 22, 2016 I use AmbientTexture channel not only for AO textures, but usually for lightmaps (which include lights + AO data). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.