Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Uncle Ray

#76
Support / Re: Tutorial:how to start Jbrush_AE
July 31, 2014, 10:31:09 PM
it took my much time to start,i want the jpct to be more popular,and the jbrush is the satisfy tool with jpct,this is the reason why i posed this Tutorial.
#77
Support / Tutorial:how to start Jbrush_AE
July 31, 2014, 10:25:07 PM
this topic only talk about android jbrush_AE.

First:1.
         open the jbrush.jar.load A.md2 or A.3ds or A.obj
        2.
        mouse left_click which object you want.
        objects-set object texture(this is the most important);
        objects-set object properties(many,like,light,coliide,.....)
        3,
         do anything you want....
        4.
        file——save scene(the scene file is .txt),in this case,i called it B.txt.
        5.
        copy eveything about your model with scene(xxx.jpg,xxx.png,xxx.3ds,xxx.md2,xxx.obj)to        /assets/       
        6
         the systerm default modle is floor.3ds,please remove it
        in jbursh. if you dont remove it,in the jbrush .the jbrush will never work......
        this is the most useful,please remember it.



Second: open your eclipse(i use "HelloShader" for my example)           
            1:
              mouse-right-click the HelloShader,
              properties-java buid path-Libraly-Add exteral jar-jbush_ae_lib.jar
           2:
               package com.threed.jpct.shader;//this the helloshader default,you dont have to code it.
               import java.util.Vector;//you have to code it
               import com.jbrush.ae.*;//you have to code it
               import android.content.res.AssetManager;//only jbrush ae must code it.
          3:
             public class HelloShader extends Activity implements OnScaleGestureListener
             {
               private Vector<EditorObject> objects;
          private Vector<LightData> lights;
          private Object3D object_jpct;// this method will translate from jbrush's objcet to jpct's Object3D.
              }
          4.public void onSurfaceChanged(GL10 gl, int width, int height) //this is default dont need code.....
        {
     Resources res = getResources();
          world.addObject(plane);  //this is default,dont code it,but folloed the jbrush code must set under  the  world.addObject();
          AssetManager assetManager=getAssets();//just for jbrush_ae
      objects=Scene.loadSerializedLevel("B.txt",  objects,world, assetManager);//it is used for eclipse load the resource of /assets/
           object_jpct=Scene.findObject("id", objects);//translate the id(which in jbrush objects-set object properties you can get and edit            it)to Object 3d.             
           }





Last:that is all,but there still have some important information must be told         
             1.world.addObject(object_jpct);// it is wrong,becasuse the codes before have realize the  display of object_jpct already.             
             2.the texture's size 512*512,1024*1024,256*256,etc....
             3,in eclipse if you update or edit your resource of  /assets/  ,please refresh or clean and then run.




                                                                                           THANK YOU VERY MUCH-----------------------------by 409544041



           
         
#78
THX,much appricated,My question have solved. :)


#79
it is my fault,i made a mistake,pi=180 actually,but i  thought it is 360,before..
the question is,i want cal the angle of two SimpleVector.which is 270.
but use calAngle,it is only,90.
how can i cal?whose angle more than 180?
#80
btw ,except of this,the jpct is the perfect one ;D
#81
i know the most important feature of simplevector is that,every simplevector have a direction.
for example ,if i want cal the angle of a:(0,0,-1),b(0,0,1).
if use a.calcAngle(b),
the result is 0.
in fact the result is wrong,in the reality,the result is pi/2.

may be i can use other math method,but it is not convenient.

Any suggest?i just want cal the more correcter angle of simplevector,which has a direction.