help me,,,, mapping to Alpha map with Object 3d

Started by wisepocket, March 14, 2012, 08:50:57 PM

Previous topic - Next topic

wisepocket


               
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]





EgonOlsen

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.

wisepocket

#2

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.