www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: wisepocket on March 14, 2012, 08:50:57 pm

Title: help me,,,, mapping to Alpha map with Object 3d
Post by: wisepocket on March 14, 2012, 08:50:57 pm

(http://cfile228.uf.daum.net/image/115B724A4F60F3F65C5124)               (http://cfile215.uf.daum.net/image/1418084A4F60F3F701B375)
Why did the black shows?                                                                                                                      3ds Max



(http://cfile233.uf.daum.net/image/16153A4A4F60F3F8034081)                (http://cfile202.uf.daum.net/image/135D564A4F60F3F936241F)
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]




Title: Re: help me,,,, mapping to Alpha map with Object 3d
Post by: EgonOlsen 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.
Title: Re: help me,,,, mapping to Alpha map with Object 3d
Post by: wisepocket 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.