Rodrix3 Posted June 15, 2018 Author Share Posted June 15, 2018 13 hours ago, dbawel said: @Rodrix3 I use low res duplicates of the mesh I'm texturing, when I run out of texture channels and / or their attributes to use. Make these duplicates children of the original mesh, and use the alpha channels in the 32 bit textures for transparency. This provides endless possibilities, including animating the meshes and textures on the duolicate low res meshes. I hope this explains how we create awesome scenes at Sony. DB Thanks again @dbawel for the explanation and for sharing this incredible knowledge. I am following a bit better now but still have some doubts. When you say "use alpha channels in the 32 bit textures for transparency".. do you mean: use alpha channel on albedo, or emissive textures? Is this what you mean: If not, we can name GREEN the Lampshade Inner , and BLUE the Lampshade Outer. What materials would you use for GREEN and BLUE? Thanks so much in advance!!! ...thanks for the patience in helping me understand how this works :). Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted June 15, 2018 Share Posted June 15, 2018 11 hours ago, Pryme8 said: http://codeflow.org/entries/2012/aug/25/webgl-deferred-irradiance-volumes/ That's very impressive! Thanks for sharing all these links. Hagop 1 Quote Link to comment Share on other sites More sharing options...
dbawel Posted June 15, 2018 Share Posted June 15, 2018 @Rodrix3 Read this https://en.wikipedia.org/wiki/RGBA_color_space DB Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 15, 2018 Share Posted June 15, 2018 Last one : https://users.cg.tuwien.ac.at/zsolnai/gfx/separable-subsurface-scattering-with-activision-blizzard/ Im actually gonna reference this one for a shader I am working on. Quote Link to comment Share on other sites More sharing options...
dbawel Posted June 16, 2018 Share Posted June 16, 2018 @Pryme8 You're a dickhead, but a good one. Just joking as we're all adults here. Love ya buddy! Good response. DB Pryme8 1 Quote Link to comment Share on other sites More sharing options...
QuintusHegie Posted June 16, 2018 Share Posted June 16, 2018 The ceiling light 'X flare' can probably be simulated by adding a "X" sprite picture with alpha mask to it which is on a layer above the 3D object (for example, your GUI). At least this was how it seem to have worked in Perfect Dark N64 ? E.g. some GUI picture that is only shown when in view frustrum. This is done for you already automatically in the example on https://doc.babylonjs.com/how_to/gui See the Sphere7 dot pointer that points to the 3D object. Replace the dot image with the image of your "X" flare. The flares need only be shown when there is a Line of Sight between the lamp position and your camera. Perhaps look into the existing LensFlare system of BabylonJS too... Let me know if you get it to work. I'll probably be adding these X light flares to my own game as well some time in the future. They really give a nice simulated effect of 'painful bright light to the eyes' ? Happy coding. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 18, 2018 Share Posted June 18, 2018 I just realized we have reflection probes... why not modify them and use the same idea but for GI probes? Rodrix3 and GameMonetize 2 Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted June 19, 2018 Share Posted June 19, 2018 On 6/16/2018 at 1:25 PM, QuintusHegie said: Perhaps look into the existing LensFlare system of BabylonJS too... Yep ;) And GI probes could be a very nice feature! Let's add it to this thead. Quote Link to comment Share on other sites More sharing options...
babbleon Posted June 19, 2018 Share Posted June 19, 2018 I can now declare myself the winner of this contest as up to now I'm the only one to prepare a PG (despite it looking nothing like the OP asked for). ? http://www.babylonjs-playground.com/#S9KCDL#3 UV map templates are here: https://raw.githubusercontent.com/babbleon/babylon/master/light.png https://raw.githubusercontent.com/babbleon/babylon/master/floor.png Model here: https://raw.githubusercontent.com/babbleon/babylon/master/light.babylon ...and the .blend attached This may give someone else a head start... the lamp & floor is UV mapped, so if this is of use to anyone to come up with something awesome, then it would be great to see. Cheers, light.blend Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 19, 2018 Share Posted June 19, 2018 https://www.babylonjs-playground.com/#MU17PR#6 Im getting in on this... gonna do it all procedurally though. will be doing a custom shader for the Filament and the shade. **UPDATE** https://www.babylonjs-playground.com/#MU17PR#16 **SECOND UPDATE** https://www.babylonjs-playground.com/#MU17PR#30 Rodrix3 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 19, 2018 Share Posted June 19, 2018 https://www.babylonjs-playground.com/#MU17PR#32 Why does setting: glass.linkRefractionWithTransparency = true; Make the insides invisible, but allow the glow layer to work while: glass.linkRefractionWithTransparency = false; makes the inside visible, but makes the glow layer stop working? **UPDATE** https://www.babylonjs-playground.com/#MU17PR#36 Adding fixtures. Hagop and Rodrix3 2 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 20, 2018 Share Posted June 20, 2018 https://www.babylonjs-playground.com/#MU17PR#44 Might be able to get to the shade today, which will be the biggest "technical" part due to the SubSurfceShading shader I need to write up for it. Then it will be finish the lamp body. Also I want to use reflection probes instead of a hrd texture. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted June 20, 2018 Share Posted June 20, 2018 Why does setting: glass.linkRefractionWithTransparency = true; Make the insides invisible, but allow the glow layer to work while: The meshes in this case are not considered transparent, they only use the refraction texture to display behind. glass.linkRefractionWithTransparency = false; makes the inside visible, but makes the glow layer stop working? Meshes are transparent then alpha blended and Glow layer does not support transparent meshes. Hope it helps Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 20, 2018 Share Posted June 20, 2018 https://www.babylonjs-playground.com/#MU17PR#53 Is there a way to mask the emissive color on a PBR? Otherwise Ill have to shift the fabric to a CustomMaterial. Also, can anyone suggest the best method to get the PBR not to be lit unless the point light is on, I figured its the environmental factor but there might be a quick flag I can use that will fix it so figured Id ask. Otherwise Im gonna shift to Custom Standard Materials and script in reflection probe support and emissive masking. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted June 20, 2018 Share Posted June 20, 2018 Is there a way to mask the emissive color on a PBR? Emissive Texture ??? Also, can anyone suggest the best method to get the PBR not to be lit unless the point light is on, I figured its the environmental factor but there might be a quick flag I can use that will fix it so figured Id ask. Otherwise Im gonna shift to Custom Standard Materials and script in reflection probe support and emissive masking. You can use environmentIntensity to reduce the environment impact and disableLighting to stop the analytical lights impact Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 20, 2018 Share Posted June 20, 2018 13 minutes ago, Sebavan said: disableLighting to stop the analytical lights impact can you explain that more please? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted June 20, 2018 Share Posted June 20, 2018 This stops any lights (Point Hemispheric...) to be used by the material. I usually use it as a perf trick if I only want the material to be lit by the environment. Rodrix3 1 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted June 20, 2018 Share Posted June 20, 2018 and if you wish you could also play with factors instead: directIntensity; for light control (diffuse+spec of Point Hemispheric...) emissiveIntensity; for the overall intensity of the emissive environmentIntensity; for the intensity of the environment specularIntensity; for the specular intensity (both lights and environment) Rodrix3 and Pryme8 1 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 20, 2018 Share Posted June 20, 2018 Also: https://www.babylonjs-playground.com/#MU17PR#56 I cant get a dynamic texture to work as the emissiveTexture on a PBR. Rodrix3 1 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted June 20, 2018 Share Posted June 20, 2018 Because you have a typo in emissiveTexture, uppercase T. Also when using the emissiveTexture, it is multiplied by the emissiveColor so the latest should be white in your case. https://www.babylonjs-playground.com/#MU17PR#57 Pryme8 and Rodrix3 2 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 20, 2018 Share Posted June 20, 2018 Boss mode thank you~! Rodrix3 and Sebavan 1 1 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted June 20, 2018 Share Posted June 20, 2018 The glow could really give a fun feeling with a bit of tweaks: https://www.babylonjs-playground.com/#MU17PR#59 Rodrix3 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 20, 2018 Share Posted June 20, 2018 ❤️ love it, I was gonna get there eventually thanks for handling that for me. Now to darken the shade where elements would obfuscate the light and we are working with something ^_^. Sebavan, Rodrix3 and Hagop 3 Quote Link to comment Share on other sites More sharing options...
Rodrix3 Posted June 20, 2018 Author Share Posted June 20, 2018 1 hour ago, Pryme8 said: https://www.babylonjs-playground.com/#MU17PR#53 Is there a way to mask the emissive color on a PBR? WOW.. is all I can say for now (I am following through all your updates!!!) My two cents (probably not what you are asking, but just in case): material.emissiveColor is what you are looking for? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 20, 2018 Share Posted June 20, 2018 https://www.babylonjs-playground.com/#MU17PR#60 Ill finish this up after I wrap up my work when I get back from lunch. Rodrix3 1 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.