Jump to content

What is the structure for PBR materials in a babylon.js file


JonVarner
 Share

Recommended Posts

Hey all, I hope this question is not to random. :) But I am looking at updating the exporter from blender to include PBR as an option. What I don't have is an example of what a PBR meterial definition should look like for an imported file. Right now materials are exported from blender like:

"materials":[{"name":"material1","id":"material1","ambient":[0.5,0.5,0.5],"diffuse":[0.4,0.4,0.4],"specular":[0.5,0.5,0.5],"emissive":[0,0,0],"specularPower":49,"alpha":1,"backFaceCulling":true,"checkReadyOnlyOnce":false,"maxSimultaneousLights":4}],

This of course loads as standard materials. I was wondering if someone had an example of what this should look like to load as a PBR material? I can update the exporter on my end, I would just like to make sure its possible and how it should look.

Link to comment
Share on other sites

Right. I am still trying to wrap my head around how what approach I will end up taking. In our pipeline we simply pass and fbx through blender with standard materials so I have feeling for our needs we will just be passing things through with basic materials. The idea would be that we would pull the texture data from the diffuse, bump, and ambient slots. So we will probably not go so far as cycles and baking.

Link to comment
Share on other sites

So I was originally this was going to be more of a blender exercise but that's proving to be the easy part :) I added:

"albedoTexture":{"name":"texture.png","level":0,"hasAlpha":1,"coordinatesMode":0,"uOffset":0,"vOffset":0,"uScale":1,"vScale":1,"uAng":0,"vAng":0,"wAng":0,"wrapU":1,"wrapV":1,"coordinatesIndex":0}

But for for the life of me I cant get it to show up on the material. I am sure I am missing something obvious but can figure out what that is. 

Edited by JonVarner
Typo
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...