Search the Community
Showing results for tags 'metallic'.
-
Hello everyone. First of all I would like to say thank you, the posts in this forum often helped me. You guys have a great community! Now to my Problem. I need to create a PBRMaterial out of 4 different textures. There is a BumpTexture, an AlbedoTexture, a Metallic- AND a RoughnessTexture but I only found a way to create this by using a combination of MetallicRoughness. Actually I am using the code below: let pbr = new BABYLON.PBRMaterial("pbr", this._scene); //Create bumpTexture and flip normal. (DirectX <-> OpenGL) pbr.bumpTexture = new BABYLON.Texture("materials/" +filePath +"/02_Texturepack/" +materialName+"Normal.png", this._scene); pbr.bumpTexture.level = -1; //Create albedoTexture pbr.albedoTexture = new BABYLON.Texture("materials/" +filePath +"/02_Texturepack/" +materialName+"BaseColor.png", this._scene); //Create reflectionTexture pbr.reflectionTexture = BABYLON.CubeTexture.CreateFromPrefilteredData("textures/environment.dds", this._scene); //Create metallicRoughnessTexture pbr.metallicTexture = new BABYLON.Texture("materials/" +filePath +"/02_Texturepack/" +materialName+"MetallicRoughness.png", this._scene); //Set metallic and roughness to 1 to use it from the metallicRoughnessTexture pbr.metallic = 1.0; pbr.roughness = 1.0; //set channel with metallic and roughness pbr.useRoughnessFromMetallicTextureAlpha = false; pbr.useRoughnessFromMetallicTextureGreen = true; pbr.useMetallnessFromMetallicTextureBlue = true; //set new material to mesh this._activeMesh.material = pbr; Is there any possibility to seperate the metallic and roughness informations in two different images? At the moment I am editing the metallic texture with photoshop and put the information of roughness into the green channel and the metallic information into the blue channel which works pretty well. unfortunaly thats not a solution, because customer have thousonds of texturepacks I need to show in Babylon without merging metallic and roughness. Greetings, Chris.
- 3 replies
-
- pbrmaterial
- metallic
-
(and 1 more)
Tagged with:
-
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