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]
46
Support / Re: What kind of performance can you expect ?
« on: June 21, 2014, 12:16:37 pm »
Found the problem, and if was very simple.

To generate the elements I have 3 points, and calculate all intersections based on that, the algorithm didn't account for elements running along the y-axis which generated an Infinite slope and an invalid triangle.

Don't know if JPCT should add a check to Float.isInfinite when adding triangles (eventhough it will slow stuff down)

47
Support / Re: What kind of performance can you expect ?
« on: June 19, 2014, 08:00:28 pm »
Well, found the problem in my testCase, forgot to call world.addObject for the merged object.

So right now it works in my testcase, but not in my real code :/

I'll try to update my testcode

48
Support / Re: What kind of performance can you expect ?
« on: June 16, 2014, 06:23:49 pm »
I'll look at it when i'm back from holiday in 2 weeks.

Have a nice one

49
Support / Re: What kind of performance can you expect ?
« on: June 15, 2014, 08:15:37 pm »
It's big and ugly, but I pasted it here

http://pastie.org/9292745

50
Support / Re: What kind of performance can you expect ?
« on: June 13, 2014, 08:25:51 am »
Did you figure this one out?

Hi, sorry for the late reply, have been on a business trip, so haven't had time to check it.

But tested with the suggestions you had and still no dice. The funny thing is, if I have 1 merge object and I draw it by itself, it renders just fine, if I merge it into another Object3D it doesn't render.

I'll make a test case and submit

51
Support / Re: What kind of performance can you expect ?
« on: June 04, 2014, 01:22:55 pm »
For some reason that "merged" object cannot be displayed, my guess is that somehow the mesh is not drawable or something, but there are no errors from jpct, any ideas ?
There shouldn't be such a thing as a "not drawable mesh". Are these objects from the others in some way? Are you applying transformations to them before or after the merge?
They are part of the same railroadtrack, they are where the track splits and joins (The blue and green parts of the screenshot). All transformations and rotation is applied before the merge.

The strange thing is, that I can add 1-3 mergers with no problem, but add any more and it just doesn't show anything.

[attachment deleted by admin]

52
Support / Re: What kind of performance can you expect ?
« on: June 03, 2014, 11:47:40 am »
It highly depends on the scene what's best. If one or more of your objects are really huge compared to the visible area, you might also want to consider to use an octree (http://www.jpct.net/doc/com/threed/jpct/OcTree.html). If not for the rendering, it will come in handy when doing collision detection on the object.

Well I forgot to call CompileAndStrip and it gave a huge boost. From 60fps to 900-1000fps. I merged every type of element (straight, curve, etc) into 1 big object3D, so I have have 1 object3D pr. elementType, and that works fine, except for Mergers and Diverters.
For some reason that "merged" object cannot be displayed, my guess is that somehow the mesh is not drawable or something, but there are no errors from jpct, any ideas ?


53
Support / Re: What kind of performance can you expect ?
« on: May 31, 2014, 09:28:48 am »
Gaps are no problem. You just have to make sure that any translations or rotations that you apply to the individual objects are made permanent to the mesh before merging (have a look at rotateMesh and translateMesh for more information).

Tried merging into 10 big object, but performance dropped a lot. I suspect it's because the big objects consists of objects from all over the worldspace (I merged all straight objects into 1 big objects, all diverters into 1 big objects and so forth).
I was thinking about dividing the world into 64 pieces and then merging all objects inside into 1, so instead of 2000 objects, I would end up with 64.

Does it sound like something that could work ?, also is it possible to buy support ?

54
Support / Re: What kind of performance can you expect ?
« on: May 28, 2014, 07:08:00 pm »
Yes, you are using hardware. Otherwise, the strip operation would cause problems.
Anyway, 2000 objects is quite lot. Each object requires at least one draw call and these are expensive. Try to merge multiple objects into one if possible. In addition, you might want to give multi-threading a try: http://www.jpct.net/wiki/index.php/Multithreading

I'll look into merging some of the objects into bigger ones, but there are gaps between then, so do I need to insert transperant triangles or does the engine handle that case without problems ?

I allready have the following for multithreading
Code: [Select]
Config.useMultipleThreads = true;
    Config.glVSync = false;
    Config.maxNumberOfCores = 4;
    Config.maxPolysVisible = 25000;


55
Support / Re: What kind of performance can you expect ?
« on: May 28, 2014, 07:48:04 am »
And are you using the software renderer or the hardware one?

I hope I'm using the hardware one

Code: [Select]
    buffer = new FrameBuffer(800, 600, FrameBuffer.SAMPLINGMODE_HARDWARE_ONLY);
    buffer.disableRenderer(IRenderer.RENDERER_SOFTWARE);
    buffer.enableRenderer(IRenderer.RENDERER_OPENGL);

56
Support / Re: What kind of performance can you expect ?
« on: May 28, 2014, 07:45:50 am »
This highly depends on the scene, the size of the objects on screen, the overdraw, the rendering attributes and stuff. Are these 2000 objects all individual objects that are visible all the time?

It's 2000 individual objects and at the moment I place them by creating them with center at 0,0,0 and then rotating and translating them to their correct location, they have no texture at the moment and the coloring is done using setAdditionalColor.

99% of the objects are static, but I hope later to add some animation to the mergers/diverters and maybee some textures to some of the objects.

Bumped the performance by quite a bit, by using compileAndStrip on all objects.




[attachment deleted by admin]

57
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 2 3 [4]