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 - Mr_Chaos

Pages: 1 2 [3] 4
31
It won't be very different. Instead of using a vertex controller to change the geometry you end up updating some vertex buffers (which is happens in the background too if you apply the vertex controller changes). The only difference is that you can render parts of such a buffer where in jPCT, you always render the whole thing and have to make sure that invisible parts are out of sight.

Ok, so it sounds like it will be the same speed impact anyway. Thx for the help as always

32
No. Individual objects have to be drawn individually. However, there is this approach to use a larger object and create those who would otherwise be individual objects out of the polygons of this larger object by using a vertex controller implementation, but that requires some hacks like moving unneeded polygons out of sight and such. IIRC, raft. did this for Sky Maze 3D.
Hmm, that might be an option. Would it be possible to batch the individual object, if you bypassed JPCT and did the OpenGL calls yourself or is it a limitation in OpenGL ?

33
Hi, I'm back  ;)

I have a project where I visualize a lot of objects in a static world, the world is made up of tracks (like a railroad, merges, diverter, etc) and I got that speed up a lot by merging all the static stuff into 1 big object3D.

My problem is my dynamic stuff, which can in some cases be up to 5000 object3D boxes (just 20 triangles), but the speed is very slow (<10 fps).

There is only 1 light and no other "fancy" stuff, is there any way to have JPCT batch some of the dynamic objects into 1 drawcall.

I hope it makes sense

34
Support / Re: MultiTouch android control sample code
« on: September 24, 2014, 10:07:02 pm »
Because I have used Mr_Chaos's code and it doesn't auto-adjust the fov and distance when the smartphone rotate from portrait to landscape ;)
But sadly I can't to edit the Mr_chaos's code because I can't see where he sets the camera distance ..
But I want to use his code  because is wonderfull ;) infact it handles the android multitouch , pinch-to-zoom and camera's rotation !

It's not easy for me to edit the code's of someonelse

edit : maybe I understand where I have to put the new code.. :D

The MovementHandler on handles movement, rotating the display you need to handle youself.

35
Support / Re: MultiTouch android control sample code
« on: September 10, 2014, 09:01:15 pm »
Updated with the actual camera movement code from the Activity

36
Support / Re: Camera.getPosition
« on: August 14, 2014, 05:28:48 pm »
getPosition() does give you the position in world space in both APIs and i'm not aware of any issues with it. I'm using it all the time and haven't had any problems. Maybe you can specify "doesn't work" a little more? Or can you create some test case where both APIs show different results?

I'll get you some more data, just wanted to know if it was a known problem.

An example

If I use camera.setPosition and then camera.getPosition the SimpleVectors are different, but i'll get some more data and return

37
Support / MultiTouch android control sample code
« on: August 14, 2014, 02:37:20 pm »
I've finally gotten the source code for a simple MotionEvent handler posted.

I'll try to make some code to show it off later.

http://www.jpct.net/wiki/index.php/MultiTouch_camera_controls

38
Support / Camera.getPosition
« on: August 14, 2014, 02:22:44 pm »
Is there an easy way to get the worldspace position of the camera in JPCT-AE ?

I would like to use it to see how far the camera is from an object, but getPosition doesn't give me the correct values. If I use the same code in JPCT is works as expected, but not in JPCT-AE.


39
Support / Re: Texture precision
« on: July 01, 2014, 11:19:08 am »
That's not a precision issue, it's caused by the bilinear texture filtering. If all you are using the texture for it to select a color, you might want to disable filtering on this texture (http://www.jpct.net/doc/com/threed/jpct/Texture.html#setGLFiltering(boolean)).
And maybe mip mapping as well (http://www.jpct.net/doc/com/threed/jpct/Texture.html#setMipmap(boolean))

As always, your the man Egon!

40
Support / Texture precision
« on: June 29, 2014, 06:08:08 pm »
A quick question about texture precision.

Is there a limit to how precise the u,v coordinates into a texture can be ?

I have 1 big (2048 x 2048) texture where every object maps into 4x4 pixels to get their current color (don't know if this the best way of doing it, but right now it kinda works) and if an object has to change size I dynamically change the texture and reupload it.
So far so good, but sometimes the object have some color from another object on the edges, so i was wondering if there is a limit to how precise the indexes can be ?

41
Support / Re: Help with a simple problem
« on: June 25, 2014, 09:45:27 pm »
Try using the TextureInfo class to add a Texture on top of the other. It should work (and you set a TextureInfo to an Object3D the same way you would set a Texture).

AGP you're the man!!!

42
Support / Help with a simple problem
« on: June 22, 2014, 08:52:43 pm »
First of all, thanks for all the support so far, and I'm sorry to ask for support again.

The program is a trains simulator.
First i had every part of the track being 1 Object3D, but the performance was not good (there are up to 6000 elements in the biggest model), so now everything is merged into 1 Object3D and it's working fine.
Every element of the track also has a status color, so I've made a big texture where every element has 4 x 4 pixel for colors and the plan is to change it when the status of an element changes (max once 1 second).
Now my problem is that I would like an arrow on every element showing the direction, but I allready have a texture, so I'm kinda lost.
My first suggestion was to merge both status and direction into 1 texture, but the problem is that for 6000 elements it would get very big and I would like to port it to Android at a later stage.

So it there any better way of doing this ?

43
Support / Re: What kind of performance can you expect ?
« on: June 21, 2014, 09:56:09 pm »
If you're not adding triangles in the game loop, it shouldn't slow down noticeably.

Even better, Merged everything into 1 element, so now I just rotate the object, piece of cake.

Thanks

44
Support / Re: Rotate the world around an axis instead of the camera ?
« on: June 21, 2014, 12:55:43 pm »
Add everything as child of a dummy Object3D which you can place anywhere (before adding the children). Then rotate the dummy object. Or did I misunderstand the problem?

I'll try it right away, but it sound like a plan.

45
Support / Rotate the world around an axis instead of the camera ?
« on: June 21, 2014, 12:18:10 pm »
When I do rotation it's the camera that rotates. I would like somehow to rotate the world around and axis instead of the camera

Pages: 1 2 [3] 4