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.


Messages - Uncle Ray

Pages: 1 2 [3] 4 5 6
31
Support / Re: help!Anyone know object's world coordinate in jbrush?
« on: December 26, 2014, 09:31:19 am »
ok,i think use jbrush is bad idea,i abandon  it.
i use jpct creat a new scene_editor,everything is ok.


32
Support / help!Anyone know object's world coordinate in jbrush?
« on: December 18, 2014, 03:51:59 am »
jbrush just translate,and it dont display the object's world coordinate.
just translate coordinate not world  coordinate.

can any one know how,i just want know the world  coordinate.

any helps will be appreciated.

33
Support / Re: Question,how to set two camera in jpct?
« on: October 22, 2014, 03:55:41 pm »
thanks to ego and thomas,the problem solved here is the code.
 cam1.cam01=world.getcamera;//
           //first rendering
           world.setCameraTo(cam2.cam01);   
       cam2.move(world, missile01,2);
       fb.setRenderTarget(mtexture);
       fb.clear(back);
       world.renderScene(fb);
       world.draw(fb);
       fb.display();
       fb.removeRenderTarget();
   
       //second rendering
       world.setCameraTo(cam1.cam01);   //without this,two views would be share the same camera.
       cam1.move(world,tes1,1);
       fb.clear(back); 
       world.renderScene(fb);
       world.draw(fb);
      
   fb.blit(mtexture, 0, 0,device_width*5/6, 8,256,   -256,device_width/6,device_height/5,100,false);//-256 must negative,otherwise the second camera would be reverse   
      
       fb.display();
      
       }

34
Support / Re: Question,how to set two camera in jpct?
« on: October 22, 2014, 11:29:04 am »
i think problem is how to switch camera?


35
Support / Re: Question,how to set two camera in jpct?
« on: October 22, 2014, 11:23:32 am »
I still failed,i have search all of this forum and google,all of them are not anything about how to set two camera in jpct.
Anyone helps one,thx.

36
Support / Re: Question,how to set two camera in jpct?
« on: October 22, 2014, 09:24:38 am »
i had made a mistake,they just the same camera....

37
Support / Re: Question,how to set two camera in jpct?
« on: October 22, 2014, 06:36:53 am »
How about the framerate in this case ?

maybe you came from china,we can talk in qq
(my qq:409544041)

38
Support / Re: Question,how to set two camera in jpct?
« on: October 22, 2014, 06:34:33 am »
a little drop,but not much.

39
Support / Re: Question,how to set two camera in jpct?
« on: October 21, 2014, 05:05:09 pm »


it's Wrong,they just the same camera....


 //on start_time
           public Texture mtexture=new Texture(256,256);
           public framebuffer fb=framebuffer(w,h);
           public World world=new World();

//on frame_time
           

           //first rendering
            cam.auto(world, cam, Objec3D1);
       fb.setRenderTarget(mtexture);
       fb.clear();
       world.renderScene(fb);
       world.draw(fb);
       fb.display();
       fb.removeRenderTarget();
      
       //second rendering
       cam.auto(world, cam, Object3D2);
       fb.clear(back);
       world.renderScene(fb);
       world.draw(fb);      
       fb.blit(mtexture, 0, 0, 700, 8,256, -256,device_width/2,device_height/4,100,false);
//-256 must be negative,otherwise the second camera would be revise    
       fb.display();   

40
Support / Re: Question,how to set two camera in jpct?
« on: October 21, 2014, 03:59:05 pm »
i really got it(maybe...)

0.texture is no need for some jpg,just" Texture mtexture=new Texture(256,256);"could usefull too.
1.framebuffer contains camera .
2,framebuffer's default render target is all of the scene(ie world)
3.uses setrendertarget could translate framebuffer into texture.
4 blit this texture in the screen.(the texture means second camera)
5,remove target(so the framebuffer back to first camera)

first render:(second camera)
world=>camera2=>framebuffer1=>texture=>framebuffer1.blit(texture)=>framebuffer.display

second render:(first camera)
world=>camera1=>framebuffer1=>framebuffer.display



Question still, why second camera reverse....??? :(

41
Support / Re: Question,how to set two camera in jpct?
« on: October 21, 2014, 03:31:45 pm »
got it,but.........



the second camera is reverse....
how to fix it?

42
Support / Re: Question,how to set two camera in jpct?
« on: October 21, 2014, 02:37:29 pm »
Thx,if there are some examples,that would be much helpful.

43
Support / Re: Question,how to set two camera in jpct?
« on: October 21, 2014, 12:33:01 pm »
And more,i can't understande which fb.render target(texture tex) used for?
it's just like blit()?
or other use?

in my thought:
1 set camera1 in the world1,and set world1 in the framebuffer1
2 set camera2 in the world2 ,and set world2 in the framebuffer2
3,set framebuffer1 area as  Full-screen(ie 1920*1080);
4 set framebuffer2 area as part_screen(ie 256*256);
5,render framebuffer1 and framebuffer2


Is that any wrong with my thought?

44
Support / Re: Question,how to set two camera in jpct?
« on: October 21, 2014, 11:11:36 am »
I create new world world2,and new Frambuffer fb2.

cam2(world2);
world2.renderScene(fb2);
world2.draw(fb2);


in the second framebuffer,the second camera  is ok,but the second framebuffer is location in the(0,0);

how to set the framebuffer's location?
jpct just have framebuffer(width,heght),where is framebuffer_set(x,y)?



45
Support / Re: Question,how to set two camera in jpct?
« on: October 20, 2014, 06:13:13 pm »
thx,a little complicated,but i will tried it,any progresses will reported soon.

Pages: 1 2 [3] 4 5 6