Author Topic: What kind of performance can you expect ?  (Read 9423 times)

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: What kind of performance can you expect ?
« Reply #15 on: June 05, 2014, 04:53:58 am »
Try calling Object3D.setCulling(false) (or else invertCulling()) in the invisible objects just to see if the normals weren't exported or imported wrong.

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: What kind of performance can you expect ?
« Reply #16 on: June 12, 2014, 06:01:01 am »
Did you figure this one out?

Offline Mr_Chaos

  • int
  • **
  • Posts: 57
    • View Profile
Re: What kind of performance can you expect ?
« Reply #17 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

Offline Mr_Chaos

  • int
  • **
  • Posts: 57
    • View Profile
Re: What kind of performance can you expect ?
« Reply #18 on: June 15, 2014, 08:15:37 pm »
It's big and ugly, but I pasted it here

http://pastie.org/9292745

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: What kind of performance can you expect ?
« Reply #19 on: June 16, 2014, 05:31:26 pm »
I'll look at it when i'm back from holiday in 2 weeks.

Offline Mr_Chaos

  • int
  • **
  • Posts: 57
    • View Profile
Re: What kind of performance can you expect ?
« Reply #20 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

Offline Mr_Chaos

  • int
  • **
  • Posts: 57
    • View Profile
Re: What kind of performance can you expect ?
« Reply #21 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

Offline Mr_Chaos

  • int
  • **
  • Posts: 57
    • View Profile
Re: What kind of performance can you expect ?
« Reply #22 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)

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: What kind of performance can you expect ?
« Reply #23 on: June 21, 2014, 12:51:56 pm »
If you're not adding triangles in the game loop, it shouldn't slow down noticeably.

Offline Mr_Chaos

  • int
  • **
  • Posts: 57
    • View Profile
Re: What kind of performance can you expect ?
« Reply #24 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