Jump to content

PBR woes...


Pryme8
 Share

Recommended Posts

Ok quick question if I have these textures:

Base Color
default_Base_Color.jpg
 

emmsive

default_Emissive.jpg

Height

default_Height.jpg
 

Metalic

default_Metallic.jpg


 

AO
default_Mixed_AO.jpg

 

Open GL Normal
default_Normal_OpenGL.jpg

 

Roughness.
default_Roughness.jpg


Which goes where in the PBR assignments to make the output look kinda like :

preview1.jpg

I cant even comes close... I mean i have changed the textures a little bit and added a bunch of detail so that's why the normal map and metallic are different then this render.


@ozRocker dont you do PBR stuff?

Link to comment
Share on other sites

Hello,

Could you share the model ?

We currently do not support metallic workflow, only spec gloss, like for normal, we do not support Height + normal, only normal.

We are discussing on adding metal/roughness support.

I would be reallly interested in making it work if you share the model.

Link to comment
Share on other sites

7 hours ago, Sebavan said:

Do you have the model in Babylon or obj the one from the first post ? I am planning to add metal roughness support asap in bjs.

This seems to be a great test case.

That would be just great! A generic metal shader with tweakable parameters - go @Sebavan!!

Link to comment
Share on other sites

Here it is on the pg:

http://www.babylonjs-playground.com/#12CWQQ#0

I only mixed metallic and roughness and added the highlight layer to create a glow on emissive.

You can now precise your emissive texture and what channel to extract the roughness from with those properties on the pbr material:

        material.metallicTexture = new BABYLON.Texture("https://dl.dropboxusercontent.com/u/55657011/metallicmerge.jpg", scene);
        material.useRoughnessFromMetallicTextureAlpha = false;
        material.useRoughnessFromMetallicTextureGreen = true;

Link to comment
Share on other sites

That's getting closer.  I was going to look at the engine/shader that renders it in substance painter in real time and see if that can't be ported.  It sheens like the height and normal maps have a lot bigger effect in that program.  And that's open gl so webgl can't be that far off right?  Maybe that's aspirations for webgl 2.0?

Link to comment
Share on other sites

It is because the height map is not use in the code here.

You could try to bake it in the alpha channel of the normal map and use the bjs parallax occlusion which is a common practice.

Please feel free to adapt the pbr material and PR if you see the shader issues you are running into.

Link to comment
Share on other sites

Would any of these help?
  I dont know if they do or not, I did not really look at them, but they are the glsl files for substance painter that are stored on the shelf. 

I also found that Substance Painter has a shader set up for Unity 4 engine and I think our PBR shader is like identical to it so maybe just building my textures in that format would be best?

I believe the important stuff is in the second ones but they are in a different text format then what notpad can open so I have not looked at their content yet.  Also I was looking into the Eyberus Engine or what ever it is called that Alogrithmic uses to do the openGL rendering post effects and seeing what I can learn from it.
 

pbr-material-layering.glsl

pbr-metal-rough-with-alpha-blending.glsl

pbr-spec-gloss.glsl

pbr-metal-rough-with-alpha-test.glsl

pbr-material-layering.glsl

pbr-metal-rough-with-alpha-blending.glsl

pbr-metal-rough-with-alpha-test.glsl

pbr-spec-gloss.glsl

Link to comment
Share on other sites

right on sounds like a solid plan.  I just noticed we were having a pretty drastic disconnect between results in the openGL shader in Algoritmics software and our output.  I think it was mainly the height calculations.

Now on a side topic that @Sebavan and @NasimiAsl would be interested in.  Ok I wanted to make us a tool to do all of this procedurally.  I have all the noise and mixing functions done and the only thing I am lacking is converting a black and white heightmap into a normal map through tangent space...  If one of you two can help out with that then we can get to the real meat and beans that Ive been trying to get to and have us a fully dynamic procedural texture generator which is why I developed the whole DasNoise lib and things.  I have the UI already kinda built up in my node Shader builder I was working on and put on pause till I can work this out.  I want to essentially make us substance designer like software for creation of materials targeted just for BJS.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...