mfprogrammer Posted March 29, 2018 Share Posted March 29, 2018 Hi Guys, I am new to Babylon. Just started with it and was wondering if something like this possible and if yes, how do I go about it? This is what I can build using the Standard material. My client is looking for something more realistic in the following. 1. Sunlight in the attic 2. Reflections after the sunlight in the attic I am looking around if this is possible. I have seen the PBR material in Babylon. I see that the HDR texture is given to every material in the demo (which is actually the surrounding/skybox). That reflection is seen on all the materials and hence, looks realistic. I am referring to this demo https://www.babylonjs.com/demos/pbr/ I am wondering if I can use PBR material for walls, the floor in the room and add a directional light through the window. Is what I am thinking about possible? Please correct me if I am wrong. I am looking to build something like this. Will PBR material help to reach somewhere here or even close to it? Thanks. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted March 30, 2018 Share Posted March 30, 2018 Hi MFP, welcome to the forum. You MIGHT have "reflections" and "shadows" a bit confused. The sunlight-through-openings is done with BabylonJS shadows. All in all, YES, the effect you show in the pictures... is quite possible. https://www.babylonjs-playground.com/#1XVEKZ#14 In the above playground demo... a directional light is low-orbiting around a roofless cabin. Much like the light effects in your pictures, we can also see the directionalLight in the playground... shining thru the gaps in the shadow-casting cabin logs. The cabin floor receives shadows/highlights nicely, but notice that they are also cast upon the walls. So... shadow casters can also be shadow receivers, and casters can even cast shadows upon themselves. Fun! Feel free to make edits and more saves of that playground... have some fun. You can't overwrite/wreck anything in our playground... it's a good place to learn and play. If you discover something you want to share with us, use the playground SAVE feature, and then paste the new URL into this thread. We can talk about it. I hope this helps. Highlights/shadows are created with lights and shadowGenerators. Reflection textures are somewhat different, as far as I know. Others may comment soon... so stay tuned. Quote Link to comment Share on other sites More sharing options...
mfprogrammer Posted March 30, 2018 Author Share Posted March 30, 2018 Hi Wingut, thanks for getting back. I see what you have done there. The shadows do pan out well. The material you used to build the cabin and the floor are Standard material. Can I use PBR material to build a cabin? The reason I am looking for it is, every material when in contact with sunlight turns out to look bright and also reflect light to a certain extent. On PBR material, the directional light looks realistic. What i see is that the PBR materials have the reflection and refraction set to hdrTexture glass.reflectionTexture = hdrTexture; glass.refractionTexture = hdrTexture; This helps them to reflect in a realistic way. They are made using a .dds file. Now when a closed room is made, there won't be a .dds file different for every room. Will the wood in PBR material still reflect and refract? What can be massed as the hdr texture to it? Is my approach to this right? Or am I missing something? Quote Link to comment Share on other sites More sharing options...
Guest Posted March 30, 2018 Share Posted March 30, 2018 You can also consider doing the opposite with : - Projected texture: http://doc.babylonjs.com/babylon101/lights#projection-texture - http://doc.babylonjs.com/how_to/using_standard_rendering_pipeline#setting-up-volumetric-lights Regarding PBR, you can decide to turn off reflection by setting roughness to 1 and microsurface to 0: -http://doc.babylonjs.com/how_to/physically_based_rendering - http://doc.babylonjs.com/how_to/physically_based_rendering_master 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.