Author Topic: Tutorial:how to start Jbrush_AE  (Read 1786 times)

Offline Uncle Ray

  • int
  • **
  • Posts: 81
    • View Profile
Tutorial:how to start Jbrush_AE
« on: 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



           
         

Offline Uncle Ray

  • int
  • **
  • Posts: 81
    • View Profile
Re: Tutorial:how to start Jbrush_AE
« Reply #1 on: 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.