Recommended Posts

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

flip.JPG

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 

crct.JPG

wrng.JPG

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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;

 

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites
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:

X00BZF4.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.