Re: [osg-users] Advice sought for rendering coins in OSG. Lots ofcoins.

2009-06-22 Thread Kim C Bale
Hi Christian,


Looks great! The behaviour of the coins is spot on. 

It's crying out for some shiny shaders though..


Kim.

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
Christian Buchner
Sent: 21 June 2009 23:53
To: OpenSceneGraph Users
Subject: Re: [osg-users] Advice sought for rendering coins in OSG. Lots
ofcoins.

 To profile the peformance bottleneck it would be best to press 's' a
 couple more times to get the full frame rate stats so you can see
 exactly which parts of rendering are the bottleneck - the frame rate
 only tells that you frame rate is reducing it doesn't give any clues
 to why.

I am pretty sure I am limited by the physics. Right now I have to
reduce the physics time step dynamically to stay within my tolerated
frame rate window. A final video (I promise!) is posted here and it
shows an almost complete pusher machine and up to 400 coins in the
game.

http://www.youtube.com/watch?v=0bLAq7btZbUfmt=22

I have since made the pusher operate faster so the player won't fall
asleep. I still have to add the game mechanics (player's coin balance,
player controlled coin insertion etc).

My coins are currently rendered several OSG
PositionAttitudeTransforms, all from the same model instance. I may
switch to an approach that uses vertex shaders soon.

A future enhancement could put the physics on a separate thread from
OSG. We will see how that goes.

Christian
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g*
To view the terms under which this email is distributed, please go to 
http://www.hull.ac.uk/legal/email_disclaimer.html
*___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Advice sought for rendering coins in OSG. Lots ofcoins.

2009-05-22 Thread Paul Martz
Think of BRDFs as Imposters on steroids. The idea is to have views of an
object from several different angles, and let the hardware choose which one
(or ones) to use to represent the object based on the current view
direction. The visual representation is on par with Imposters, so it is
quite 3D.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Advice sought for rendering coins in OSG. Lots ofcoins.

2009-05-22 Thread Paul Martz
 - things get slow with more than 70 coins on this (slightly outdated)
 machine. The bottleneck is definitely physics, not rendering. May have to
experiment 
 with CUDA acceleration to achieve 500 coins and more.

I suspect your bottleneck if with solving. Currently, the Cuda solver is not
yet open source. The (already available) Cuda dispatcher probably won't help
your performance.

 - The coins slide apart when stacked on top, as if the whole setup
 was on a vibrating ground plate. I need to get in touch with the guys on
the 
 bullet physics forums to see if this can be solved.

By default, Bullet should perform multiple samples (10, I think, per sim
step) in the solver to compensate for this. Is your app explicitly setting
this down to fewer samples for performance reasons?
   -Paul

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Advice sought for rendering coins in OSG. Lots ofcoins.

2009-05-22 Thread Christian Buchner
Hi Paul,

 Is your app explicitly setting this down to fewer samples for performance 
 reasons?

Assuming dt, is the time between 2 frames, I call

stepSimulation(dt, 20, 0.005);  // 200 ticks per second, minimum 10 FPS assumed

I will be taking the physics related discussion to the proper forums,
because I think it is off-topic for osg-users. I describe some of my
settings and assumptions in the post linked below.

http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9t=3623start=0

Thanks for your interest,

Christian
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org