What kind of performance can you expect ?

Started by Mr_Chaos, May 27, 2014, 01:43:54 PM

Previous topic - Next topic

AGP

Try calling Object3D.setCulling(false) (or else invertCulling()) in the invisible objects just to see if the normals weren't exported or imported wrong.

AGP


Mr_Chaos

Quote from: AGP on June 12, 2014, 06:01:01 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


EgonOlsen

I'll look at it when i'm back from holiday in 2 weeks.

Mr_Chaos


Mr_Chaos

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

Mr_Chaos

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)

AGP

If you're not adding triangles in the game loop, it shouldn't slow down noticeably.

Mr_Chaos

Quote from: AGP on June 21, 2014, 12:51:56 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