Jump to content

Search the Community

Showing results for tags 'roughness'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. 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.
×
×
  • Create New...