iisodd Posted October 26, 2016 Share Posted October 26, 2016 when using pbrmaterial with parallax enabled , the albedoTexture gone, and here is a PG showing the problem :http://babylonjs-playground.com/#10I31V#27 according to tutorials said : A diffuse texture is required for using parallax mapping. so how do i use parallax in pbr? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 27, 2016 Share Posted October 27, 2016 Hello, The problem is you mixed specularColor (StandardMaterial) and reflectivityColor (PBRMaterial). This is fixed for the texture here. http://babylonjs-playground.com/#10I31V#31 Trying it, we figured PBR Parallax has been broken. the PR is in progress to fix it: https://github.com/BabylonJS/Babylon.js/pull/1472 It should be in the PG tomorrow. CU, iisodd 1 Quote Link to comment Share on other sites More sharing options...
iisodd Posted October 27, 2016 Author Share Posted October 27, 2016 thanks , the problem solved, but another problem raised the parallax occlusion not working as expect, it should looks like this but in babylon it looks like this this is the PG showing the problem http://babylonjs-playground.com/#10I31V#35 (not fix the parallax yet, so maybe you cant see the albedotexture ) Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted October 27, 2016 Share Posted October 27, 2016 I've never gotten the pbr materials to look right... just sayin Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 27, 2016 Share Posted October 27, 2016 Hello, The problem here is not just about PBR anymore but the Parallax in general, ping @Nockawa: http://babylonjs-playground.com/#10I31V#36 Tweaking your parameter should make it look better. what was the other image from ? Quote Link to comment Share on other sites More sharing options...
iisodd Posted October 27, 2016 Author Share Posted October 27, 2016 Hello, the image from the substance designer, the problem is the rust display in the wrong way, this is the way it should be but in babylonthe rust display on a flat layer , not in 3d place Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 27, 2016 Share Posted October 27, 2016 I agree it will require tweeking and this comes mainly for the envoironemnt and lighting in use: http://babylonjs-playground.com/#10I31V#79 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 27, 2016 Share Posted October 27, 2016 Ok got it :-) @Nockawa is your guy for that. Quote Link to comment Share on other sites More sharing options...
Nockawa Posted October 27, 2016 Share Posted October 27, 2016 You said " the rust display on a flat layer , not in 3d place", so you mean the rust is not displaced by the parallax algo? The rust is part of the albedo texture, right? The reference picture you posted is using Parallax mapping or it does displacement mapping (recomputing the geometry) ? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 28, 2016 Share Posted October 28, 2016 Actually the error is not on the diffuse who seems to be the only one to work: http://babylonjs-playground.com/#10I31V#80 but on the other channels who are not taking the offset in account to fetch (ambient occlusion, reflectivity/specular, opacity, ...). I will try to fix it over the weekend. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 28, 2016 Share Posted October 28, 2016 The fix is in PR : https://github.com/BabylonJS/Babylon.js/pull/1475 And should give you this on the following pg once in it tomorrow: http://babylonjs-playground.com/#10I31V#79 Quote Link to comment Share on other sites More sharing options...
iisodd Posted October 29, 2016 Author Share Posted October 29, 2016 thank you for you help, , but i find out some face of the cube's high light on these are not right .(the light is from the top, so i think the high light should on the top as well. and here is only one light in the scene. here is the PG showing the problem: http://babylonjs-playground.com/#10I31V#81 thanks Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 29, 2016 Share Posted October 29, 2016 Yep seems an issue in standard material as well with bump only: http://babylonjs-playground.com/#10I31V#82 Highlights seems reversed from where they should be. @Deltakosh can probably help on this else I ll give it a try nex week. Quote Link to comment Share on other sites More sharing options...
Nockawa Posted October 30, 2016 Share Posted October 30, 2016 On 10/29/2016 at 10:34 AM, iisodd said: thank you for you help, , but i find out some face of the cube's high light on these are not right .(the light is from the top, so i think the high light should on the top as well. and here is only one light in the scene. here is the PG showing the problem: http://babylonjs-playground.com/#10I31V#81 thanks My two cents on that, I remember while working on the parallax there weren't clear definition for the bump/normal map of what color should be for R/G and sometimes I used map which were "inverted" compared to the way the engine were interpreting them. I used this tool to correct the files, it's pretty handy: http://cpetry.github.io/NormalMap-Online/ Nabroski 1 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 30, 2016 Share Posted October 30, 2016 Hello, This makes me remember of the different conventions: OpenGLx-axis = righty-axis = upDirectXx-axis = righty-axis = downBabylonJSx-axis = lefty-axis = down and it seems the working setup is: material.invertNormalMapX = true; http://babylonjs-playground.com/#10I31V#85 Have a good week end. iisodd 1 Quote Link to comment Share on other sites More sharing options...
iisodd Posted October 30, 2016 Author Share Posted October 30, 2016 wow, thank you . Quote Link to comment Share on other sites More sharing options...
Nockawa Posted October 30, 2016 Share Posted October 30, 2016 7 minutes ago, Sebavan said: Hello, This makes me remember of the different conventions: OpenGLx-axis = righty-axis = upDirectXx-axis = righty-axis = downBabylonJSx-axis = lefty-axis = down and it seems the working setup is: material.invertNormalMapX = true; http://babylonjs-playground.com/#10I31V#85 Have a good week end. I've looked for this kind of info a lot when working on Parallax, so if there's no documentation about that (because I may have missed it), it would be extremely helpful to make/append one! @Sebavan you're the man ! (not for the document stuff, well, you could be the man, but for the knowledge stuff!) Quote Link to comment Share on other sites More sharing options...
iisodd Posted October 30, 2016 Author Share Posted October 30, 2016 but why don't we just follow the same way as DirectX or OpenGL? Quote Link to comment Share on other sites More sharing options...
Nockawa Posted October 30, 2016 Share Posted October 30, 2016 Just now, iisodd said: but why don't we just follow the same way as DirectX or OpenGL? because we are as good and as important as them to make up our own standards! iisodd 1 Quote Link to comment Share on other sites More sharing options...
iisodd Posted October 30, 2016 Author Share Posted October 30, 2016 well , you really made your point Nockawa 1 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 30, 2016 Share Posted October 30, 2016 Because it has been implemented like this first and to not brake back compat when discovered later during this thread I guess ??? Quote Link to comment Share on other sites More sharing options...
Nockawa Posted October 30, 2016 Share Posted October 30, 2016 Ok, I've found this: https://doc.babylonjs.com/tutorials/Advanced_Texturing and it's talking about the normals, @Sebavan is the information in this doc accurate? Here's what's said: Quote Please note that by default, normal maps are considered to be following DirectX format. If you want to provide a different convention normal maps, you can just set material.invertNormalMapX = true or material.invertNormalMapY = true. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 30, 2016 Share Posted October 30, 2016 lol, dunno which one to trust now :-) We should double check the default. At least the @iisodd scene looks consistent, but yes agree would be nice to validate which one is in use. http://babylonjs-playground.com/#10I31V#86 CU, Quote Link to comment Share on other sites More sharing options...
iisodd Posted October 31, 2016 Author Share Posted October 31, 2016 At least my normal map is DirectX format. here is a screenshot about the setting in substance designer so i believe babylonjs not following DirectX format. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 31, 2016 Share Posted October 31, 2016 This would mean this one is true :-) OpenGLx-axis = righty-axis = upDirectXx-axis = righty-axis = downBabylonJSx-axis = lefty-axis = down 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.