Elvas Tower: Performance Question(s) - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Performance Question(s) wrt designing models Rate Topic: -----

#1 User is online   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,363
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 27 April 2012 - 04:40 PM

I have a detailed model that follows about 60d of track curvature and I guess about 90% of the model is identical, all built in a series of identical groups that are copied and rotated along the curve. I have built the model to span 10d of the curve and would place 6 copies. The model has a lot of polys because of the copy/repeat needed to follow the curve.

I got to thinking about this and first question that came to mind is how can I improve the performance of this model? I could have made 2 models -- 1 with the unique portions and the other with 1 group of those copied polys, placing into the route 6 instances of the former and 60 of the later. Would that give better performance because it's 60 of the same thing... or worse -- because it's 60 things each of which have to be rendered on their own? FWIW, the same question applies to track and roads -- would OR get better or worse performance if every 5d, 10d, and 20d curve was replaced by an equivalent length of identical 1d shapes?

For what I know (which isn't much), I think the answer is performance would be worse in the above examples with 1d shapes because each one must be rendered. Is that correct? If so, << sound of the second shoe dropping >> why do multiple instances of the same shape require individual processing? Or have I misunderstood something about rendering multiple instances of the same shape (e.g., 1st instance takes work, 2nd to end are quick)?

Last, should I break up that 10d shape I've built and place a bunch of 1d shapes as I described?

#2 User is online   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,492
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 28 April 2012 - 02:15 AM

More instances of the object can (and currently do) need more processing than a typical single consolidated model. More things to check if they're in view, and more individual subobject primitives to send to the GPU. DirectX 10 and later have proper instanting systems, which would be a future solution (load tree model once, tell it all the locations and rotations - done).

I have considered doing some automatic consolidation when loading each model and/or tile, but it isn't simple and you get some bounding box fun.

#3 User is online   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,363
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 28 April 2012 - 08:40 AM

That's what I was afraid of... build a model one way for Direct X 9 and a completely different (and better) way for Direct X 10 and above. It's always what the future holds, isn't it?

#4 User is offline   captain_bazza 

  • Chairman, Board of Directors
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 13,928
  • Joined: 21-February 06
  • Gender:Male
  • Location:Way, way, way, South
  • Simulator:MSTS & OR
  • Country:

Posted 28 April 2012 - 07:57 PM

Yes Dave, it was always going to happen eventually....the divergence from MSTS protocols, leading to OR being stand-alone.

Cheers Bazza

#5 User is online   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,363
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 29 April 2012 - 05:21 PM

View Postcaptain_bazza, on 28 April 2012 - 07:57 PM, said:

Yes Dave, it was always going to happen eventually....the divergence from MSTS protocols, leading to OR being stand-alone.

Cheers Bazza


Actually Wayne says there is a way to solve the issue, rather clever actually, that if done could provide a considerable performance boost when dealing with such situations. And as the guy on TV always says, "Tune into our evening broadcast for more.".

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users