syed samoon Posted February 12, 2018 Share Posted February 12, 2018 Hi Everyone, I was stuck in modelling. when i use 3d model of unity and then i was converted it to babylon file using 3ds max. but sometimes in rendering the model will be look like image below. Anyone know why it is happening to me Quote Link to comment Share on other sites More sharing options...
Guest Posted February 12, 2018 Share Posted February 12, 2018 Is it a single model? If so you are facing a face ordering issue but no problem, we've got you covered. Just call mesh.material.alphaMode = BABYLON. Engine.ALPHA_PREMULTIPLIED Also, based on how looks your mesh, I suggest not using opacity texture (which force full transparency) but instead diffuseTexture with alpha Good reading about alpha and transparency: http://doc.babylonjs.com/resources/transparency_and_how_meshes_are_rendered Quote Link to comment Share on other sites More sharing options...
syed samoon Posted February 13, 2018 Author Share Posted February 13, 2018 Thanks but it is not fixed yet there are images given below. there is no changes in script it is a single mesh but sometime the lamps bottom will be viewable and sometimes it will be non viewable(in correct manner). there is no changes in lamp's X & Y position both are in same place Quote Link to comment Share on other sites More sharing options...
syed samoon Posted February 13, 2018 Author Share Posted February 13, 2018 the floor is transparent in sometimes can you know what is the reason for this? why it is happening?? Quote Link to comment Share on other sites More sharing options...
syed samoon Posted February 13, 2018 Author Share Posted February 13, 2018 15 hours ago, Deltakosh said: Is it a single model? yes @Deltakosh it is a single model. https://assetstore.unity.com/packages/3d/environments/sci-fi/sky-city-lite-65679 the above link is unity pack of this model i was download and duplicate the platform and merge (Using 3DS MAX) them to get big platform like this. And the i was exported as .babylon file Quote Link to comment Share on other sites More sharing options...
Guest Posted February 13, 2018 Share Posted February 13, 2018 You should try to not apply transparency on meshes which are not transparent. Try to decouple them in 3dsmax Quote Link to comment Share on other sites More sharing options...
syed samoon Posted February 14, 2018 Author Share Posted February 14, 2018 Is there anything wrong in lightning and camera my script is given below this.base.camera = new BABYLON.FreeCamera("camera", new BABYLON.Vector3(0, 0, -30), this.base.scene); this.base.camera.maxZ = 1700; this.base.camera.attachControl(this.base.canvas); this.base.camera.speed = 2.0; this.base.camera.setTarget(new BABYLON.Vector3(0, -2, 0)); // Hemispheric light to light the this.base.scene hemi = new BABYLON.HemisphericLight("hemi", new BABYLON.Vector3(0, 1, 0), this.base.scene); hemi.intensity = 0.5; var directionLight = new BABYLON.DirectionalLight("DirectionalLight", new BABYLON.Vector3(0, -10, 400), this.base.scene); directionLight.diffuse = new BABYLON.Color3(0.8, 0.7, 0.6); directionLight.specular = new BABYLON.Color3(0.9, 0.8, 0.4); directionLight.radius = 1; directionLight.intensity = 0.5; Quote Link to comment Share on other sites More sharing options...
syed samoon Posted February 14, 2018 Author Share Posted February 14, 2018 16 hours ago, Deltakosh said: You should try to not apply transparency on meshes i didn't use any transparency maps on meshes i used 3ds max and applied only diffuse map Quote Link to comment Share on other sites More sharing options...
MarianG Posted February 14, 2018 Share Posted February 14, 2018 try to turn of the backfaceculling, something like mesh.material.backFaceCulling = false; //or mesh.material.subMaterials[0].backFaceCulling = false; Quote Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2018 Share Posted February 14, 2018 There must be opacity support enabled somewhere...can you share your scene somewhere on a website so we can see it live Quote Link to comment Share on other sites More sharing options...
syed samoon Posted February 15, 2018 Author Share Posted February 15, 2018 11 hours ago, Deltakosh said: .can you share your scene sure. link is given below. http://samoonaski.000webhostapp.com/?dir=babylon scene/ Quote Link to comment Share on other sites More sharing options...
syed samoon Posted February 15, 2018 Author Share Posted February 15, 2018 12 hours ago, MarianG said: try to turn of the backfaceculling, something like mesh.material.backFaceCulling = false; //or mesh.material.subMaterials[0].backFaceCulling = false; there is no use. still i'm facing the same issue Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted February 15, 2018 Share Posted February 15, 2018 If I well understand, you have imported FBX files from Unity package to 3DSMax, then export this scene to BJS. In 3DSMax, have you cleaned your meshes before? I talk about xform, transform & scale reset, pivot, etc (I have a maxscript to automate this if you want). Quote Link to comment Share on other sites More sharing options...
syed samoon Posted February 15, 2018 Author Share Posted February 15, 2018 31 minutes ago, V!nc3r said: If I well understand, you have imported FBX files from Unity package to 3DSMax, then export this scene to BJS. exactly Quote Link to comment Share on other sites More sharing options...
syed samoon Posted February 19, 2018 Author Share Posted February 19, 2018 On 2/15/2018 at 3:41 PM, V!nc3r said: In 3DSMax, have you cleaned your meshes before? I talk about xform, transform & scale reset, pivot, etc (I have a maxscript to automate this if you want). i will try this but no use anyway thank you Quote Link to comment Share on other sites More sharing options...
syed samoon Posted February 19, 2018 Author Share Posted February 19, 2018 if there is any possibilities to fix this Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted February 19, 2018 Share Posted February 19, 2018 33 minutes ago, syed samoon said: i will try this but no use I don't understand, have you tried it and it doesn't do anything, or will you try it and haven't use it yet ? (and do you talking about my script?) If you don't want use the maxscript, you just have to do that: Quote Link to comment Share on other sites More sharing options...
syed samoon Posted February 19, 2018 Author Share Posted February 19, 2018 i was done this same Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted February 19, 2018 Share Posted February 19, 2018 Can you share both max files and BJS scene? It looks like there nothing available in http://samoonaski.000webhostapp.com/?dir=babylon scene/ Quote Link to comment Share on other sites More sharing options...
syed samoon Posted February 19, 2018 Author Share Posted February 19, 2018 1 minute ago, V!nc3r said: It looks like there nothing available in i was removed that... i will upload it Quote Link to comment Share on other sites More sharing options...
syed samoon Posted February 19, 2018 Author Share Posted February 19, 2018 http://samoonaski.000webhostapp.com/?dir=BJS/ Quote Link to comment Share on other sites More sharing options...
syed samoon Posted February 19, 2018 Author Share Posted February 19, 2018 link was updated Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted February 19, 2018 Share Posted February 19, 2018 I've asked if it was possible to get the 3dsmax file, plus an online demo (not just the .babylon file). Quote Link to comment Share on other sites More sharing options...
syed samoon Posted February 19, 2018 Author Share Posted February 19, 2018 http://samoonaski.000webhostapp.com/?dir=BJS/ updated Quote Link to comment Share on other sites More sharing options...
syed samoon Posted February 26, 2018 Author Share Posted February 26, 2018 Hi Everyone, This issues was fixed. thanks to all Reason is when i instanciate/copy mesh using 3ds max. it will happen when i clone the mesh using script it will happen but i don't why anyway once again thanks to all 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.