Oclahoma Posted November 29, 2017 Share Posted November 29, 2017 Good morning dear GameDevs, I'm trying to make a mesh with StandardMaterial and bumpTexture look metallic, but with moderate success. It should preferably not reflect like glass or chrome, but rather reflect with a surface finish such as brushed or sandblasted aluminium. Does anyone have an idea how to realize something like this? Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 29, 2017 Share Posted November 29, 2017 Hi Oclahoma... welcome to the forum. Our PBR material has some interesting "knobs" to play-with. https://www.babylonjs-playground.com/#2FDQT5#26 That .metallicRoughnessTexture is something fun, for sure. I did a Google IMAGE search... for metal texture wikimedia (wikimedia textures/images are always CORs-clear so they can be used in our playgrounds). It appears that the metallicRoughnessTexture is COLOR-reactive. In other words... the amount of "roughness" is dependent upon the colors of the image. Anyway, it's something to play-with until someone wiser comes-along. Oclahoma 1 Quote Link to comment Share on other sites More sharing options...
Oclahoma Posted November 29, 2017 Author Share Posted November 29, 2017 Hey Wingnut, thanks a lot for your reply. I'm gonna check the playground and play around with it. cheers. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 29, 2017 Share Posted November 29, 2017 Have a nice read: https://www.marmoset.co/posts/pbr-texture-conversion/ this will help you catch what is behind the knobs. Wingnut and Oclahoma 1 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 29, 2017 Share Posted November 29, 2017 https://www.babylonjs-playground.com/#2FDQT5#28 I had to make another. I dumped the pbr material to console, and clicked on "object" to launch in-browser object inspector. OMG. There are a CRAPLOAD of knobs on that pbr texture thing! HOURS of play! Anyway, I went twisting on a few of the fun knobs (properties)... and now I am using a 6-part cubemap texture for the environment texture. I think there may be a problem with the cubeMap mapping. I see reflections of buildings on the ceiling, and clouds on the floor. This whole PBR system looks like a LOT of FUN! What a powerful monster! Gruesome! UPDATE: Link updated to #28... I had a mis-named file in the cubemap array. But still, mapping is incorrect, I think. Side-wall images on ceiling, sky image on side-wall, etc. Another Update: https://www.babylonjs-playground.com/#2FDQT5#29 Apparently the ORDER of the URLs in the cubeMap array... is important. Now it's all fixed. "The sky hasn't really fallen", said The King. "It was only a pine cone, Chicken-Lickin'". "But that pine cone is covered with fascinating occurrences of Fibonacci number sequences that, if investigated, maybe lead you to the secret of life." Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 29, 2017 Share Posted November 29, 2017 It works like with other cube textures: https://www.babylonjs-playground.com/#2FDQT5#31 :-) Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 29, 2017 Share Posted November 29, 2017 *nod* Yeah, as soon as I changed the order of the urls in the cubemap array... to match... https://github.com/BabylonJS/Babylon.js/blob/master/src/Materials/Textures/babylon.cubeTexture.ts ...then it all straightened-up. I didn't expect url order to be an issue, but it is. *shrug* Your way is nicer, though. Cleaner. Were you instrumental in installing PBR for BJS, Sebavan? If so, thanks... it's very very cool. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.