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.

Topics - Mr_Chaos

Pages: [1]
Support / Changing world and all objects
« on: November 08, 2017, 08:03:17 am »

I have an android app using JPCT-AE where the user can select different worlds, when a world is selected I want to show a progressdialog while the data is loading (data is loading asynchroniously using background tasks).
My problem is that sometimes when I change "world" I get exception, that I can see are because jpct-ae is not multi threaded, but how do I fix this.
I have a volatile variable in my renderer, that only allows rendering once the data is loaded, but for some reason i still get crashed in JPCT.
Do I have to pause the GLSurfaceView while loading or ? any ideas on how to do this

Bugs / AWTCanvas not updating when SwingThread is under heavy load.
« on: August 07, 2017, 08:18:56 pm »
I have a strange problem, normally my program runs fine, but when the EDT thread in under heavy load the AWTCanvas freezes.

The SwingUI is updated, but the AWTCanvas is not.

Has anyone seen anything like this before ?

Code: [Select]

Support / Limit of moving object3D
« on: February 13, 2015, 12:43:05 pm »
I was wondering if there is a limit to how many Object3D you can have, I'm looking into a requirement that might mean we have to have 50000 objects on screen at the same time, running at 30fps.

Support / Required OpenGL version
« on: February 12, 2015, 01:48:02 pm »
Someone want to run a program using OpenGL om a WMWare view client.

So they want to know which version of OpenGL is required to run JPCT ?

Support / Replacing a texture leads to (Native memory leak)
« on: February 07, 2015, 07:51:06 pm »
So I have a texture that is sometimes replaced, but it seems to leak Native memory (Non heap).

I do the following

1) unload texture
2) New texture
3) Replace texture
4) Buffer.display

Is this wrong ?

Support / Object3D.translate precision
« on: January 19, 2015, 09:18:46 pm »
I have a very strange problem.

I move some objects using based, but when the speed gets low, my calculations seem to go wrong.

I run my program at 16ms pr. tick

I have an object moving at 0.5 pr second, with a vector of (-0.65774244,0.0,0.7532429)

Code: [Select]
    _translation.scalarMul((_currentSpeed * time) / 1000f);

But the tote doesn't follow the line at all, so I'm wondering if I'm hitting the edge of what a float and thereby Object3D.translate can support ?

If it runs at

Support / LWJGL 3.0 ?
« on: November 15, 2014, 10:23:00 pm »
It seems LWJGL 3.0 has finally been released, are you (Egon the man with the plan) planning on updating JPCT ?

I have some objects that I want to have a description on top of, my current solution is.

Make 32 transparent planes which are not visible from the start
For each plane make a texture (1024x128) for the text

  • On each drawcall, check each objects distance to the camera
  • If the distance is less than X
    • Get a plane and translate it to the correct location
    • Create a new texture with the correct String
    • Update the texture in the texture manager

My question is if this is the best way of doing it ?

My other suggestion would be to have 1 big texture instead of 32 small ones.

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

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.

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.

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 ?

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 ?

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

Support / What kind of performance can you expect ?
« on: May 27, 2014, 01:43:54 pm »
I'm making a small project that uses JPCT to create a 3D view of a train track with straight, curves, merges, diverter, etc.

I have a model with 2000 objects consisting of a total of 43000 triangles all elements are static, so I use CompileAndStrip on all of them, but I'm still only seeing 40 fps when running fullscreen at 800x600 on a laptop with a Nvidia Quadro 2000M with 2Gigabyte memory.

Can someone give a hint if this is the expected kind of performance, or if I can tweak some settings ?

Pages: [1]