excelsior Posted May 14, 2016 Share Posted May 14, 2016 Hey, so i ve got this problem, i m new to blender and babylon.js i tried to create a wall with a door hole in it in blender. i create 3 cube shape that i linked together then i exported that. I have light probleme in babylon like you can see on the screen shoot ? where does it come from ? Quote Link to comment Share on other sites More sharing options...
excelsior Posted May 14, 2016 Author Share Posted May 14, 2016 i kinda find a fix but i still see demarcation between the cube i used .. Quote Link to comment Share on other sites More sharing options...
dbawel Posted May 15, 2016 Share Posted May 15, 2016 @excelsior - Remember that you are declaring a material value per object (even if they share the same material), as by default babylon displays these values uniquely on each object. So the only way to correct this is to change the values of each channel in the materials(s) such as the most obvious specular channel to remove such values. And if you don't require interactive lighting, then you can also bake the lighting into a texture or textures UV mapped across all. Otherwise, I would use one object, and texture map the the "door", or you might use a smaller plane to represent the door. You CAN create a booleen in the wall object, however I never recomeend this, as it's like a box of chocolates - you never know what you'll get. And I hate texture mapping booleen objects. DB gryff 1 Quote Link to comment Share on other sites More sharing options...
gryff Posted May 15, 2016 Share Posted May 15, 2016 Hi excelsior - welcome to the forum. You might want to take a look at the first 5-10 minutes of this Blender tutorial video. It basically describes a good way to produce a single mesh room(s) using extrusion methods. I word of warning, after you have created the mesh, go into edit mode, select all you vertices then recalculate normals outside - otherwise you may have some "missing faces" when you export to BJS. @dbawel is correct in suggesting you avoid boolean methods in Blender because, in my experience, you may get more vertices than you think. And, as David says I would reduce specular values and maybe use "flat shading". cheers, gryff dbawel 1 Quote Link to comment Share on other sites More sharing options...
excelsior Posted May 15, 2016 Author Share Posted May 15, 2016 okay thanks both of you for the advice. i didn t use boolean here but i just create 3 box in blender and join them. i was thinking that doing so the result in babylon would be one unique mesh not 3 different mesh with different texture mapping. That being said i encounter another problem wich is that when i export a mesh from blender it look like if this mesh gets less light than mesh created by babylon. here's a photo to illustrate. on the picture of the scene you can see that the wall we are facing does not receive the same amount of light than the one on the right all the 3 walls around me are the same color and same light reflection but the one i import from blender. I don't get why. I tryed to export a simple meshe like this wall using an online 3d modeling software called clara.io that can export to .babylon and i don't encounter the problem here. So it must have to do with a blender settings. But since i started learning blender, babylon and 3d modeling like 3 days ago i m don't know where to look to fix that. Thx for the advice though i will check the tutorial the extruder method seems to be more reliable. Quote Link to comment Share on other sites More sharing options...
dbawel Posted May 15, 2016 Share Posted May 15, 2016 Hi @excelsior - As @gryff suggested, it could verly likely be a vetex ordering issue - but also be careful to look at your normals to make certain that they are not inverted normals at the poly or vertex level, which can often happen in many modelling operations in Blender or any 3D application. Otherwise, if you are using the same material and declaring values in BJS for most all material properties, then this will over ride any material values exported from Blender - and then you will know if it is an issue caused by inverted normals. But again, simply view normals in Blender to quickly see if you have inverted normals on any of your objects; which won't occur with native BJS objects unless you set normals to be inversed. If you have inverted normals, the it is a simple operation to invert them in Blender. Quote Link to comment Share on other sites More sharing options...
excelsior Posted May 15, 2016 Author Share Posted May 15, 2016 okay thank you, i will check that i ve learned a lot it was very helpfull 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.