Author Topic: help me,,,, mapping to Alpha map with Object 3d  (Read 3251 times)

Offline wisepocket

  • byte
  • *
  • Posts: 2
    • View Profile
help me,,,, mapping to Alpha map with Object 3d
« on: March 14, 2012, 08:50:57 pm »

               
Why did the black shows?                                                                                                                      3ds Max



               
ff1.png                                                                                                                                                ff2.png                                                                                 

here is my source code and Map Images;



                                tm.addTexture("ff1", ff1);
            tm.addTexture("ff2", ff2);
            
            InputStream is=getResources().openRawResource(0x7f040006);
            ff=Loader.load3DS(is, 100);

            ff[0].setTexture("ff2");
            ff[0].setTexture("ff1");

                               
                                world.addObjects(ff);
            
            ff[0].strip();
            ff[0].build();
            [/size][size=78%]ff[0].setScale(5);[/size]





Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: help me,,,, mapping to Alpha map with Object 3d
« Reply #1 on: March 15, 2012, 12:20:33 am »
You have use the Texture-constructor that takes alpha into account (the one with the useAlpha-boolean) and you have to enable transparency by calling setTransparency(...). In this case, you should use a rather high value for the transparency.

Offline wisepocket

  • byte
  • *
  • Posts: 2
    • View Profile
Re: help me,,,, mapping to Alpha map with Object 3d
« Reply #2 on: March 16, 2012, 10:59:14 am »

 EgonOlsen , Thank you for your prompt reply

I solved the problem. these are my source codes

----------------------------------------------------------------
ff[0].setTexture("ff2");

ff[0].setTransparency(60);  // using alphamap

---------------------------------------------------------

Objects become transparent, so they has to add the highlights map.








« Last Edit: March 16, 2012, 08:25:25 pm by wisepocket »