Jump to content

Simple glass Material with Standard and PBRMaterial


SvenFrankson
 Share

Recommended Posts

Hi,

I have a simple glass shader here : http://www.babylonjs-playground.com/#JTFJX3#1

There's nothing complicated about it, yet I have not found a way to have this using the existing BabylonJS shader.

(there's a phong specular from the sourcelight and enlightment on the surfaces perpendicular to the view)

I'd rather have it done with StandardMaterial or PBRMaterial, has anyone already achieved it this way ? I've tweaked FresnelParameters on both Standard and PBR, with no successes so far...

Thanks a lot for your inputs ! Have a nice day.

Link to comment
Share on other sites

It's a question :) I'm looking for a way to do the same thing with the existing Material classes (Standard and PBR)

That's because we made an UI for the designers to create Materials (they can set most public properties for Standard and PBR instances), and a loader to request and instantiate the Materials they created in their scenes. If we (developers) need to write shaders, they (graphists, designers...) are no longer autonomous in making the Materials, and will come ask us more.

Link to comment
Share on other sites

4 minutes ago, SvenFrankson said:

It's a question :) I'm looking for a way to do the same thing with the existing Material classes (Standard and PBR)

That's because we made an UI for the designers to create Materials (they can set most public properties for Standard and PBR instances), and a loader to request and instantiate the Materials they created in their scenes. If we (developers) need to write shaders, they (graphists, designers...) are no longer autonomous in making the Materials, and will come ask us more.

 http://www.babylonjs-playground.com/#IRZYH

This link has some customization going on.

Though, I think you can't do transparency for PBRMaterial.

Not sure since I don't really use PBRMaterial(I didn't use it even).

Link to comment
Share on other sites

17 minutes ago, Borislav said:

Awesome with cubes and spheres.

http://www.babylonjs-playground.com/#IRZYH

I think that'll help

 

 

Thanks, but our "use case" is a glass on a table, within a much larger scene with many objects. Or a light-bulb.

The refraction of the scene behind is quite too much (performance-wise), as the camera is not that close, some white enlightment is enough to simulate refraction.

 

Link to comment
Share on other sites

Just now, SvenFrankson said:

Thanks, but our "use case" is a glass on a table, within a much larger scene with many objects. Or a light-bulb.

The refraction of the scene behind is quite too much (performance-wise), as the camera is not that close, some white enlightment is enough to simulate refraction.

 

Why are you keep on replying on my un edited post -_-.

I keep on accidentally pressing enter (lol).

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...