Search the Community

Showing results for tags 'pbr'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda.js
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 36 results

  1. pbr occlusionTexture

    Hello, everyone, I used PBR material in one of our scenes, I want to try to get occlusionTexture with 3dsmax, how to operate it?
  2. PBR demo

    Hi, is this demo updated to new PBR system? As it have issues on iOS devices and I have similar issues with DDS file in my project on iOS devices. Thanks
  3. Hi! I noticed something weird working with reflection texture on IE10 and Microsoft Edge. When using a single image as reflection texture, I get the error "Unable to compile effect", "Invalid arguments passed to function 'texture2D'". Here is a PG reproducing the issue https://www.babylonjs-playground.com/#IRZYH#20 It's working fine on Chrome and Firefox.
  4. Hello all, I'm almost finished with my PBRComposer, but I have a question about reflection of the Skybox: in the glossy model changing the environment-blurriness also changes the blurriness of the material reflection/refraction whereas in the metallic model the blurriness of the environment is not regarded. Can someone confirm that this conforms to the metallic model and is not a bug? IMHO the environment blurriness cannot be skipped away... The following images shows a scene (fingerprints on a glass sphere with some mictosurface and some direct light) with exact the same material parameters (only glossy/metallic texture difference) and with a environment blurriness 0f 0.15. Can you see the difference? thanks in advance PS: Both, the reflection and the refraction does not reflect the environment blurriness in the metalic model
  5. PBR composer ( node based )

    Hello, I'm happy to announce that the node based PBR Composer is on the road. What is PBR Composer ? In short, PBR Composer helps you design and visualize a PBR Material in an efficient way. Parameterizing takes place by dragging and connecting specific nodes from a palette (typically textures, colors and uv-coordinates) to the output node, which represents the PBR Material. A preview panel lets you see all changes in realtime and the corresponding js-sourcecode will be updated as well. The resulting graph can be downloaded in JSON format for later use. Images can be inserted via preview fileselect dialog and/or Drag&Drop, in latter case the images will be transformed to embedded data-urls so the javascript functions can be reused without dependencies. Different meshes and environment-maps are available to see the material under different geometry and reflective light conditions. Motivation for PBR Composer: Due to the complexity of the PBR material (soo many combinations with soo much amazing effects) there is a need of having realtime feedback reflecting the changing parameters. Other than some editor already out using a bunch of parameters in confusing properties panels, nodes lets you to concentrate only on the parameters you need giving a nice overview in form of a graph. Nodes can also be shared and avoids therfore redundancy in the sourcecode. The goal is/was to make the user interface as efficient as possible. The idea for realizing the PBR Composer was inspired from Shader Editor. Technical details: PBR Composer is a web application based on dat.gui, w2ui, litegraph.js and of course on BABYLON.js TODO: At the moment, PBR Composer is customized for PBR-Glossy materials. The current activity is realizing a function for switching between Glossy and Metallic paradigms. Any questions? Let me know... PS: PBR Composer is still in alpha stage but will be deployed in beta stage soon Here it is te demo ...
  6. PBR Alpha Map

    Does the PBR material have an Alpha Map Texture?
  7. PBR Breaking Changes

    Hello, After one year of the PBR Material, we collected most of the required feedback to make it Awesome. But unfortunately, this will go with some breaking changes.. I am really not happy to integrate them but they are for the best and I will fully document them. Knowing our backward compatibility Philosophy in BJS, I just want to give a long time ahead with our plan to ensure this will cause the lowest level of disruption on your projects. Strikeout tasks have been completed. First thing, is the migration of the current PBRMaterial in MaterialsLibrary under the name LegacyPBRMaterial to ensure that the ones among you relying on it can continue to find the current version as of today. This will not be fully maintained but mainly keep for reference during the time everybody migrates to the newer/greater one. Only urgent fixes will be addressed on it. As nobody seems to rely on them, the overloaded values used for debug but taking quite a big amount of code will be removed from the material. All the scalar values will be multiply by their respective maps like albedoColor * albedoTexureSampled (currently it is totally inconsistent and depends of the channel) The different channels will be renamed to map with the GLTF nomenclature (At least I will not have anymore issues in naming :-) ) to allow an easier adoption of BJS and less ramp up for everybody. For example, the material microsurface will be named back to glossiness and reflectivity to specular... All the Maths issues and bugs presents in the material will be fixed. The environment blur will be fixed through offline and/or loadtime GPU generation. (This should be compatible with browser not supporting both FullFloat and Texture LOD) A migration from full float to LUV is in our minds for the environment to allow the use of none full float buffers with HDR compatibility. UBO, Push Mode and the full sets of greatest new features will be added to the new version. A new light type will be created to ensure an easier management of the intensity value in PBR mode. I should not forget a lot here and I hope you understand the future change. This is planned to happen during this month so do not hesitate if you have any feedback, think about any blockers or other evolution you would like to see in. As a consolation gift for the breaking change, I can propose to add the pbr exporter in 3dsMax or blender ?
  8. Error in PBR

    Hi, What is the bets way to debug errors in shaders? I have mystica error from PBR: Error: ERROR: 0:1492: 'glossiness' : undeclared identifier ERROR: 0:1492: 'computeHemisphericLighting' : no matching overloaded function found ERROR: 0:1492: 'assign' : cannot convert from 'const mediump float' to 'structure' ERROR: 0:1573: 'computeLighting' : no matching overloaded function found ERROR: 0:1573: 'assign' : cannot convert from 'const mediump float' to 'structure' I cant really find the source of it ,as the error shows up if I change starting camera angle
  9. 3D Props Assets Texturing Service

    Hello! Lirio Art Production can provide mainly high quality texture or 3D props from scratch to final output for your next-gen game. Please feel free to leave a comment here or directly message me regarding your project and estimates at lirioartproduction@gmail.com. - Texture Only: PBR Texture Tileable - $30/texture Included: Base Color or Albedo Map Normal Map Ambient Occlusion Roughness or Glossiness Map Metallic or Specular Map PBR Props texturing - $45/props/texture Included: Bake the sculpt to the game res Base Color or Albedo Map Normal Map Ambient Occlusion Roughness or Glossiness Map Metallic or Specular Map Substance Painter smart material [optional] - Asset sculpting, game res and texture: Basic Props [Flashlight, Cabinet, Chairs and Tables, etc.] - $150/props Included High resolution Sculpt Game Resolution Bake sculpt to game res PBR Textures [Base Color, Normal Map, AO, Roughness, Metallic]
  10. Sorry for asking, but I could not find any information about the MetallicRoughness-color in a texture. All samples I've seen so far are in the range green to blue. Where can I find more info/spec about this, is this a standard? Thank you
  11. Hello! Lirio Art Production can provide mainly high quality texture or 3D props from scratch to final output for your next game. All textures are set to 2048x2048. - Texture Only: PBR Texture Tileable - $30/texture Included: Base Color or Albedo Map Normal Map Ambient Occlusion Roughness or Glossiness Map Metallic or Specular Map PBR Props texturing - $45/props/texture Included: Bake the sculpt to the game res Base Color or Albedo Map Normal Map Ambient Occlusion Roughness or Glossiness Map Metallic or Specular Map - Asset sculpting, game res and texture: Basic Props [Flashlight, Cabinet, Chairs and Tables, etc.] - $150/props Included High resolution Sculpt Game Resolution Bake sculpt to game res PBR Textures [Base Color, Normal Map, AO, Roughness, Metallic]
  12. Hi, wanted to generate DDS file for new PBR material but somehow couldn't launch IBLBaker, it just started cmd and than immediately closed, do I need to instal something before I can use it?
  13. @Sebavan Hi, checked new examples of PBR , but found some issues. It doesn't work in safari mac, probably because it uses webgl1, works great in other browsers but they have webgl2. Example On safari sphere is just black. Dont get any errors just some warnings from webgl: [Log] BJS - [08:31:35]: Babylon.js engine (v3.0) launched (babylon.js, line 3) [Warning] WebGL: INVALID_OPERATION: texImage2D: type HALF_FLOAT_OES but ArrayBufferView is not NULL (babylon.js, line 5, x54) [Warning] WebGL: INVALID_FRAMEBUFFER_OPERATION: readPixels: attachment type is not correct for attachment (babylon.js, line 6) [Warning] WebGL: INVALID_FRAMEBUFFER_OPERATION: readPixels: attachment type is not correct for attachment (babylon.js, line 6) [Warning] WebGL: INVALID_FRAMEBUFFER_OPERATION: readPixels: attachment type is not correct for attachment (babylon.js, line 6) [Warning] WebGL: INVALID_FRAMEBUFFER_OPERATION: readPixels: attachment type is not correct for attachment (babylon.js, line 6) [Warning] WebGL: INVALID_FRAMEBUFFER_OPERATION: readPixels: attachment type is not correct for attachment (babylon.js, line 6) [Warning] WebGL: INVALID_FRAMEBUFFER_OPERATION: readPixels: attachment type is not correct for attachment (babylon.js, line 6) [Warning] WebGL: drawElements: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering or is not 'texture complete', or it is a float/half-float type with linear filtering and without the relevant float/half-float linear extension enabled. (babylon.js, line 5, x196) [Warning] WebGL: too many errors, no more errors will be reported to the console for this context. (babylon.js, line 5)
  14. PBR issue

    Hi, just pulled newest version of babylonjs and got some problems with PBR material for chrome, it is just black and don't use environment texture from scene anymore. Texture is created in code: this.scene.environmentTexture = new HDRCubeTexture( "environment.hdr", this.scene, ); Material is inside babylon json file part of multi material, { customType: "BABYLON.PBRMaterial", name: "material name", id: "material-id", microSurface: 0.9, reflectivity: [0.8, 0.8, 0.8], albedo: [0.02, 0.02, 0.02], environmentIntensity: 0.5, } Something changed in serialisation of material or I am missing some props in json? as it worked before Also texture is loaded.
  15. PBR crash on android

    Hi, Got error on android device with hdr material (updated using babylonjs extension, size 128). Device: Galaxy Tab 3 WebGl: renderer:"PowerVR SGX 544MP2", vendor:"Imagination Technologies", version:"WebGL 1.0 (OpenGL ES 2.0 Chromium)" Android: 4.4.2 Error: [.Offscreen-For-WebGL-0x714d4da0]GL ERROR :GL_INVALID_ENUM : GetIntegerv: <- error from previous GL command [.Offscreen-For-WebGL-0x714d4da0]GL ERROR :GL_INVALID_ENUM : glTexImage2D: <- error from previous GL command [.Offscreen-For-WebGL-0x714d4da0]GL ERROR :GL_OUT_OF_MEMORY : GetShaderiv: <- error from previous GL command [.Offscreen-For-WebGL-0x714d4da0]GL ERROR :GL_OUT_OF_MEMORY : glFramebufferTexture2DMultisample: <- error from previous GL command Unable to compile effect: Attributes: position, normal, uv Vertex shader: default Fragment shader: default Trying next fallback. Unable to compile effect: Attributes: position, normal, uv Vertex shader: default Fragment shader: default WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost Unable to compile effect: Attributes: position, normal, uv, uv2 Vertex shader: pbr Fragment shader: pbr Error: Failed to execute 'shaderSource' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLShader'. Cannot set property 'isCube' of null There are more error logs as all shaders are logged, if more info is needed I can attach something more
  16. Hi, I`am building my first setup in BabylonJS with PBR Materials and HDR maps. Everything worked fine for me until I hit the "Environment Irradiance": So the HDR Map is used for irradiance and reflection. Ok, in most cases thats what you want, but I want to illuminate my model with scene lights and use the HDR only for reflections (or maybe have the option to toggle between) - for me, it gives me more control. With the HDR map and scene lights, my scene will be to bright. I found some options like: var pbr = new BABYLON.PBRMaterial("pbr", scene); pbr.directIntensity = 1.0; pbr.environmentIntensity = 1.0; But this only controls either the light intensity in the scene or the hdr intensity (both reflection and irradiance). So I dont see an option here to turn down the irradiance of the HDR. In the doc i read about this topic: "The fact that we extract the Harmonics from the texture is the reason why we were entitled to use an High Dynamic Range format. The generation could skip the harmonics generation step if you instantiate an HDRTexture with its parameter generateHarmonics set to false." I tried this but it doesn`t work for me. I used the playground demo in the doc ( http://www.babylonjs-playground.com/#1P98HI#2 ) and updated the HDRCubeTexture line like this: var hdrTexture = new BABYLON.HDRCubeTexture("textures/country.hdr", scene, 512, true, false); //first boolean: noMipMap // 2nd boolean: generateHarmonics? The first boolean works, I can turn off / on MipMaps. But the 2nd boolean has no effect. Can someone push into the right direction? regards, Mario
  17. Let's say I have a material with the following properties: var ref = new BABYLON.CubeTexture("skybox", scene); var mat = new BABYLON.PBRMaterial("PBR", scene); mat.albedoTexture = new BABYLON.Texture("a.png", scene); mat.reflectionTexture = ref; mat.microSurface = .4; //mat.diffuseTexture = new BABYLON.Texture("s.png", scene); //mat.reflectivityColor = new BABYLON.Color3.FromHexString("#eeeeee"); //mat.albedoTexture.hasAlpha = true; //materialGloss.albedoColor = new BABYLON.Color3.FromHexString("#f00001"); Is it possible to have a texture on top of the reflecting surface? Preferably with an alpha channel. What about multiple textures layered on top of each other, like a dirt map on top of a logo?
  18. "Unable to compile effect" error

    Hi everybody! I get the following errors (relevant excerpt) in the console: BJS - [13:19:53]: Unable to compile effect:... ... BJS - [13:19:53]: Error: ERROR: 0:1001: 'vBumpInfos' : undeclared identifier ERROR: 0:1001: 'y' : field selection requires structure or vector on left hand side meanwhile trying to add a normal map (by means of bump texture) to any PBR Material. My material definition is: var myMaterial=new BABYLON.PBRMaterial("plastic",Scene); myMaterial.reflectionTexture=txtHDR; myMaterial.bumpTexture=new BABYLON.Texture("assets/textures/11_onetile.png",Scene); myMaterial.cameraExposure=exposure; myMaterial.cameraContrast=contrast; myMaterial.microSurface=0.96; myMaterial.albedoColor=BABYLON.Color3.White(); myMaterial.albedoTexture=new BABYLON.Texture("assets/textures/QIS_Exterior_BaseColor.png",Scene); myMaterial.reflectivityColor=new BABYLON.Color3(0.07,0.07,0.07); myMaterial.metallicTexture=new BABYLON.Texture("assets/textures/QIS_Exterior_Metallic_PBR.png",Scene); myMaterial.useRoughnessFromMetallicTextureAlpha=false; myMaterial.useRoughnessFromMetallicTextureGreen=true; If I remove the offending line: myMaterial.bumpTexture=new BABYLON.Texture("assets/textures/11_onetile.png",Scene); the material works flawless (but of course without normal map). My question: Are BJS PBR Materials compatible with Normal Maps?
  19. Hi, We are developing an archviz application with Babylon. So, obviously, we are looking for the most realistic render. In the archviz world (outside babylon), PBR is currently the way to go, so we plan to create PBR materials. But what is the babylon roadmap regarding this? Is it just a (really cool) feature added without further development, or a real direction took by the development team ? What about performance ? Are the PBR materials using more resources than Standards ? Thanks for your expertise.
  20. Hello, There is a bug present with 3.0 only on latest Edge and Internet Explorer When having a bumpTexture with a pbr material the material renders black. I made a PG to test it : http://www.babylonjs-playground.com/index.html#8I10UH
  21. Hi, It is possible create similar like in playcanvas orange room example with babylon js? https://playcanvas.com/project/345310/overview/orange-room it use box projected cubemap and pbr shader (fast static cubemap). an other and similar example with three js (parallax-corrected environment mapping) https://www.clicktorelease.com/blog/making-of-cruciform I found only in babylon js PBR dynamic texture reflection example but it use simple cubemap and not static so its slow. Any example and suggestion welcome. Br. shater
  22. PBR Research

    PBR RESEARCH its amazing what you can do to these pbr materials , light settings, cameras, physics ... First PBR materials test Shader samplers of properties BABYLONJS Features Here is a small reminder of the PBR material supported features: Albedo, Reflectivity, Microsurface Reflection / Refraction Normal Map / Parallax Shadows (as the standard material) Energy Conservation Gamma Correction Inversed squared light Falloff and Light Radius HDR Texture and Seamless Cubemap (LOD extension required) Environment Irradiance Camera controls: Contrast and Exposure Camera controls: Color Grading and Color Curves Zero Light Lighting Debug Controls BABYLONJS PARAMS directIntensity: Controls the amount of diffuse and specular the material is reflecting. emissiveIntensity: Controls the level of emissive light the material is emitting. environmentIntensity: Controls the level of the reflected light from the environment. specularIntensity: As the material is still using a blinn phong like higlights computation, this can help dropping the specular level of the material without impacting the reflectivity. MicroSurface (AKA Glossiness or specular power) reflectivityTexture= texture; useMicroSurfaceFromReflectivityMap = true; useMicroSurfaceFromReflectivityMapAlpha = true; reflectionColor = new BABYLON.Color3(1.0, 1.0, 1.0); // White to make the material fully reflective. OverloadedAlbedoIntensity is to overload a texture with the color the values go from 0 to 1 overloadedAlbedo = new BABYLON.Color3(0, 0, 1); overloadedAlbedoIntensity = overloadedIntensity; // Creates a reflection texture. var reflectionTexture = new BABYLON.CubeTexture("textures/TropicalSunnyDay", scene); // Creates the pbr material to use in the scene var pbr = new BABYLON.PBRMaterial("pbr", scene); pbr.reflectionTexture = reflectionTexture; pbr.reflectivityColor = new BABYLON.Color3(1.0, 1.0, 1.0); // White to make the material fully reflective. The diffuse reflection will be described later in the Environment Irradiance section. Another interesting addition to the reflection is the ability to keep the most luminous part of the reflection over transparent surface... Yeah, it does not make much sense... Actually if you look through a window at night from a lit room, you can see the reflection of lights or TV on the glass. This is the same for reflection in the PBR Material. A special property pbr.useRadianceOverAlpha = true; has been added to allow you to control this effect. Not only reflection (AKA radiance) but specular highlights can be seen on top of transparency. glass.reflectionTexture = hdrTexture; glass.alpha = 0.5; // realism reflection material.emissiveFresnelParameters = new BABYLON.FresnelParameters(); material.emissiveFresnelParameters.bias = 0.4; material.emissiveFresnelParameters.power = 140; material.emissiveFresnelParameters.leftColor = BABYLON.Color3.Red(); material.emissiveFresnelParameters.rightColor = BABYLON.Color3.Blue(); Camera Control Photographic tone mapping and deals with the contrast directly from the material. var pbr = new BABYLON.PBRMaterial("pbr", scene); pbr.cameraExposure = 0.66; pbr.cameraContrast = 1.66; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Roughness: parameter can “flatten” the color transitions. You can use it to make your material appear dusty and flat Reflections: Black color makes the material non-reflective, white color makes it fully reflective. All the gray scale values between increase or decrease the reflection strength Just like with the Diffuse, you can use Color, Bitmap or Procedural map in the Reflect slot. Glossiness: This is the parameter that controls how sharp/blurred are the reflections. Some real world objects, like polished metal, mirror, chrome, have very sharp reflections, while other materials, such as wood, concrete, plastic, etc., have blurred reflections. BABYLONJS //MicroSurface (AKA Glossiness or specular power) BABYLON The micro-surface of a material defines the way it is reflecting the incoming lights. It is not defining the amount, only how. A glossy material will tend to reflect the light in the same direction it is incoming. On a Matte one the reflected light will vary in contact of the surface. http://babylonjs-playground.com/#1LZALU#5 Tips: To achieve the best results, you can store the glossiness in the alpha channel of the reflectivity map (this prevents having a constant gloss on one material): materialSphere.reflectivityTexture = texture; materialSphere.useMicroSurfaceFromReflectivityMap = true; Ligthing Intensity In order to allow finer grain control of the lighting, the following properties have been added in the material. directIntensity: Controls the amount of diffuse and specular the material is reflecting. emissiveIntensity: Controls the level of emissive light the material is emitting. environmentIntensity: Controls the level of the reflected light from the environment. specularIntensity: As the material is still using a blinn phong like higlights computation, this can help dropping the specular level of the material without impacting the reflectivity. Fresnel changes the reflection strength depending on the viewing angle. General rule is that reflections are weaker if the surface is facing you perpendicularly and increase in strength as the surface approaches parallel position relative to your viewing angle. As a general guideline, here are the Reflect IOR values for some common object types: water 1.33 plastic 1.45 glass 1.5-1.8 diamond 2.4 compound materials like wood, stone, concrete etc 3-6 metals 20-100 Reflection Depth: This is the number of times a light ray is reflected before stopping the calculations. When the set number of reflections has been calculated, the rest are simply displayed as the Exit color. You can try setting a bright color as the Exit color to see how much information you lose. BABYLONJS Reflectivity (AKA specular color) The reflectivity of a material defines the amount of light it is reflecting. Basically, a black specular will mean almost no reflection and white will be close from a perfect mirror: Tips: To achieve the best results use a specular map stored in a texture: materialSphere.reflectivityTexture = texture; Reflection The key purpose of a PBR material is to conserve the energy (not emitting more light than it receives). If a lot of light is reflected from the environment the diffuse reflected light will drop. This means that without Reflection Map the material would be black if the specular is close to white (reflecting nothing). This is why we introduce in the material a Reflection Color parameter to ensure the material still works without Reflection texture. var pbr = new BABYLON.PBRMaterial("pbr", scene); pbr.reflectionColor = new BABYLON.Color3(1.0, 0.0, 0.0); Refractions: These settings control if and how the material let’s the light through it. Common materials that have refractive properties are glass, water, gems, transparent plastics, etc. First parameter that controls the refractions is Refract color. As before, it goes from black (no refractions) to white (full refractions) and everything in between is a mix between Diffuse and Refraction. OverloadedAlbedoIntensity is to overload a texture with the color the values go from 0 to 1 materialSphere.overloadedAlbedo = new BABYLON.Color3(0, 0, 1); materialSphere.overloadedAlbedoIntensity = overloadedIntensity; Refraction glossiness: Just like with the reflections, you can change how blurry are the refractions. This effect is great for frosted glass or any other rough surface that lets through the light but distorts it along the way. This one increases render times and noise a lot so be careful with it. No need to go lower than 0.6 for most materials. INDEX of REFRACTION: has been calculated for many materials, so you don’t need to guess. You can find various IOR tables on the internet. Here is one of them: Acetone 1.36 Actinolite 1.618 Agalmatoite 1.550 Agate 1.544 Agate, Moss 1.540 Air 1.0002926 Alcohol 1.329 Amber 1.546 Amethyst 1.544 Crystal 2.00 Diamond 2.417 Emerald 1.576 Ethanol 1.36 Ethyl Alcohol 1.36 Glass 1.51714 Glass, Albite 1.4890 Glass, Crown 1.520 Glass, Crown, Zinc 1.517 Glass, Flint, Dense 1.66 Glass, Flint, Heaviest 1.89 Glass, Flint, Heavy 1.65548 Glass, Flint, Lanthanum 1.80 Glass, Flint, Light 1.58038 Glass, Flint, Medium 1.62725 Gold 0.47 Ice 1.309 Ivory 1.540 Jade, Nephrite 1.610 Jadeite 1.665 Lead 2.01 Malachite 1.655 Methanol 1.329 Moonstone, Albite 1.535 Nylon 1.53 Onyx 1.486 Opal 1.450 Oxygen (gas) 1.000276 Oxygen (liq) 1.221 Pearl 1.530 Plastic 1.460 Plexiglas 1.50 Polystyrene 1.55 Quartz 1.544 Quartz, Fused 1.45843 Rock Salt 1.544 Rubber, Natural 1.5191 Ruby 1.760 Sapphire 1.760 Silicon 4.24 Steel 2.50 Tiger eye 1.544 Topaz 1.620 Tourmaline 1.624 Turpentine 1.472 Turquoise 1.610 Water (gas) 1.000261 Water 35’C (Room temp) 1.33157 Zirconia, Cubic 2.170 Max depth works just like with the reflections. The default value is usually fine, but for scenes with large amount of refractions, you should increase it. Fog Color. It is great if you want to tint the glass in a realistic way. Using the Fog color makes thinner parts lighter and thicker parts darker. You can use the Fog multiplier value to adjust how strong is the tint. I suggest using colors with less than 255 lightness and saturation for realistic results. You can control the relationship between object thickness and Fog intensity by using the Fog value. Look at the examples to see how it works. Negative values make the tinting stronger and color transitions more extreme, while positive values make the fog smoother and weaker. Use it together with fog multiplier to get the effect you need. The biggest drawback of the Fog color is that you can not use a map in this slot, this means you can only use a single color. If you want to create a stained glass material or glass with multiple colors, you will have to do that by using the Refract color and not the Fog. It is, however, great for those single-colored materials and much more realistic than simply changing the Refract color. Anisotropy allows you to create stretched highlights. In real world these are most commonly seen on brushed metal surfaces with long, parallel ‘scratches’. Anisotropy allows you to fake this by stretching and rotating the highlights as you like. Bump and Displace slots first. Both of these slots allow you to assign a bitmap or procedural map to simulate unevenness and deformation of the objects surface. Bump does so without changing the overall geometry of the object, but Displace actually subdivides and deforms the object during rendering. The deformations work like this – middle grey [128;128;128] of the map does not change anything on the object, darker values push the surface inwards while lighter values pull it out. The further this value is from medium gray, the stronger is the effect. Color of the map is not taken into account and only the lightness value is used. Last map we are going to look at is the Opacity map. It works very simple. Pure white value is used for the non-transparent parts of the material and pure black is for completely invisible parts of the material, everything in between is more or less half transparent. It is great if you need to simulate stuff like tree leaves or lace fabric without using a large amount of polygons. BRDF DOCS ~ref:http://doc.babylonjs.com/tutorials/Advanced_Texturing ~ref:http://doc.babylonjs.com/tutorials/Advanced_Texturing ~ref:http://doc.babylonjs.com/overviews/Physically_Based_Rendering_Master ~ref:http://blog.selfshadow.com/publications/s2012-shading-course/burley/s2012_pbs_disney_brdf_slides_v2.pdf
  23. Proper Lightmap Workflow

    Hey guys, So I'm looking into an ideal way to set up lighting for my levels. I'm going with PBR since that's what I'm familiar with from other engines. Right now I'm just leaving reflection color black until my diffuse + lightmapping are standing on their own. What I'm stumped on right now is how to deal with hot-spots and maybe lightmap contrast in general. There are sconces on walls and I use them as emissive textures to generate the lightmap bakes. In a typical Blender Cycles render, the surface nearest to the emissive sconce will get washed out. I bake the direct+indirect diffuse as a lightmap from this. When I apply this as the ambientTexture it looks close, but as I understand it, ambient is really a shadowmap, so its not making anything brighter than it already is and therefore no hotspots. I tried using lightmapTexture, but I don't think I understand how to format it correctly because setting my lightmap to it as-is effectively blasts on-top of everything rather than mix with it. The only thing that has come close to doing what I intend is applying the lightmap to the emissiveTexture and bumping up emissive color to BABYLON.Color3(5,5,5); It's rough, but it does get me surfaces that are lighter and darker than the albedo at the same time. (see bottom image for that) So that's where I'm at. I'm holding out hope that there's a proper way to mix lightmapTexture and albedoTexture that I'm just missing. Also open to alternative approaches if I happen to be running against the grain in what I'm attempting. Thanks in advance for any pointers. Blender Cycles preview render in Babylon with PBR Material albedoTexture = wrapping basecolor textures emissiveTexture = lightmap emissiveColor (1,1,1) albedoTexture = wrapping basecolor textures lightmapTexture = lightmap albedoTexture = wrapping basecolor textures emissiveTexture = lightmap emissiveColor (5,5,5)
  24. Hello world First of all, BIG THANKS to @Sebavan for its amazing PBR Material ! I'm taking a lot of fun playing with the differents features. On monday, I enjoyed playing with microsurface parameter. It worked really fine until I added a bumpTexture. After diving into the code, I understood that microsurface is handled in two different ways : EXT_shader_texture_lod WebGL extension is supported, LODBASEDMICROSURFACE define is added to the shader, and we can sample reflection texture with the good LOD level. EXT_shader_texture_lod WebGL extension is NOT supported, no define is added to the shader, we don't have access to LOD level and we have to bias mipmap level when sampling to fake LOD level or something like that. Both ways seem to work fine when I don't use bumpTexture. But if I add a bumptexture to the PBR material, then only the first option works. With the second option, we can see some flickering or pixelation, I don't know how to call that (left plane on the picture) : Here is a basic PG showing the PBR material with all these parameters (this one should work !) : http://www.babylonjs-playground.com/#19SMAD#3 And here is the same PG, but I intentionally disabled the extension, to see how it works on devices which do not support the extension : http://www.babylonjs-playground.com/#19SMAD#4 It's less striking on the PG (don't look perpendicular to a face), that's why I posted the picture above. Maybe it's not a bug and it's really impossible to have both microsurface and bumpmap working when the extension isn't available ? What do you think ? Have a good day