www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: ashunkhs on May 16, 2013, 08:03:48 am

Title: loading obj model
Post by: ashunkhs on May 16, 2013, 08:03:48 am
hi

  i am trying to load object (car.obj)model on surface . its loading but the model become transparent. please check out
  my attached image. we need to set any property ?

[attachment deleted by admin]
Title: Re: loading obj model
Post by: EgonOlsen on May 16, 2013, 08:27:43 am
If the file's data says that the model is transparent, the loader enables transparency. Some exporters seem to set this value wrong, so that actual opaque models will be loaded as transparent ones. Just do

Code: [Select]
obj.setTransparency(-1);
Title: Re: loading obj model
Post by: ashunkhs on May 16, 2013, 09:20:16 am
Hi sir ,

  I did it but no effect .


      car = loadModel();
      car.strip();
      car.build();
      car.rotateX(180);
      car.rotateY(180);
      car.rotateZ(0);
      car.setTexture("texture");
      car.setTransparency(-1);
      car.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
      
there is any more things ...
Title: Re: loading obj model
Post by: EgonOlsen on May 16, 2013, 09:53:23 am
Check your code. If you disable transparency, then there won't be any. If there still is, you haven't disabled it correctly or enabled it afterwards.