gdalgorithms-list Mailing List for Game Dev Algorithms (Page 15)
Brought to you by:
vexxed72
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(390) |
Aug
(767) |
Sep
(940) |
Oct
(964) |
Nov
(819) |
Dec
(762) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(680) |
Feb
(1075) |
Mar
(954) |
Apr
(595) |
May
(725) |
Jun
(868) |
Jul
(678) |
Aug
(785) |
Sep
(410) |
Oct
(395) |
Nov
(374) |
Dec
(419) |
2002 |
Jan
(699) |
Feb
(501) |
Mar
(311) |
Apr
(334) |
May
(501) |
Jun
(507) |
Jul
(441) |
Aug
(395) |
Sep
(540) |
Oct
(416) |
Nov
(369) |
Dec
(373) |
2003 |
Jan
(514) |
Feb
(488) |
Mar
(396) |
Apr
(624) |
May
(590) |
Jun
(562) |
Jul
(546) |
Aug
(463) |
Sep
(389) |
Oct
(399) |
Nov
(333) |
Dec
(449) |
2004 |
Jan
(317) |
Feb
(395) |
Mar
(136) |
Apr
(338) |
May
(488) |
Jun
(306) |
Jul
(266) |
Aug
(424) |
Sep
(502) |
Oct
(170) |
Nov
(170) |
Dec
(134) |
2005 |
Jan
(249) |
Feb
(109) |
Mar
(119) |
Apr
(282) |
May
(82) |
Jun
(113) |
Jul
(56) |
Aug
(160) |
Sep
(89) |
Oct
(98) |
Nov
(237) |
Dec
(297) |
2006 |
Jan
(151) |
Feb
(250) |
Mar
(222) |
Apr
(147) |
May
(266) |
Jun
(313) |
Jul
(367) |
Aug
(135) |
Sep
(108) |
Oct
(110) |
Nov
(220) |
Dec
(47) |
2007 |
Jan
(133) |
Feb
(144) |
Mar
(247) |
Apr
(191) |
May
(191) |
Jun
(171) |
Jul
(160) |
Aug
(51) |
Sep
(125) |
Oct
(115) |
Nov
(78) |
Dec
(67) |
2008 |
Jan
(165) |
Feb
(37) |
Mar
(130) |
Apr
(111) |
May
(91) |
Jun
(142) |
Jul
(54) |
Aug
(104) |
Sep
(89) |
Oct
(87) |
Nov
(44) |
Dec
(54) |
2009 |
Jan
(283) |
Feb
(113) |
Mar
(154) |
Apr
(395) |
May
(62) |
Jun
(48) |
Jul
(52) |
Aug
(54) |
Sep
(131) |
Oct
(29) |
Nov
(32) |
Dec
(37) |
2010 |
Jan
(34) |
Feb
(36) |
Mar
(40) |
Apr
(23) |
May
(38) |
Jun
(34) |
Jul
(36) |
Aug
(27) |
Sep
(9) |
Oct
(18) |
Nov
(25) |
Dec
|
2011 |
Jan
(1) |
Feb
(14) |
Mar
(1) |
Apr
(5) |
May
(1) |
Jun
|
Jul
|
Aug
(37) |
Sep
(6) |
Oct
(2) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
(7) |
Mar
|
Apr
(4) |
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(10) |
2013 |
Jan
|
Feb
(1) |
Mar
(7) |
Apr
(2) |
May
|
Jun
|
Jul
(9) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(14) |
Feb
|
Mar
(2) |
Apr
|
May
(10) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(12) |
Nov
|
Dec
(1) |
2016 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
From: Jon W. <jw...@gm...> - 2010-03-28 16:05:40
|
There are open source Wiimote input libraries you could probably take a look at. AFAICT, those generally use very simple, first-order filter type approaches. Sincerely, jw -- Americans might object: there is no way we would sacrifice our living standards for the benefit of people in the rest of the world. Nevertheless, whether we get there willingly or not, we shall soon have lower consumption rates, because our present rates are unsustainable. On Sun, Mar 28, 2010 at 8:32 AM, John McCutchan <jo...@jo...>wrote: > Hi, > > Each quaternion represents the orientation of an input device. I want > to remove jitter that comes from holding it in a human hand. > > John > > On Sun, Mar 28, 2010 at 12:56 AM, Marc B. Reynolds > <mar...@or...> wrote: > > Also, what do they represent? > > > > -----Original Message----- > > From: Robin Green [mailto:rob...@gm...] > > Sent: Sunday, March 28, 2010 8:36 AM > > To: Game Development Algorithms > > Subject: Re: [Algorithms] Low pass filter on quaternions > > > > > > Do you want to lowpass the signal, or do you want to fit a smooth > > curve to the samples? > > Are the samples regularly spaced? > > > > - Robin Green > > > > > > > > On Sat, Mar 27, 2010 at 7:14 PM, John McCutchan <jo...@jo...> > > wrote: > >> Hi, > >> > >> I have a sequence of quaternions and want to filter out any high > >> frequency changes. I'm wondering if anyone has a paper or some code > >> for performing a low pass filter on quaternions? > >> > >> Thanks, > >> -- > >> John McCutchan <jo...@jo...> > >> > >> > > > ---------------------------------------------------------------------------- > > -- > >> Download Intel® Parallel Studio Eval > >> Try the new software tools for yourself. Speed compiling, find bugs > >> proactively, and fine-tune applications for parallel performance. > >> See why Intel Parallel Studio got high marks during beta. > >> http://p.sf.net/sfu/intel-sw-dev > >> _______________________________________________ > >> GDAlgorithms-list mailing list > >> GDA...@li... > >> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > >> Archives: > >> > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > >> > > > > > ---------------------------------------------------------------------------- > > -- > > Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDA...@li... > > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > > Archives: > > > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > > > > > > > > > > > ------------------------------------------------------------------------------ > > Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDA...@li... > > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > > Archives: > > > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > > > > > > -- > John McCutchan <jo...@jo...> > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |
From: John M. <jo...@jo...> - 2010-03-28 15:59:38
|
Hi, Each quaternion represents the orientation of an input device. I want to remove jitter that comes from holding it in a human hand. John On Sun, Mar 28, 2010 at 12:56 AM, Marc B. Reynolds <mar...@or...> wrote: > Also, what do they represent? > > -----Original Message----- > From: Robin Green [mailto:rob...@gm...] > Sent: Sunday, March 28, 2010 8:36 AM > To: Game Development Algorithms > Subject: Re: [Algorithms] Low pass filter on quaternions > > > Do you want to lowpass the signal, or do you want to fit a smooth > curve to the samples? > Are the samples regularly spaced? > > - Robin Green > > > > On Sat, Mar 27, 2010 at 7:14 PM, John McCutchan <jo...@jo...> > wrote: >> Hi, >> >> I have a sequence of quaternions and want to filter out any high >> frequency changes. I'm wondering if anyone has a paper or some code >> for performing a low pass filter on quaternions? >> >> Thanks, >> -- >> John McCutchan <jo...@jo...> >> >> > ---------------------------------------------------------------------------- > -- >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> GDAlgorithms-list mailing list >> GDA...@li... >> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >> Archives: >> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >> > > ---------------------------------------------------------------------------- > -- > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > -- John McCutchan <jo...@jo...> |
From: Bert P. <be...@bp...> - 2010-03-28 15:03:48
|
Darren Grant schreef: > The most complex approach is to write a ray-casting shader that > integrates over distance travelled by each eye ray through the umbra > volume. It is hard to get the results to overlap and intersect correctly > with the rest of the scene unless you have some sort of unified > rendering architecture built around ray-casting. Very pretty if you get > it working, but very difficult to deploy without limitations coming back > to get you later. I'd give that a try too. There's some good shadowmap based stuff in ShaderX7 as well for easier integration with scene geometry (p. 331). Also check out I3D10's update to Crytek's Light propagation volumes. hth, bert |
From: Marc B. R. <mar...@or...> - 2010-03-28 07:57:05
|
Also, what do they represent? -----Original Message----- From: Robin Green [mailto:rob...@gm...] Sent: Sunday, March 28, 2010 8:36 AM To: Game Development Algorithms Subject: Re: [Algorithms] Low pass filter on quaternions Do you want to lowpass the signal, or do you want to fit a smooth curve to the samples? Are the samples regularly spaced? - Robin Green On Sat, Mar 27, 2010 at 7:14 PM, John McCutchan <jo...@jo...> wrote: > Hi, > > I have a sequence of quaternions and want to filter out any high > frequency changes. I'm wondering if anyone has a paper or some code > for performing a low pass filter on quaternions? > > Thanks, > -- > John McCutchan <jo...@jo...> > > ---------------------------------------------------------------------------- -- > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > ---------------------------------------------------------------------------- -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |
From: Robin G. <rob...@gm...> - 2010-03-28 06:35:48
|
Do you want to lowpass the signal, or do you want to fit a smooth curve to the samples? Are the samples regularly spaced? - Robin Green On Sat, Mar 27, 2010 at 7:14 PM, John McCutchan <jo...@jo...> wrote: > Hi, > > I have a sequence of quaternions and want to filter out any high > frequency changes. I'm wondering if anyone has a paper or some code > for performing a low pass filter on quaternions? > > Thanks, > -- > John McCutchan <jo...@jo...> > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |
From: John M. <jo...@jo...> - 2010-03-28 03:22:51
|
Hi, I have a sequence of quaternions and want to filter out any high frequency changes. I'm wondering if anyone has a paper or some code for performing a low pass filter on quaternions? Thanks, -- John McCutchan <jo...@jo...> |
From: Sebastian S. <seb...@gm...> - 2010-03-25 09:54:29
|
Try this one: http://www.vis.uni-stuttgart.de/~dachsbcn/download/espmss10.pdf On Wed, Mar 24, 2010 at 4:24 PM, Jeff Russell <je...@8m...>wrote: > Hey, anybody have any cool reference for how to render a volumetric > spotlight effect? I realize that full correct shadowing with volumetric > lighting might be kind of heavy duty, so I'm willing to try something a > little dirtier or with no shadows. > > Regards, > > Jeff > > > -- > Jeff Russell > Engineer, 8monkey Labs > www.8monkeylabs.com > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > -- Sebastian Sylvan |
From: Bob <ma...@di...> - 2010-03-25 00:37:51
|
If you are using the texture-based method, an additive blend would be more effective than an alpha blend or mask. --B From: Darren Grant To: Game Development Algorithms ; Game Development Algorithms Sent: Wednesday, March 24, 2010 2:19 PM Subject: Re: [Algorithms] volumetric spotlight I don't have references but here are a few techniques in increasing complexity: For viewers at a distance it is hard to beat the simplicity of billboard sprites. Just lock a billboard to the spotlight cone axis and use alpha blending to make the texture glow. Fade it out when the viewer gets close enough to make the effect cheesy. Create an umbra mesh, a skirt that resembles the spot cone and fix it to the spotlight in space. Simple vertex coloring to fade the skirt at the far end can be very effective. Again render using alpha blending. Some simple pixel shader work using normal averaging and dot product can help to hide the edges of the mesh. If you have access to the depth buffer values, you can also fade out pixels that approach the near plane so they don't clip noticeably as the viewer passes through the cone. The most complex approach is to write a ray-casting shader that integrates over distance travelled by each eye ray through the umbra volume. It is hard to get the results to overlap and intersect correctly with the rest of the scene unless you have some sort of unified rendering architecture built around ray-casting. Very pretty if you get it working, but very difficult to deploy without limitations coming back to get you later. Cheers, Darren At 09:24 AM 3/24/2010, Jeff Russell wrote: Hey, anybody have any cool reference for how to render a volumetric spotlight effect? I realize that full correct shadowing with volumetric lighting might be kind of heavy duty, so I'm willing to try something a little dirtier or with no shadows. Regards, Jeff -- Jeff Russell Engineer, 8monkey Labs www.8monkeylabs.com ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev |
From: David N. <da...@re...> - 2010-03-24 20:13:47
|
Hi Jeff, Just shooting off an idea that may be useful, I'd imagine you could render the front facing polygons and then the back facing polygons with depth testing on. That difference in depth of the two distance the light travels through the cone at that point. You could then use that information to calculate how much light scattering has occurred. -= Dave From: Jeff Russell [mailto:je...@8m...] Sent: Wednesday, March 24, 2010 12:53 PM To: Game Development Algorithms Subject: Re: [Algorithms] volumetric spotlight That third option is kind of what I'm leaning toward - ray tests vs a cone are mathematically simple, so that combined with a screen depth lookup (already available) I'm hoping to be able to swing something cool today. Jeff On Wed, Mar 24, 2010 at 2:19 PM, Darren Grant <dg...@ke...> wrote: I don't have references but here are a few techniques in increasing complexity: For viewers at a distance it is hard to beat the simplicity of billboard sprites. Just lock a billboard to the spotlight cone axis and use alpha blending to make the texture glow. Fade it out when the viewer gets close enough to make the effect cheesy. Create an umbra mesh, a skirt that resembles the spot cone and fix it to the spotlight in space. Simple vertex coloring to fade the skirt at the far end can be very effective. Again render using alpha blending. Some simple pixel shader work using normal averaging and dot product can help to hide the edges of the mesh. If you have access to the depth buffer values, you can also fade out pixels that approach the near plane so they don't clip noticeably as the viewer passes through the cone. The most complex approach is to write a ray-casting shader that integrates over distance travelled by each eye ray through the umbra volume. It is hard to get the results to overlap and intersect correctly with the rest of the scene unless you have some sort of unified rendering architecture built around ray-casting. Very pretty if you get it working, but very difficult to deploy without limitations coming back to get you later. Cheers, Darren At 09:24 AM 3/24/2010, Jeff Russell wrote: Hey, anybody have any cool reference for how to render a volumetric spotlight effect? I realize that full correct shadowing with volumetric lighting might be kind of heavy duty, so I'm willing to try something a little dirtier or with no shadows. Regards, Jeff -- Jeff Russell Engineer, 8monkey Labs www.8monkeylabs.com ------------------------------------------------------------------------ ------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-lis t ------------------------------------------------------------------------ ------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-lis t -- Jeff Russell Engineer, 8monkey Labs www.8monkeylabs.com |
From: Jeff R. <je...@8m...> - 2010-03-24 19:52:53
|
That third option is kind of what I'm leaning toward - ray tests vs a cone are mathematically simple, so that combined with a screen depth lookup (already available) I'm hoping to be able to swing something cool today. Jeff On Wed, Mar 24, 2010 at 2:19 PM, Darren Grant < dg...@ke...> wrote: > I don't have references but here are a few techniques in increasing > complexity: > > For viewers at a distance it is hard to beat the simplicity of billboard > sprites. Just lock a billboard to the spotlight cone axis and use alpha > blending to make the texture glow. Fade it out when the viewer gets close > enough to make the effect cheesy. > > Create an umbra mesh, a skirt that resembles the spot cone and fix it to > the spotlight in space. Simple vertex coloring to fade the skirt at the far > end can be very effective. Again render using alpha blending. Some simple > pixel shader work using normal averaging and dot product can help to hide > the edges of the mesh. If you have access to the depth buffer values, you > can also fade out pixels that approach the near plane so they don't clip > noticeably as the viewer passes through the cone. > > The most complex approach is to write a ray-casting shader that integrates > over distance travelled by each eye ray through the umbra volume. It is hard > to get the results to overlap and intersect correctly with the rest of the > scene unless you have some sort of unified rendering architecture built > around ray-casting. Very pretty if you get it working, but very difficult to > deploy without limitations coming back to get you later. > > > Cheers, > Darren > > > > > > At 09:24 AM 3/24/2010, Jeff Russell wrote: > > Hey, anybody have any cool reference for how to render a volumetric > spotlight effect? I realize that full correct shadowing with volumetric > lighting might be kind of heavy duty, so I'm willing to try something a > little dirtier or with no shadows. > > Regards, > > Jeff > > > -- > Jeff Russell > Engineer, 8monkey Labs > www.8monkeylabs.com > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > -- Jeff Russell Engineer, 8monkey Labs www.8monkeylabs.com |
From: Darren G. <dg...@ke...> - 2010-03-24 19:19:39
|
I don't have references but here are a few techniques in increasing complexity: For viewers at a distance it is hard to beat the simplicity of billboard sprites. Just lock a billboard to the spotlight cone axis and use alpha blending to make the texture glow. Fade it out when the viewer gets close enough to make the effect cheesy. Create an umbra mesh, a skirt that resembles the spot cone and fix it to the spotlight in space. Simple vertex coloring to fade the skirt at the far end can be very effective. Again render using alpha blending. Some simple pixel shader work using normal averaging and dot product can help to hide the edges of the mesh. If you have access to the depth buffer values, you can also fade out pixels that approach the near plane so they don't clip noticeably as the viewer passes through the cone. The most complex approach is to write a ray-casting shader that integrates over distance travelled by each eye ray through the umbra volume. It is hard to get the results to overlap and intersect correctly with the rest of the scene unless you have some sort of unified rendering architecture built around ray-casting. Very pretty if you get it working, but very difficult to deploy without limitations coming back to get you later. Cheers, Darren At 09:24 AM 3/24/2010, Jeff Russell wrote: >Hey, anybody have any cool reference for how to render a volumetric >spotlight effect? I realize that full correct shadowing with >volumetric lighting might be kind of heavy duty, so I'm willing to >try something a little dirtier or with no shadows. > >Regards, > >Jeff > > >-- >Jeff Russell >Engineer, 8monkey Labs ><http://www.8monkeylabs.com>www.8monkeylabs.com >------------------------------------------------------------------------------ >Download Intel® Parallel Studio Eval >Try the new software tools for yourself. Speed compiling, find bugs >proactively, and fine-tune applications for parallel performance. >See why Intel Parallel Studio got high marks during beta. >http://p.sf.net/sfu/intel-sw-dev >_______________________________________________ >GDAlgorithms-list mailing list >GDA...@li... >https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >Archives: >http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |
From: John R. <jra...@gm...> - 2010-03-24 19:01:33
|
Priyank, Unless you want to write your own collision/physics engine yourself 'just for fun' I strongly recommend you just use one of the many freely available versions. It's a large engineering project and almost for sure not worth your time. Check out; 'Bullet', 'OpCode', or 'PhysX' to name just a few. All three of these are free for commercial or non-commercial use and represent literally man-years of engineering time invested. Personally, I get no pleasure from re-writing code that is readily available from other sources. Unless you are writing it purely as a learning exercise, I can't fathom a reason why you would do this. Presumably you are trying to create an actual game project, so wouldn't you prefer to be working on your game instead of solving problems that have been solved many times before by others and shared with the development community free of charge? John On Wed, Mar 24, 2010 at 1:50 PM, Priyank Jain <fly...@gm...> wrote: > Hi, > > I apologize in advance, but I'm not sure if my earlier message about > broadphase collision got posted or not. Earlier when I posted it, it > gave me a bounce-back error, saying that the message was too long, so am > not sure if my question got posted. > > If none of you received it, please let me know. > > Thanks > /Priyank > > On 3/24/2010 1:22 PM, Priyank Jain wrote: > > Hi, > > I am trying to implement broadphase collision for my game (3D FPS > > genre). I have been reading about the commonly used techniques and I > > have tailored the grid approach to my game. I want to know if this is > > the right direction to go in or not. > > The involved actors are :- > > Players > > Bullets(Fired) > > Weapons (placed at points located throughout the level, which other > > players can pick up, aka static objects) > > World > > As of now, I am just trying to get the Players and bullet collision > > pairs. > > Players: Players are represented by a bounding sphere, located at a > > position and moving with a velocity. Each player would have > > approximately the bounding sphere of same size. > > Players - weapons > > Players - World > > Bullets: Bullets are represented by a segment with a start point and > > an end point (using posn, posn + vel) (each frame). Bullet can hit :- > > Fired Bullet Player > > (Other) Bullet > > World > > > > Approach: > > - As each player and bullet is created, associate a reference to each > > entity within CollisionMgr as a list<Player*> and list<Bullet*>. > > - On each update frame, do the following: > > - For each player, find Cell(s); it is associated with :=> list< Cell* > > > PlayerCells > > - For each Bullet (segment), find Cell(s); it is associated with :=> > > list< Cell* > BulletCells > > - For each entity, the cell(s) can be found out based on the entity. > > - Player: Bounding sphere :The grid size are uniformly sized cell > > (size, M) such that the M = 2R (R = radius of the bounding sphere). > > Thus, at any given time, at most the bounding sphere can be in contact > > with 4 cells. To determine the cells associated, find the 8 points for > > a given sphere (each at 45 degrees to the X,Y,Z axis along the 8 > > octants). (And then find out, in which grid cell does each of the > > point lie. This could at max return 4 cells). > > - Bullet: Segmented Ray with endpoints at : Posn and (Posn + vel). > > Thus, all the cells that the line passes through would yield the cells. > > - Cell can be a structure like > > Cell { > > List < Player*> > > List < Bullet* > > > Value (x,y,z) => unique value based on these three coordinates > > } > > - As a cell is found by either of the entities, given its coordinates > > and grid position, a cell can be put on the hash-map. As the players > > and bullets yield cells, they can be referenced using this map and > > in-turn populate the list of player and bullet residing within that > > cell structure. > > - After all the player and bullet –affected cells have been found, if > > we iterate through the hash-map, then it would yield all the possible > > pair of colliding players and bullets in a given cell. This can then > > be further handled using narrow-phase collision. > > > > Does this sound feasible ? I'd really like to get some feedback on this. > > > > Thank you > > /Priyank Jain > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |
From: Darren G. <dg...@ke...> - 2010-03-24 18:54:44
|
By way of anecdote, here is my experience: I am inserting bounding boxes into an implementation of the hierarchical hash table described in mirtich96a (2.4.2): <http://cg.cs.uni-bonn.de/docs/teaching/2004/SS/seminar_anim/documents/Mirtich96a.pdf>http://cg.cs.uni-bonn.de/docs/teaching/2004/SS/seminar_anim/documents/Mirtich96a.pdf This approach has proven effective for a relatively even distribution of many dynamic objects of reasonably varying size and velocity. The memory requirements can be quite large, which makes it more suitable for PC. I have thousands of objects running roughly 1-m to 1000-m in diameter and capped at 200-m/s, for instance, but very few are moving noticeably at any given time. You may want to explore a hybrid partitioning approach to get the most out of your static world geometry. If you have a scenario with only a moderate number of small objects moving around there are better options. A tighter space partitioning and quad tree may be a better option. Cheres, Darren Grant. At 10:22 AM 3/24/2010, Priyank Jain wrote: >Hi, >I am trying to implement broadphase collision for my game (3D FPS >genre). I have been reading about the commonly used techniques and I >have tailored the grid approach to my game. I want to know if this is >the right direction to go in or not. >The involved actors are :- >Players >Bullets(Fired) >Weapons (placed at points located throughout the level, which other >players can pick up, aka static objects) >World >As of now, I am just trying to get the Players and bullet collision pairs. >Players: Players are represented by a bounding sphere, located at a >position and moving with a velocity. Each player would have >approximately the bounding sphere of same size. >Players - weapons >Players - World >Bullets: Bullets are represented by a segment with a start point and an >end point (using posn, posn + vel) (each frame). Bullet can hit :- >Fired Bullet Player >(Other) Bullet >World > >Approach: >- As each player and bullet is created, associate a reference to each >entity within CollisionMgr as a list<Player*> and list<Bullet*>. >- On each update frame, do the following: >- For each player, find Cell(s); it is associated with :=> list< Cell* > >PlayerCells >- For each Bullet (segment), find Cell(s); it is associated with :=> >list< Cell* > BulletCells >- For each entity, the cell(s) can be found out based on the entity. >- Player: Bounding sphere :The grid size are uniformly sized cell (size, >M) such that the M = 2R (R = radius of the bounding sphere). Thus, at >any given time, at most the bounding sphere can be in contact with 4 >cells. To determine the cells associated, find the 8 points for a given >sphere (each at 45 degrees to the X,Y,Z axis along the 8 octants). (And >then find out, in which grid cell does each of the point lie. This could >at max return 4 cells). >- Bullet: Segmented Ray with endpoints at : Posn and (Posn + vel). Thus, >all the cells that the line passes through would yield the cells. >- Cell can be a structure like >Cell { >List < Player*> >List < Bullet* > >Value (x,y,z) => unique value based on these three coordinates >} >- As a cell is found by either of the entities, given its coordinates >and grid position, a cell can be put on the hash-map. As the players and >bullets yield cells, they can be referenced using this map and in-turn >populate the list of player and bullet residing within that cell structure. >- After all the player and bullet affected cells have been found, if we >iterate through the hash-map, then it would yield all the possible pair >of colliding players and bullets in a given cell. This can then be >further handled using narrow-phase collision. > >Does this sound feasible ? I'd really like to get some feedback on this. > >Thank you >/Priyank Jain > >------------------------------------------------------------------------------ >Download Intel® Parallel Studio Eval >Try the new software tools for yourself. Speed compiling, find bugs >proactively, and fine-tune applications for parallel performance. >See why Intel Parallel Studio got high marks during beta. >http://p.sf.net/sfu/intel-sw-dev >_______________________________________________ >GDAlgorithms-list mailing list >GDA...@li... >https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >Archives: >http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |
From: Priyank J. <fly...@gm...> - 2010-03-24 18:50:58
|
Hi, I apologize in advance, but I'm not sure if my earlier message about broadphase collision got posted or not. Earlier when I posted it, it gave me a bounce-back error, saying that the message was too long, so am not sure if my question got posted. If none of you received it, please let me know. Thanks /Priyank On 3/24/2010 1:22 PM, Priyank Jain wrote: > Hi, > I am trying to implement broadphase collision for my game (3D FPS > genre). I have been reading about the commonly used techniques and I > have tailored the grid approach to my game. I want to know if this is > the right direction to go in or not. > The involved actors are :- > Players > Bullets(Fired) > Weapons (placed at points located throughout the level, which other > players can pick up, aka static objects) > World > As of now, I am just trying to get the Players and bullet collision > pairs. > Players: Players are represented by a bounding sphere, located at a > position and moving with a velocity. Each player would have > approximately the bounding sphere of same size. > Players - weapons > Players - World > Bullets: Bullets are represented by a segment with a start point and > an end point (using posn, posn + vel) (each frame). Bullet can hit :- > Fired Bullet Player > (Other) Bullet > World > > Approach: > - As each player and bullet is created, associate a reference to each > entity within CollisionMgr as a list<Player*> and list<Bullet*>. > - On each update frame, do the following: > - For each player, find Cell(s); it is associated with :=> list< Cell* > > PlayerCells > - For each Bullet (segment), find Cell(s); it is associated with :=> > list< Cell* > BulletCells > - For each entity, the cell(s) can be found out based on the entity. > - Player: Bounding sphere :The grid size are uniformly sized cell > (size, M) such that the M = 2R (R = radius of the bounding sphere). > Thus, at any given time, at most the bounding sphere can be in contact > with 4 cells. To determine the cells associated, find the 8 points for > a given sphere (each at 45 degrees to the X,Y,Z axis along the 8 > octants). (And then find out, in which grid cell does each of the > point lie. This could at max return 4 cells). > - Bullet: Segmented Ray with endpoints at : Posn and (Posn + vel). > Thus, all the cells that the line passes through would yield the cells. > - Cell can be a structure like > Cell { > List < Player*> > List < Bullet* > > Value (x,y,z) => unique value based on these three coordinates > } > - As a cell is found by either of the entities, given its coordinates > and grid position, a cell can be put on the hash-map. As the players > and bullets yield cells, they can be referenced using this map and > in-turn populate the list of player and bullet residing within that > cell structure. > - After all the player and bullet –affected cells have been found, if > we iterate through the hash-map, then it would yield all the possible > pair of colliding players and bullets in a given cell. This can then > be further handled using narrow-phase collision. > > Does this sound feasible ? I'd really like to get some feedback on this. > > Thank you > /Priyank Jain |
From: Priyank J. <fly...@gm...> - 2010-03-24 17:22:30
|
Hi, I am trying to implement broadphase collision for my game (3D FPS genre). I have been reading about the commonly used techniques and I have tailored the grid approach to my game. I want to know if this is the right direction to go in or not. The involved actors are :- Players Bullets(Fired) Weapons (placed at points located throughout the level, which other players can pick up, aka static objects) World As of now, I am just trying to get the Players and bullet collision pairs. Players: Players are represented by a bounding sphere, located at a position and moving with a velocity. Each player would have approximately the bounding sphere of same size. Players - weapons Players - World Bullets: Bullets are represented by a segment with a start point and an end point (using posn, posn + vel) (each frame). Bullet can hit :- Fired Bullet Player (Other) Bullet World Approach: - As each player and bullet is created, associate a reference to each entity within CollisionMgr as a list<Player*> and list<Bullet*>. - On each update frame, do the following: - For each player, find Cell(s); it is associated with :=> list< Cell* > PlayerCells - For each Bullet (segment), find Cell(s); it is associated with :=> list< Cell* > BulletCells - For each entity, the cell(s) can be found out based on the entity. - Player: Bounding sphere :The grid size are uniformly sized cell (size, M) such that the M = 2R (R = radius of the bounding sphere). Thus, at any given time, at most the bounding sphere can be in contact with 4 cells. To determine the cells associated, find the 8 points for a given sphere (each at 45 degrees to the X,Y,Z axis along the 8 octants). (And then find out, in which grid cell does each of the point lie. This could at max return 4 cells). - Bullet: Segmented Ray with endpoints at : Posn and (Posn + vel). Thus, all the cells that the line passes through would yield the cells. - Cell can be a structure like Cell { List < Player*> List < Bullet* > Value (x,y,z) => unique value based on these three coordinates } - As a cell is found by either of the entities, given its coordinates and grid position, a cell can be put on the hash-map. As the players and bullets yield cells, they can be referenced using this map and in-turn populate the list of player and bullet residing within that cell structure. - After all the player and bullet –affected cells have been found, if we iterate through the hash-map, then it would yield all the possible pair of colliding players and bullets in a given cell. This can then be further handled using narrow-phase collision. Does this sound feasible ? I'd really like to get some feedback on this. Thank you /Priyank Jain |
From: Jeff R. <je...@8m...> - 2010-03-24 16:24:19
|
Hey, anybody have any cool reference for how to render a volumetric spotlight effect? I realize that full correct shadowing with volumetric lighting might be kind of heavy duty, so I'm willing to try something a little dirtier or with no shadows. Regards, Jeff -- Jeff Russell Engineer, 8monkey Labs www.8monkeylabs.com |
From: Darren G. <dg...@ke...> - 2010-03-23 19:06:19
|
Thanks all for the info. I have switched the set out with an unordered vector and will say how that affects things. There are at most only a handful of active objects per tile. Cheers, Darren Grant At 05:07 AM 3/23/2010, you wrote: >On 23-3-2010 10:34, Fabian Giesen wrote: > > Jon Watte schrieb: > > > >> <snip> > >> If you have buckets with zillions of items (a bad idea for other > >> reasons) and need to delete from the middle, try a std::list<> with a > >> custom allocator, or as others have said std::hash_map or similar. > >> > > Linked lists enforce a particular order. Whenever you have something > > that is just a "bucket of things" with no particular ordering > > requirements, a good option is to just use a std::vector<> (or, more > > generally, any array - this is not STL specific). To insert, you always > > use push_back. To remove a given item "x", you do: > > > > std::swap(x, container.back()); > > container.pop_back(); > > > > This doesn't preserve order, but it's simple, short and fast: insertion > > is amortized O(1) with std::vector semantics, and removal is guaranteed > > O(1). > >I totally agree. Even with a custom allocator an std::list breaks cache >coherence and simply has too much overhead. I would not use std::swap >though, since x is a goner so no need to save it to back(). Instead do > >std::vector<Entry>::iterator it; > >... > >Entry& x = *it; // it points to the item that needs to be destroyed, e.g. > > // it = std::find(container.begin(), > container.end(), victim); > >x = container.back(); > >container.pop_back(); > > >This saves you two writes since std::swap needs to create a temporary to >hold one of the swapped values. The extra writes are better avoided if >the size of Entry is huge or if it holds shared pointers. > > > > STL also offers this as an algorithm: there's std::remove and > > std::remove_if. Their usage is somewhat nonobvious: you do > > > > container.erase(std::remove(start, end), container.end()); > > > > to remove everything in [start,end) in a "non-order-preserving" way, and > > similar with remove_if which uses a predicate. > > > > -Fabian > > > > > > > >I think you mean > >container.erase(std::remove(start, end, value), container.end()); > > >since the STL remove takes three parameters. Furthermore std::remove >keeps the relative order intact. >http://www.cplusplus.com/reference/algorithm/remove/ >At least, that is what I see in Visual C++ 8.0 (Sometimes they do adhere >to standards ;) Removing all values and leaving an unordered sequence >can be done using > >std::vector<Entry>::iterator it = container.begin(), last = container.end(); > >while (it != last) > >{ > if (*it == value) > > { > > --last; > *it = *last; > } > else > { > ++it; > } >} > >container.erase(last, container.end()); > > >Gino > > > > > > > > >------------------------------------------------------------------------------ >Download Intel® Parallel Studio Eval >Try the new software tools for yourself. Speed compiling, find bugs >proactively, and fine-tune applications for parallel performance. >See why Intel Parallel Studio got high marks during beta. >http://p.sf.net/sfu/intel-sw-dev >_______________________________________________ >GDAlgorithms-list mailing list >GDA...@li... >https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >Archives: >http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list Darren Grant Technical Director http://www.kerberos-productions.com/ |
From: Gino v. d. B. <gin...@gm...> - 2010-03-23 12:07:11
|
On 23-3-2010 10:34, Fabian Giesen wrote: > Jon Watte schrieb: > >> <snip> >> If you have buckets with zillions of items (a bad idea for other >> reasons) and need to delete from the middle, try a std::list<> with a >> custom allocator, or as others have said std::hash_map or similar. >> > Linked lists enforce a particular order. Whenever you have something > that is just a "bucket of things" with no particular ordering > requirements, a good option is to just use a std::vector<> (or, more > generally, any array - this is not STL specific). To insert, you always > use push_back. To remove a given item "x", you do: > > std::swap(x, container.back()); > container.pop_back(); > > This doesn't preserve order, but it's simple, short and fast: insertion > is amortized O(1) with std::vector semantics, and removal is guaranteed > O(1). I totally agree. Even with a custom allocator an std::list breaks cache coherence and simply has too much overhead. I would not use std::swap though, since x is a goner so no need to save it to back(). Instead do std::vector<Entry>::iterator it; ... Entry& x = *it; // it points to the item that needs to be destroyed, e.g. // it = std::find(container.begin(), container.end(), victim); x = container.back(); container.pop_back(); This saves you two writes since std::swap needs to create a temporary to hold one of the swapped values. The extra writes are better avoided if the size of Entry is huge or if it holds shared pointers. > STL also offers this as an algorithm: there's std::remove and > std::remove_if. Their usage is somewhat nonobvious: you do > > container.erase(std::remove(start, end), container.end()); > > to remove everything in [start,end) in a "non-order-preserving" way, and > similar with remove_if which uses a predicate. > > -Fabian > > > I think you mean container.erase(std::remove(start, end, value), container.end()); since the STL remove takes three parameters. Furthermore std::remove keeps the relative order intact. http://www.cplusplus.com/reference/algorithm/remove/ At least, that is what I see in Visual C++ 8.0 (Sometimes they do adhere to standards ;) Removing all values and leaving an unordered sequence can be done using std::vector<Entry>::iterator it = container.begin(), last = container.end(); while (it != last) { if (*it == value) { --last; *it = *last; } else { ++it; } } container.erase(last, container.end()); Gino |
From: Fabian G. <f.g...@49...> - 2010-03-23 09:47:15
|
Jon Watte schrieb: > std::set<> is not the right solution. If there are only every a few > elements in each bucket, I suggest using a std::vector<> and just search > it linearly. Each element is 8 bytes, so 8 elements fit in a single > cache line. > If you have buckets with zillions of items (a bad idea for other > reasons) and need to delete from the middle, try a std::list<> with a > custom allocator, or as others have said std::hash_map or similar. Linked lists enforce a particular order. Whenever you have something that is just a "bucket of things" with no particular ordering requirements, a good option is to just use a std::vector<> (or, more generally, any array - this is not STL specific). To insert, you always use push_back. To remove a given item "x", you do: std::swap(x, container.back()); container.pop_back(); This doesn't preserve order, but it's simple, short and fast: insertion is amortized O(1) with std::vector semantics, and removal is guaranteed O(1). STL also offers this as an algorithm: there's std::remove and std::remove_if. Their usage is somewhat nonobvious: you do container.erase(std::remove(start, end), container.end()); to remove everything in [start,end) in a "non-order-preserving" way, and similar with remove_if which uses a predicate. -Fabian |
From: Jon W. <jw...@gm...> - 2010-03-23 00:42:59
|
std::set<> is not the right solution. If there are only every a few elements in each bucket, I suggest using a std::vector<> and just search it linearly. Each element is 8 bytes, so 8 elements fit in a single cache line. If you have buckets with zillions of items (a bad idea for other reasons) and need to delete from the middle, try a std::list<> with a custom allocator, or as others have said std::hash_map or similar. STL containers sometimes help with caching, because they often use custom, pool-based allocators. However, other times, they actually end up hurting, either because the pools are too small (4 item buckets in std::deque<>, say), or because of container implementation overhead (too many pointers non-intrusive implementation, etc). Sincerely, jw -- Americans might object: there is no way we would sacrifice our living standards for the benefit of people in the rest of the world. Nevertheless, whether we get there willingly or not, we shall soon have lower consumption rates, because our present rates are unsustainable. On Mon, Mar 22, 2010 at 4:16 PM, John Ratcliff <jra...@gm...>wrote: > You definitely do not want to ever be using a set or a map. The only > reason to use a set or a map is if you absolutely need to constantly > maintain something in sorted order; which is rarely ever the case. Most of > the time you just want to do a key/value lookup and for that a hash table is > extremely fast. Using the STL in performance sensitive code is also > questionable as a whole lot of memory allocations and copy constructors get > executed both of which you want to avoid. > > If you are going to use the STL, and then have a profile of many tiny > allocations, you should consider using a custom small memory allocator; > there are several implementations available. If you are dealing in a > heavily multi-threaded environment you need to take that into consideration > as well. Something like the Hoard memory allocator is not only designed to > handle many tiny allocations efficiently but also minimizes thread > contention. > > John > > On Mon, Mar 22, 2010 at 6:05 PM, Sebastian Sylvan < > seb...@gm...> wrote: > >> >> >> On Mon, Mar 22, 2010 at 9:49 PM, Darren Grant < >> dg...@ke...> wrote: >> >>> Hi, >>> >>> I am looking at ways of improving cache coherence for a typical >>> broad-phase collision detection scenario (cpu). The basic >>> implementation utilizes these data structures: >>> >>> struct ObjectTracking { >>> int ObjectIndex; >>> int RefCount; >>> }; >>> >>> typedef set<ObjectTracking> Tile; >>> >>> struct TilingLevel { >>> vector<Tile> Tiles; >>> int Pitch; >>> Tile& Map(int x, int y) { return Tiles[y*Pitch+x]; } >>> }; >>> >>> struct TilingHierarchy { >>> vector<TilingLevel> TilingLevels; >>> Tile& Map(int level, int x, int y) { return >>> TilingLevels[level].Map(x,y); } >>> }; >>> >>> >>> And the hot process involves frequent iteration of: >>> >>> for level from 0 to maxlevel >>> for y from y0(level) to y1(level) >>> for x from x0(level) to x1(level) >>> tilingHierarchy.Map(level,x,y).InsertOrRemove(); >>> >>> >>> Performance becomes an issue here when the std::set allocations get >>> spread out across process memory. I will therefore replace >>> individual sets with a single shared map to explore implementations >>> for coherence: >>> >>> (level,x,y,ObjectIndex)->(RefCount). >>> >>> >>> (level,x,y,ObjectIndex) has simple perfect hash functions since the >>> boundary conditions are known at start. Local memory access roughly >>> favours tiling levels > tiling level > tile row > tile according to >>> the given code, but I am wary of less obvious yet still important >>> observations that may be missed. >>> >>> >>> Does this sound about right? Are there any better options I have >>> flown right past? >>> >>> Thank you. >> >> >> Try a single hash table (multimap) mapping from the cell position to >> objects in that cell position? You could try open adressing to get rid of >> pointers altogether and have just a single flat array at the bottom of your >> data structure, although that has limitations (difficulty deleting, less >> than gracious performance degradation as the load factor grows). >> >> -- >> Sebastian Sylvan >> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> GDAlgorithms-list mailing list >> GDA...@li... >> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >> Archives: >> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >> > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |
From: John R. <jra...@gm...> - 2010-03-22 23:16:26
|
You definitely do not want to ever be using a set or a map. The only reason to use a set or a map is if you absolutely need to constantly maintain something in sorted order; which is rarely ever the case. Most of the time you just want to do a key/value lookup and for that a hash table is extremely fast. Using the STL in performance sensitive code is also questionable as a whole lot of memory allocations and copy constructors get executed both of which you want to avoid. If you are going to use the STL, and then have a profile of many tiny allocations, you should consider using a custom small memory allocator; there are several implementations available. If you are dealing in a heavily multi-threaded environment you need to take that into consideration as well. Something like the Hoard memory allocator is not only designed to handle many tiny allocations efficiently but also minimizes thread contention. John On Mon, Mar 22, 2010 at 6:05 PM, Sebastian Sylvan < seb...@gm...> wrote: > > > On Mon, Mar 22, 2010 at 9:49 PM, Darren Grant < > dg...@ke...> wrote: > >> Hi, >> >> I am looking at ways of improving cache coherence for a typical >> broad-phase collision detection scenario (cpu). The basic >> implementation utilizes these data structures: >> >> struct ObjectTracking { >> int ObjectIndex; >> int RefCount; >> }; >> >> typedef set<ObjectTracking> Tile; >> >> struct TilingLevel { >> vector<Tile> Tiles; >> int Pitch; >> Tile& Map(int x, int y) { return Tiles[y*Pitch+x]; } >> }; >> >> struct TilingHierarchy { >> vector<TilingLevel> TilingLevels; >> Tile& Map(int level, int x, int y) { return >> TilingLevels[level].Map(x,y); } >> }; >> >> >> And the hot process involves frequent iteration of: >> >> for level from 0 to maxlevel >> for y from y0(level) to y1(level) >> for x from x0(level) to x1(level) >> tilingHierarchy.Map(level,x,y).InsertOrRemove(); >> >> >> Performance becomes an issue here when the std::set allocations get >> spread out across process memory. I will therefore replace >> individual sets with a single shared map to explore implementations >> for coherence: >> >> (level,x,y,ObjectIndex)->(RefCount). >> >> >> (level,x,y,ObjectIndex) has simple perfect hash functions since the >> boundary conditions are known at start. Local memory access roughly >> favours tiling levels > tiling level > tile row > tile according to >> the given code, but I am wary of less obvious yet still important >> observations that may be missed. >> >> >> Does this sound about right? Are there any better options I have >> flown right past? >> >> Thank you. > > > Try a single hash table (multimap) mapping from the cell position to > objects in that cell position? You could try open adressing to get rid of > pointers altogether and have just a single flat array at the bottom of your > data structure, although that has limitations (difficulty deleting, less > than gracious performance degradation as the load factor grows). > > -- > Sebastian Sylvan > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |
From: Sebastian S. <seb...@gm...> - 2010-03-22 23:05:11
|
On Mon, Mar 22, 2010 at 9:49 PM, Darren Grant < dg...@ke...> wrote: > Hi, > > I am looking at ways of improving cache coherence for a typical > broad-phase collision detection scenario (cpu). The basic > implementation utilizes these data structures: > > struct ObjectTracking { > int ObjectIndex; > int RefCount; > }; > > typedef set<ObjectTracking> Tile; > > struct TilingLevel { > vector<Tile> Tiles; > int Pitch; > Tile& Map(int x, int y) { return Tiles[y*Pitch+x]; } > }; > > struct TilingHierarchy { > vector<TilingLevel> TilingLevels; > Tile& Map(int level, int x, int y) { return > TilingLevels[level].Map(x,y); } > }; > > > And the hot process involves frequent iteration of: > > for level from 0 to maxlevel > for y from y0(level) to y1(level) > for x from x0(level) to x1(level) > tilingHierarchy.Map(level,x,y).InsertOrRemove(); > > > Performance becomes an issue here when the std::set allocations get > spread out across process memory. I will therefore replace > individual sets with a single shared map to explore implementations > for coherence: > > (level,x,y,ObjectIndex)->(RefCount). > > > (level,x,y,ObjectIndex) has simple perfect hash functions since the > boundary conditions are known at start. Local memory access roughly > favours tiling levels > tiling level > tile row > tile according to > the given code, but I am wary of less obvious yet still important > observations that may be missed. > > > Does this sound about right? Are there any better options I have > flown right past? > > Thank you. Try a single hash table (multimap) mapping from the cell position to objects in that cell position? You could try open adressing to get rid of pointers altogether and have just a single flat array at the bottom of your data structure, although that has limitations (difficulty deleting, less than gracious performance degradation as the load factor grows). -- Sebastian Sylvan |
From: Darren G. <dg...@ke...> - 2010-03-22 22:04:51
|
Hi, I am looking at ways of improving cache coherence for a typical broad-phase collision detection scenario (cpu). The basic implementation utilizes these data structures: struct ObjectTracking { int ObjectIndex; int RefCount; }; typedef set<ObjectTracking> Tile; struct TilingLevel { vector<Tile> Tiles; int Pitch; Tile& Map(int x, int y) { return Tiles[y*Pitch+x]; } }; struct TilingHierarchy { vector<TilingLevel> TilingLevels; Tile& Map(int level, int x, int y) { return TilingLevels[level].Map(x,y); } }; And the hot process involves frequent iteration of: for level from 0 to maxlevel for y from y0(level) to y1(level) for x from x0(level) to x1(level) tilingHierarchy.Map(level,x,y).InsertOrRemove(); Performance becomes an issue here when the std::set allocations get spread out across process memory. I will therefore replace individual sets with a single shared map to explore implementations for coherence: (level,x,y,ObjectIndex)->(RefCount). (level,x,y,ObjectIndex) has simple perfect hash functions since the boundary conditions are known at start. Local memory access roughly favours tiling levels > tiling level > tile row > tile according to the given code, but I am wary of less obvious yet still important observations that may be missed. Does this sound about right? Are there any better options I have flown right past? Thank you. Cheers, Darren Grant |
From: Jon W. <jw...@gm...> - 2010-03-11 19:22:14
|
That solution gets me halfway there. Pretty good! It doesn't do squared air drag, doesn't do variable air drag over time, and needs to be re-parameterized into vectors instead of separate scalars -- but the MAPLE code at the end is probably the best part, because I could probably go from there to my desired solution. Thanks! Sincerely, jw -- Americans might object: there is no way we would sacrifice our living standards for the benefit of people in the rest of the world. Nevertheless, whether we get there willingly or not, we shall soon have lower consumption rates, because our present rates are unsustainable. On Wed, Mar 10, 2010 at 5:47 PM, Beau Albiston <alb...@cy...> wrote: > Perhaps this might help? > > http://www.scar.utoronto.ca/~pat/fun/NEWT3D/PDF/PRJCTILE.PDF > > -Beau > > On 3/10/10 10:49 AM, Jon Watte wrote: > > I'm looking for a closed form solution for a differential equation. I > > did pass this stuff 20 years ago, but was more interested in graph > > theory, discrete math and DSP, so it's all vanished from my brain :-) > > > > The equation is given a point mass that leaves a start position with a > > start velocity. On this point mass is acting a fixed gravitational > > force (in a fixed direction), as well as a linear and quadratic > > motion-opposed force (air drag) based on a linear and quadratic > > coefficient of air drag. So far, it's pretty much your standard > > "cannonball" equation (although I'd really appreciate a convenient > > reference for this solution, too). However, in this case, I also want > > to make the drag coefficients a linear function of time -- > > drag(linear, quadratic) = const(linear, quadratic) + factor(linear, > > quadratic) * time. > > > > If someone could plug this into Mathematica (or look it up in a handy > > formula reference), I'd really appreciate it. If someone could take > > the time to point at the proper online reference, that'd be wonderful, > > too! > > > > Sincerely, > > > > jw > > > > > > -- > > Americans might object: there is no way we would sacrifice our living > > standards for the benefit of people in the rest of the world. > > Nevertheless, whether we get there willingly or not, we shall soon > > have lower consumption rates, because our present rates are > > unsustainable. > > > > > > > ------------------------------------------------------------------------------ > > Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > > > > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDA...@li... > > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > > Archives: > > > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |
From: Beau A. <alb...@cy...> - 2010-03-11 02:01:50
|
Perhaps this might help? http://www.scar.utoronto.ca/~pat/fun/NEWT3D/PDF/PRJCTILE.PDF -Beau On 3/10/10 10:49 AM, Jon Watte wrote: > I'm looking for a closed form solution for a differential equation. I > did pass this stuff 20 years ago, but was more interested in graph > theory, discrete math and DSP, so it's all vanished from my brain :-) > > The equation is given a point mass that leaves a start position with a > start velocity. On this point mass is acting a fixed gravitational > force (in a fixed direction), as well as a linear and quadratic > motion-opposed force (air drag) based on a linear and quadratic > coefficient of air drag. So far, it's pretty much your standard > "cannonball" equation (although I'd really appreciate a convenient > reference for this solution, too). However, in this case, I also want > to make the drag coefficients a linear function of time -- > drag(linear, quadratic) = const(linear, quadratic) + factor(linear, > quadratic) * time. > > If someone could plug this into Mathematica (or look it up in a handy > formula reference), I'd really appreciate it. If someone could take > the time to point at the proper online reference, that'd be wonderful, > too! > > Sincerely, > > jw > > > -- > Americans might object: there is no way we would sacrifice our living > standards for the benefit of people in the rest of the world. > Nevertheless, whether we get there willingly or not, we shall soon > have lower consumption rates, because our present rates are > unsustainable. > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |