webGLmmk Posted April 15, 2016 Share Posted April 15, 2016 I'm trying to import this multi-material mesh and there are some mesh faces just not showing. This is what it looks like in Blender Render, materials display: note the smoothed out cone shapes going in to the mesh When I import it into the blender scene, it shows in the browser like this: Note the cone shapes are gone. You're seeing the spheres inside the box, which are not supposed to be visible except for the front exposed faces. The spheres are white because that is the base color i assigned initially (you have to do that in b. render). the black blotches on the front are where i assigned the exposed faces the dark grey color. Ican't tell if babylon is rendering it black or those faces aren't showing either. Even weirder, when i create a playground example, THIS happens: http://www.babylonjs-playground.com/#1HMKKM#1 all the darker materials are transparent. These would be the ones that were assigned AFTER the lighter base material. Some weird thing with that in the playground. Fortunately its not that bad when i open in the browser. Only the grey cones are missing. They're all diffuse colors with a specular of about .5 . No textures or anything. Showing absolutely transparent. This is the second time I've modelled them, thought I screwed up the first one. Any advice? code for .babylon file: https://github.com/gson78/miscWebGLpages/blob/gh-pages/blender-scenes/custom-speakers4.babylon Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 15, 2016 Share Posted April 15, 2016 This will require the help of our Blender god ( @gryff) webGLmmk 1 Quote Link to comment Share on other sites More sharing options...
webGLmmk Posted April 15, 2016 Author Share Posted April 15, 2016 6 minutes ago, Deltakosh said: This will require the help of our Blender god ( @gryff) Blender is near and dear to my heart.... going to have to put python on my list and contribute someday.. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted April 15, 2016 Share Posted April 15, 2016 I looked at the .babylon file & the log file. Since you do not use descriptive names for your materials, or include cameras / lights, cannot really tell that much or put it in the sandbox without camera lights. Maybe put .blend in repository. Things I notice: you are using vertex colors. Do not know if this is important, but it is not common. you are not reusing your materials across speakers. Should not affect outcome, but a resource waste. Quote Link to comment Share on other sites More sharing options...
webGLmmk Posted April 17, 2016 Author Share Posted April 17, 2016 On 4/15/2016 at 8:48 AM, Deltakosh said: This will require the help of our Blender god ( @gryff) On 4/15/2016 at 10:26 AM, JCPalmer said: I looked at the .babylon file & the log file. Since you do not use descriptive names for your materials, or include cameras / lights, cannot really tell that much or put it in the sandbox without camera lights. Maybe put .blend in repository. Things I notice: you are using vertex colors. Do not know if this is important, but it is not common. you are not reusing your materials across speakers. Should not affect outcome, but a resource waste. Ok so it actually has nothing to do with the materials. I created another file with some other shapes. Another cone, cube, uv sphere, cylinder. I didn't assign materials, I just removed some of the faces facing the camera. In Blender itself, once you remove faces, you can see the mesh still from the inside. Once exported to a .babylon file and then used in babylon's engine, you can only view meshes from an outside view of the faces. They only render/appear from an outside angle. Any view that should show the inside of the faces isn't rendered (resulting in transparency). Playground example http://www.babylonjs-playground.com/#1HMKKM#2 repo .babylon code: https://github.com/gson78/miscWebGLpages/blob/gh-pages/blender-scenes/shapes_test1.babylon\ same scene hosted on github pages: (appears the same) http://gson78.github.io/miscWebGLpages/shapes_test1.html Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 17, 2016 Share Posted April 17, 2016 Ok gotcha you should disable backFaceCulling: http://www.babylonjs-playground.com/#1HMKKM#3 webGLmmk 1 Quote Link to comment Share on other sites More sharing options...
webGLmmk Posted April 17, 2016 Author Share Posted April 17, 2016 2 minutes ago, Deltakosh said: Ok gotcha you should disable backFaceCulling: http://www.babylonjs-playground.com/#1HMKKM#3 Fantastic! And now i know what backFaceCulling is http://www.babylonjs-playground.com/#1HMKKM#4 GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted April 17, 2016 Share Posted April 17, 2016 Actually, you should only disable backFaceCulling when you need to see both sides at some point. The default is true, since drawing the inside of a sphere or any closed object is a waste. FYI, you can turn off backFaceCulling in Blender, and the setting goes into the .babylon file. Picture below comes from Mapped Properties section of documentation. Since you only see one side of the cones, better to Flip their normals. From edit mode, click menu: mesh->Normals->Flip Normals. Quote Link to comment Share on other sites More sharing options...
webGLmmk Posted April 19, 2016 Author Share Posted April 19, 2016 On 4/17/2016 at 11:56 AM, JCPalmer said: Actually, you should only disable backFaceCulling when you need to see both sides at some point. The default is true, since drawing the inside of a sphere or any closed object is a waste. FYI, you can turn off backFaceCulling in Blender, and the setting goes into the .babylon file. Picture below comes from Mapped Properties section of documentation. Since you only see one side of the cones, better to Flip their normals. From edit mode, click menu: mesh->Normals->Flip Normals. That was what I needed. The problem with backFaceCulling is that you have to override your imported material to set it as False. Thsi way, all I had to do was face select in Edit mode and flip the normals on only those faces. Not sure why it shows differently in the playground... : http://www.babylonjs-playground.com/#1HMKKM#5 But it looks right on my page http://gson78.github.io/miscWebGLpages/shapes_test1.html GOOD TO KNOW thanks a lot. Now to mess with lighting and hopefully sound processing. Hopefully I won't be back again too soon ;-) GameMonetize 1 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.