startec Posted October 2, 2015 Share Posted October 2, 2015 I was following this: http://www.html5gamedevs.com/topic/15978-better-outline-for-mesh/ question, but I didn't really see a final answer. It appears that the meshes just have a property called sideOrientation that is set to a number (also dfined as BABYLON.Mesh.DOUBLESIDE for instance) For some reason, even though this looks like just a property, it can not be set after the mesh is constructed. My question is A. Are there plans to support this? B. Can we set the facing for a mesh importer in a babylon file? (right now it seems set to the default of one) C. If neither of these things are true, how could I ever make it so I could navigate "inside" a box modeled in blender? Thank you Quote Link to comment Share on other sites More sharing options...
jerome Posted October 2, 2015 Share Posted October 2, 2015 Answer for A : no Actually, when you set sideOrientation to DOUBLESIDE, the mesh builder method (CreateSomething()) knows then it must construct twice more facets in the shape geometry : inside (or backside) facets and outside (or frontside) facets.It is to say the mesh is then given twice more vertices, twice more facets, twice more uvs, etc than a single sided mesh... at construction time.It's is not the same mesh than a single sided one in terms of geometry. There's no real simple process (but still feasable, I guess, by rebuilding another different mesh from the initial one) to do it once the mesh is built. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 2, 2015 Share Posted October 2, 2015 You can change sideOrientation at any time when using material (different from inner mesh data): var mat = new BABYLON.StandardMaterial("mat", scene); sphere.material = mat; mat.sideOrientation = BABYLON.Material.ClockWiseSideOrientation;http://www.babylonjs-playground.com/#WBEOB Kjue 1 Quote Link to comment Share on other sites More sharing options...
startec Posted October 2, 2015 Author Share Posted October 2, 2015 @Deltakosh Thank you for this. Interestingly I do not see this documented - is there somewhere that it is? This doesn't do exactly what I am interested in however. I am basically trying to toggle whether or not you can see "inside", the inside faces, of a sphere, after you make it. For instance, if I make a mesh in blender, when I import it, I can not see the inside (and outside) of the faces simultaneously. Is there a way that I could do this? Make the inside and outside faces of the mesh visible simultaneously for a mesh I import from blender or a mesh that I originally created with BABYLON.Mesh.FRONTSIDE;? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 2, 2015 Share Posted October 2, 2015 Yep: mesh.material.backFaceCulling = false 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.