loading obj model

Started by ashunkhs, May 16, 2013, 08:03:48 AM

Previous topic - Next topic

ashunkhs

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]

EgonOlsen

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


obj.setTransparency(-1);

ashunkhs

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

EgonOlsen

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.