Physics shapes of LOD objects

Physics shapes of LOD objects

Postby Wolfs » 12 Jul 2012, 10:32

I was just wondering which shapes of LOD objects are used in the physics. It seems to me that the models with the highest resolution are choosen.
unnamed-track-physics.png

As you can see, the track uses lots of lanterns, and the lanterns in turn are using LOD. I think it would be helpful for the performance of the track if the shapes of the lanterns in the physics would be the ones of LOD models with lower resolutions, for example one with about 15 faces. Is it somehow possible to do this? The track in the picture is using relatively few faces and has nevertheless a rather bad frame rate, and I don't really want to reduce the number of faces used in the lantern model with the highest resolution since the player can get very near to them :).
User avatar
Wolfs
 
Posts: 119
Joined: 26 Aug 2011, 09:56

Re: Physics shapes of LOD objects

Postby betharatux1 » 12 Jul 2012, 12:06

wow ... :o which way kart will be race on picture, right or left ? :think:
"Just jumping and somersault on spring bed at mall, then great ideas come" Image
User avatar
betharatux1
 
Posts: 179
Joined: 14 Feb 2012, 17:25
Location: indonesia

Re: Physics shapes of LOD objects

Postby betharatux1 » 12 Jul 2012, 12:14

LOD ? what its that + mean + use for ? :|
i don't know for sure mean your posted but if that track has no problem when did exported and tested... :think:
it seems okay ... ;)
"Just jumping and somersault on spring bed at mall, then great ideas come" Image
User avatar
betharatux1
 
Posts: 179
Joined: 14 Feb 2012, 17:25
Location: indonesia

Re: Physics shapes of LOD objects

Postby Arthur » 12 Jul 2012, 12:47

Hey pal, I took an oath for justice! "In happy days or tightest tights..." or something like that.
User avatar
Arthur
 
Posts: 1073
Joined: 06 Dec 2009, 00:49

Re: Physics shapes of LOD objects

Postby Wolfs » 12 Jul 2012, 12:55

betharatux1 {l Wrote}:wow ... :o which way kart will be race on picture, right or left ? :think:

The karts will be driving on the right way.

betharatux1 {l Wrote}:LOD ? what its that + mean + use for ? :|
i don't know for sure mean your posted but if that track has no problem when did exported and tested... :think:
it seems okay ... ;)

"LOD" is short for "Level of detail", see this page (http://supertuxkart.sourceforge.net/Track_Maker%27s_Guide_2#Level_of_Detail).
The problem is that the lanterns have by far more faces for the physics (collision behaviour is separated from the graphics) than necessary. You can see the physics triangles in the picture: They are marked with green edges, the normals of those faces are painted in yellow.
In short I am asking whether it is possible to use a different collision shape for the lanterns in the same way you can see on the wilber kart: Wilber consists of lots of triangles, but his collision shape (painted in red) just uses a few faces. Reducing the faces the physics have to work on will hopefully make my level faster. The player, on the other hand, will notice no difference if he crashes into a cube or into a very detailed cylinder, because the lanterns are quite slim.
User avatar
Wolfs
 
Posts: 119
Joined: 26 Aug 2011, 09:56

Re: Physics shapes of LOD objects

Postby hiker » 13 Jul 2012, 00:30

Wolfs {l Wrote}:As you can see, the track uses lots of lanterns, and the lanterns in turn are using LOD. I think it would be helpful for the performance of the track if the shapes of the lanterns in the physics would be the ones of LOD models with lower resolutions, for example one with about 15 faces. Is it somehow possible to do this? The track in the picture is using relatively few faces and has nevertheless a rather bad frame rate, and I don't really want to reduce the number of faces used in the lantern model with the highest resolution since the player can get very near to them :).

I think it's unlikely that the bad frame rate is caused by the physics, in (afaik) any case we have seen this is caused by the graphics only, either because of the track or (too many) karts. It could even just be the graphics of the lantern. Note that the mesh for each lantern will be transferred separately to the graphics card, it's not that the mesh is only sent once with various locations or so.

You can easily confirm this by setting the lanterns to be ignored by the physics.

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Physics shapes of LOD objects

Postby Auria » 14 Jul 2012, 00:18

Hi,

I can confirm that the highest level is used. But as Joerg said, physics is usually not a bottleneck. The reason is that rendering is much more costly : when rendering, you need to render everything visible. When doing physics, the game only needs to check against nearby stuff. So physics are generally much much faster than rendering
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: Physics shapes of LOD objects

Postby Wolfs » 14 Jul 2012, 11:27

Auria {l Wrote}:I can confirm that the highest level is used. But as Joerg said, physics is usually not a bottleneck. The reason is that rendering is much more costly : when rendering, you need to render everything visible. When doing physics, the game only needs to check against nearby stuff. So physics are generally much much faster than rendering

Alright, in that case I guess that I cannot improve the framerate further. Thanks for your help :).
User avatar
Wolfs
 
Posts: 119
Joined: 26 Aug 2011, 09:56

Who is online

Users browsing this forum: No registered users and 1 guest

cron