gdalgorithms-list Mailing List for Game Dev Algorithms (Page 5)
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: Joel B <one...@ea...> - 2011-08-11 16:17:23
|
Hi Graham, www.cs.virginia.edu/~asb/teaching/cs445-fall06/slides/09-rasterization.ppt Thanks, this is a stunningly good PPT presentation. - Joel |
From: Fabian G. <ry...@gm...> - 2011-08-11 08:01:37
|
On 10.08.2011 23:05, Martin Gladnishki wrote: > There are also a number of line rasterizing algorithms that do 2, even 3 > pixels per iteration, i.e. with them you will be able to fill the arrays > faster. Lookup for double-step rasterizing algorithms. > > Also, in my experience the extrema arrays are not needed: for convex > polygons there are only two active edges at a time, therefore you just > need to traverse the poly in clockwise and anti-clockwise order to > switch the active edges until they meet at the maximum Y coordinate. Even for general polygons, the auxiliary arrays aren't necessary; you keep a linked list of active edges sorted by their current x coordinate (in the last processed scanline). This is fairly simple to code (and keep up to date). From there, you just need to count the current winding based on the orientation of active edges. That allows you to implement all popular fill rules. -Fabian |
From: Derek B. <der...@he...> - 2011-08-11 07:21:42
|
Michael Abrash's Mode-X articles in DDJ and Chris Hecker's Game Developer articles on perspective correct texture mapping should be required reading for anybody interested in this kind of thing. My Google-fu failed to turn up Abrash's articles but it sounds like they were reprinted in his Graphics Programming Black Book special edition. Chris Hecker's series of articles on perspective texture mapping can be found on his website: http://chrishecker.com/Miscellaneous_Technical_Articles#Perspective_Texture_ Mapping Cheers Derek From: Martin Gladnishki [mailto:mgl...@gm...] Sent: Thursday, 11 August 2011 4:05 PM To: Game Development Algorithms Subject: Re: [Algorithms] Draw & fill regular polygon? There are also a number of line rasterizing algorithms that do 2, even 3 pixels per iteration, i.e. with them you will be able to fill the arrays faster. Lookup for double-step rasterizing algorithms. Also, in my experience the extrema arrays are not needed: for convex polygons there are only two active edges at a time, therefore you just need to traverse the poly in clockwise and anti-clockwise order to switch the active edges until they meet at the maximum Y coordinate. Hope that helps further. Cheers, Martin On Wed, Aug 10, 2011 at 6:29 PM, Graham Rhodes ARA/SED <gr...@ar...> wrote: Some helpful Google search terms are "polygon rasterization" and "polygon scan conversion." Someone else mentioned the Foley/van Dam book/et al. book, which is a good reference that describes the classic algorithm. The book Graphics Gems I also has a discussion, though it is brief. You can also find this stuff online, for free. For example, two sets of lecture slides from University of Virginia that look good: http://www.cs.virginia.edu/~gfx/courses/2004/Intro.Fall.04/handouts/11-polys can.pdf <http://www.cs.virginia.edu/%7Egfx/courses/2004/Intro.Fall.04/handouts/11-po lyscan.pdf> www.cs.virginia.edu/~asb/teaching/cs445-fall06/slides/09-rasterization.ppt <http://www.cs.virginia.edu/%7Easb/teaching/cs445-fall06/slides/09-rasteriza tion.ppt> I even found this YouTube video: http://www.youtube.com/watch?v=TNbkX5bYrtE Graham -----Original Message----- From: Joel B [mailto:one...@ea...] Sent: Wednesday, August 10, 2011 7:49 AM To: Game Development Algorithms Subject: [Algorithms] Draw & fill regular polygon? I should know how to do this, but i don't. I only have the ability in my system to draw lines (x1,y1,x2,y2)' to a bitmap, or write to the bitmap as a byte array. Can someone tell me the stepwise procedure to draw a polygon of n sides and then fill it? Having trouble finding anything online that doesn't use pre-existing primitives or libraries. Thanks, Joel Sent from my iPhone ---------------------------------------------------------------------------- -- uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ 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 ---------------------------------------------------------------------------- -- uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ 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: Martin G. <mgl...@gm...> - 2011-08-11 06:05:35
|
There are also a number of line rasterizing algorithms that do 2, even 3 pixels per iteration, i.e. with them you will be able to fill the arrays faster. Lookup for double-step rasterizing algorithms. Also, in my experience the extrema arrays are not needed: for convex polygons there are only two active edges at a time, therefore you just need to traverse the poly in clockwise and anti-clockwise order to switch the active edges until they meet at the maximum Y coordinate. Hope that helps further. Cheers, Martin On Wed, Aug 10, 2011 at 6:29 PM, Graham Rhodes ARA/SED <gr...@ar...>wrote: > Some helpful Google search terms are "polygon rasterization" and "polygon > scan conversion." Someone else mentioned the Foley/van Dam book/et al. book, > which is a good reference that describes the classic algorithm. The book > Graphics Gems I also has a discussion, though it is brief. You can also find > this stuff online, for free. For example, two sets of lecture slides from > University of Virginia that look good: > > > http://www.cs.virginia.edu/~gfx/courses/2004/Intro.Fall.04/handouts/11-polyscan.pdf > www.cs.virginia.edu/~asb/teaching/cs445-fall06/slides/09-rasterization.ppt<http://www.cs.virginia.edu/%7Easb/teaching/cs445-fall06/slides/09-rasterization.ppt> > > I even found this YouTube video: > > http://www.youtube.com/watch?v=TNbkX5bYrtE > > Graham > > -----Original Message----- > From: Joel B [mailto:one...@ea...] > Sent: Wednesday, August 10, 2011 7:49 AM > To: Game Development Algorithms > Subject: [Algorithms] Draw & fill regular polygon? > > I should know how to do this, but i don't. I only have the ability in my > system to draw lines (x1,y1,x2,y2)' to a bitmap, or write to the bitmap as a > byte array. Can someone tell me the stepwise procedure to draw a polygon of > n sides and then fill it? Having trouble finding anything online that > doesn't use pre-existing primitives or libraries. > > Thanks, > > Joel > Sent from my iPhone > > ------------------------------------------------------------------------------ > uberSVN's rich system and user administration capabilities and model > configuration take the hassle out of deploying and managing Subversion and > the tools developers use with it. Learn more about uberSVN and get a free > download at: http://p.sf.net/sfu/wandisco-dev2dev > _______________________________________________ > 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 > > > ------------------------------------------------------------------------------ > uberSVN's rich system and user administration capabilities and model > configuration take the hassle out of deploying and managing Subversion and > the tools developers use with it. Learn more about uberSVN and get a free > download at: http://p.sf.net/sfu/wandisco-dev2dev > _______________________________________________ > 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: Graham R. ARA/S. <gr...@ar...> - 2011-08-10 15:29:37
|
Some helpful Google search terms are "polygon rasterization" and "polygon scan conversion." Someone else mentioned the Foley/van Dam book/et al. book, which is a good reference that describes the classic algorithm. The book Graphics Gems I also has a discussion, though it is brief. You can also find this stuff online, for free. For example, two sets of lecture slides from University of Virginia that look good: http://www.cs.virginia.edu/~gfx/courses/2004/Intro.Fall.04/handouts/11-polyscan.pdf www.cs.virginia.edu/~asb/teaching/cs445-fall06/slides/09-rasterization.ppt I even found this YouTube video: http://www.youtube.com/watch?v=TNbkX5bYrtE Graham -----Original Message----- From: Joel B [mailto:one...@ea...] Sent: Wednesday, August 10, 2011 7:49 AM To: Game Development Algorithms Subject: [Algorithms] Draw & fill regular polygon? I should know how to do this, but i don't. I only have the ability in my system to draw lines (x1,y1,x2,y2)' to a bitmap, or write to the bitmap as a byte array. Can someone tell me the stepwise procedure to draw a polygon of n sides and then fill it? Having trouble finding anything online that doesn't use pre-existing primitives or libraries. Thanks, Joel Sent from my iPhone ------------------------------------------------------------------------------ uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ 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: Jacobo R. <ja...@vj...> - 2011-08-10 15:15:28
|
Hi Joel, Maybe what you're looking for is something like this: http://www.dpfiles.com/dpfileswiki/index.php?title=Tricks_of_the_Windows_Game_Programming_Gurus%2C_Chapter_8:_Vector_Rasterization_and_2D_Transformations#Solid_Filled_Polygons it's from an old book of Andre LaMothe, in this chapter he described how to rasterize poligons with just a pointer to vram. check it out. hope it's usefull. ;) *"It's not that I'm insane, it just happens that I'm very creative with my own sanity"* On Wed, Aug 10, 2011 at 8:21 AM, Richard Fabian <ra...@gm...> wrote: > On 10 August 2011 12:49, Joel B <one...@ea...> wrote: > > I should know how to do this, but i don't. I only have the ability in my > system to draw lines (x1,y1,x2,y2)' to a bitmap, or write to the bitmap as a > byte array. Can someone tell me the stepwise procedure to draw a polygon of > n sides and then fill it? Having trouble finding anything online that > doesn't use pre-existing primitives or libraries. > > > > Thanks, > > > > Joel > > if you already have a line drawing function, then use the code from > that to update a pair of arrays of min/max on the x axis: > > int xmin[SCREEN_HEIGHT] = { SCREEN_WIDTH... } > int xmax[SCREEN_HEIGHT] = { -1... } > > then for each step of your line drawing function update the min/max: > > replace your: put_pixel(x,y,colour) > with: xmin[y] = min(x,xmin[y]); xmax[y] = max(x,xmax[y]); > > Once you have the arrays, it's a simple case of iterating over them > and rendering all pixels between the min and max where the difference > is positive. > > foreach y in SCREEN_HEIGHT: > if( xmax[y] > xmin[y] ) > foreach( x in range( xmin[y], xmax[y] ): > put_pixel( x,y, colour ) > > and you have an untextured triangle. > if you want it textured, don't forget to store only UV values when the > max/min is updated. > > -- > fabs(); > Just because the world is full of people that think just like you, > doesn't mean the other ones can't be right. > > > ------------------------------------------------------------------------------ > uberSVN's rich system and user administration capabilities and model > configuration take the hassle out of deploying and managing Subversion and > the tools developers use with it. Learn more about uberSVN and get a free > download at: http://p.sf.net/sfu/wandisco-dev2dev > _______________________________________________ > 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: Richard F. <ra...@gm...> - 2011-08-10 13:27:33
|
On 10 August 2011 12:49, Joel B <one...@ea...> wrote: > I should know how to do this, but i don't. I only have the ability in my system to draw lines (x1,y1,x2,y2)' to a bitmap, or write to the bitmap as a byte array. Can someone tell me the stepwise procedure to draw a polygon of n sides and then fill it? Having trouble finding anything online that doesn't use pre-existing primitives or libraries. > > Thanks, > > Joel if you already have a line drawing function, then use the code from that to update a pair of arrays of min/max on the x axis: int xmin[SCREEN_HEIGHT] = { SCREEN_WIDTH... } int xmax[SCREEN_HEIGHT] = { -1... } then for each step of your line drawing function update the min/max: replace your: put_pixel(x,y,colour) with: xmin[y] = min(x,xmin[y]); xmax[y] = max(x,xmax[y]); Once you have the arrays, it's a simple case of iterating over them and rendering all pixels between the min and max where the difference is positive. foreach y in SCREEN_HEIGHT: if( xmax[y] > xmin[y] ) foreach( x in range( xmin[y], xmax[y] ): put_pixel( x,y, colour ) and you have an untextured triangle. if you want it textured, don't forget to store only UV values when the max/min is updated. -- fabs(); Just because the world is full of people that think just like you, doesn't mean the other ones can't be right. |
From: Simon F. <sim...@po...> - 2011-08-10 13:04:57
|
Does it have to be online? Foley, van Dam, Feiner and Hughes have plenty of details on scan line rendering. -----Original Message----- From: Joel B [mailto:one...@ea...] Sent: 10 August 2011 12:49 To: Game Development Algorithms Subject: [Algorithms] Draw & fill regular polygon? I should know how to do this, but i don't. I only have the ability in my system to draw lines (x1,y1,x2,y2)' to a bitmap, or write to the bitmap as a byte array. Can someone tell me the stepwise procedure to draw a polygon of n sides and then fill it? Having trouble finding anything online that doesn't use pre-existing primitives or libraries. Thanks, Joel Sent from my iPhone ------------------------------------------------------------------------ ------ uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ 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 |
From: Manuel M. <m.m...@wa...> - 2011-08-10 12:43:01
|
Hi Joel, > I should know how to do this, but i don't. I only have the ability in my > system to draw lines (x1,y1,x2,y2)' to a bitmap, or write to the bitmap as > a byte array. Can someone tell me the stepwise procedure to draw a polygon > of n sides and then fill it? Having trouble finding anything online that > doesn't use pre-existing primitives or libraries. I think the easiest way to fill a convex polygon is to generate horizontal spans, and fill them in. Declare two arrays (e.g. "left" and "right"), which will be used to store the horizontal spans of the polygon. Initialize them with max/min of your datatype. Rasterize each segment on the polygon boundary, by stepping along the y-axis. and store the corresponding x coordinate. Something like: // Caveat: hande horizontal segments, last segment, etc. float dX = (float)(boundary[i+1].x - boundary[i].x)/(boundary[i+1].y - boundary[i].y); float X = boundary[i].x + 0.5; for (int y = boundary[i].y; y < max_y; y++) { X+= dX; left[y] = min(left[y], (int)X); right[y] = max(right[y], (int)X); } Now, fill in the spans: for (y = min_y; y < max_y; y++) for (x = left[y]; x <= right[y]; x++) put_pixel(x, y, color); // Do this via memset instead! hope this helps. Manuel |
From: Joel B <one...@ea...> - 2011-08-10 11:49:34
|
I should know how to do this, but i don't. I only have the ability in my system to draw lines (x1,y1,x2,y2)' to a bitmap, or write to the bitmap as a byte array. Can someone tell me the stepwise procedure to draw a polygon of n sides and then fill it? Having trouble finding anything online that doesn't use pre-existing primitives or libraries. Thanks, Joel Sent from my iPhone |
From: Joel B <one...@ea...> - 2011-08-09 20:20:49
|
Hi Andy, do you have any examples of the algorithm? Is it just a standard Fourier transform and use the waveform output as landscape? - Joel On Aug 9, 2011, at 7:51 AM, Andy Farnell wrote: > > > > An alternative take to random/quasi-stochastic methods I'll mention > an exercise we did with my London undergraduates for a Lunar Lander > terrain. The problem was to make the terrain controllable, in order to > insert plausible landing sites, (or IIRC "defender" well, you might > want to create volatile terrain to nicely hide ground based missle silos) > > Rather than starting with a Perlin source and filtering as Megan suggests, > we found a great way was to Fourier construct with about 5 or 6 sine components. > By setting the frequency and amplitude coefficients the terrain could have > a useful "roughness" parameter, with local consistency, without unexpected > dicontinuities (effectively band limiting the terrain within the frame > resolution) and remain well bounded in height. Compared to a pink or > Perlin source and IIR filter it's swings and roundabouts in terms of cost. > > - Andy > > > On Tue, 9 Aug 2011 07:49:44 -0600 > Megan Fox <sha...@gm...> wrote: > >> I'd also recommend Perlin - once you start mixing high or low passed >> low-frequency Perlin noise with high/low-passed high-frequency noise, you >> get some very, very interesting results. >> >> The key, and what will define your continents and the feel of the resultant >> shape, is the number of layers of noise, and how you scale or cut (high/low >> pass) each layer. >> >> Hugo Elias's page is an oldy, but it has some really great info on this >> topic: http://freespace.virgin.net/hugo.elias/models/m_clouds.htm - that >> page is the one that turned me on to how cool noise could be in the first >> place (my version of his cloud algorithm: >> http://www.youtube.com/watch?v=kHvJqPxXUXM). I realize he's working in a >> slightly different space, but those basic techniques can be applied from a >> side view just as they can from a top-down view. >> >> On Mon, Aug 8, 2011 at 11:34 PM, Marc Hernandez <ma...@gm...> wrote: >> >>> The big revelation for me was that I realized I could use fractals >>> as input functions to other fractals, as well as composing them from >>> adding or multiplying. >>> >>> I tend to start with the standard perlin noise to define the major >>> continents, then use things like rigid multifractal to build mountains >>> into it. >>> From there I use another perlin noise to add smaller hills and >>> valleys, and use yet another to define where to place all those. >>> >>> Here's a 2d example of the output. >>> http://redmine.alephnought.com/projects/cubit/wiki/World#Pretty-pictures >>> I didnt have a terrain renderer yet, so I dont know what the >>> landscape looked like, but I liked the start of it. >>> >>> For something like you're mentioning, I think I might treat it as a >>> strip of a standard 2d heightmap. That way you might get some neat >>> parallax as the ship flys through it. >>> >>> On Mon, Aug 8, 2011 at 8:39 PM, Brennan Rusnell >>> <bre...@gm...> wrote: >>>> I'd recommend using Ridged Multifractals: >>>> >>> https://www.internal.pandromeda.com/engineering/musgrave/unsecure/S01_Course_Notes.html >>>> http://www.ypoart.com/downloads/Musgrave.htm >>>> http://vterrain.org/Elevation/Artificial/ >>>> This is a great book on the topic: >>>> >>> http://books.google.com/books/about/Texturing_modeling.html?id=bDlSJd8GfMcC >>>> Hope this helps. >>>> -- >>>> Brennan Rusnell >>>> >>>> On Mon, Aug 8, 2011 at 7:22 PM, Joel B <one...@ea...> wrote: >>>>> >>>>> Hello, I'm looking for algorithms for generating 2d terrain from a side >>>>> view, like the old Defender game from the 80's, except with mountains >>> grass, >>>>> rocks, lakes etc instead of just lines. >>>>> >>>>> Here is an example of what I have done in Photoshop: >>>>> >>>>> http://img855.imageshack.us/img855/8125/examplelp.png >>>>> >>>>> Anyone on this list have some suggestions? It doesn't have to be real >>>>> time, although that would be interesting too. >>>>> >>>>> - Joel >>>>> >>>>> >>> ------------------------------------------------------------------------------ >>>>> uberSVN's rich system and user administration capabilities and model >>>>> configuration take the hassle out of deploying and managing Subversion >>> and >>>>> the tools developers use with it. Learn more about uberSVN and get a >>> free >>>>> download at: http://p.sf.net/sfu/wandisco-dev2dev >>>>> _______________________________________________ >>>>> 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 >>>> >>>> >>>> >>> ------------------------------------------------------------------------------ >>>> uberSVN's rich system and user administration capabilities and model >>>> configuration take the hassle out of deploying and managing Subversion >>> and >>>> the tools developers use with it. Learn more about uberSVN and get a free >>>> download at: http://p.sf.net/sfu/wandisco-dev2dev >>>> >>>> _______________________________________________ >>>> 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 >>>> >>> >>> >>> >>> -- >>> /// // >>> >>> >>> ------------------------------------------------------------------------------ >>> uberSVN's rich system and user administration capabilities and model >>> configuration take the hassle out of deploying and managing Subversion and >>> the tools developers use with it. Learn more about uberSVN and get a free >>> download at: http://p.sf.net/sfu/wandisco-dev2dev >>> _______________________________________________ >>> 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 >>> >> >> >> >> -- >> Megan Fox >> http://www.glassbottomgames.com/ > > > -- > Andy Farnell <pad...@ob...> > > ------------------------------------------------------------------------------ > uberSVN's rich system and user administration capabilities and model > configuration take the hassle out of deploying and managing Subversion and > the tools developers use with it. Learn more about uberSVN and get a free > download at: http://p.sf.net/sfu/wandisco-dev2dev > _______________________________________________ > 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: Marc R. <mar...@gm...> - 2011-08-09 17:06:04
|
At the risk of being anal: Hugo's page actually describes value noise and not any flavor of Perlin's gradient noise. From: Megan Fox [mailto:sha...@gm...] Sent: Tuesday, August 09, 2011 3:50 PM To: Game Development Algorithms Subject: Re: [Algorithms] 2D Side Terrain generation I'd also recommend Perlin - once you start mixing high or low passed low-frequency Perlin noise with high/low-passed high-frequency noise, you get some very, very interesting results. The key, and what will define your continents and the feel of the resultant shape, is the number of layers of noise, and how you scale or cut (high/low pass) each layer. Hugo Elias's page is an oldy, but it has some really great info on this topic: http://freespace.virgin.net/hugo.elias/models/m_clouds.htm - that page is the one that turned me on to how cool noise could be in the first place (my version of his cloud algorithm: http://www.youtube.com/watch?v=kHvJqPxXUXM). I realize he's working in a slightly different space, but those basic techniques can be applied from a side view just as they can from a top-down view. On Mon, Aug 8, 2011 at 11:34 PM, Marc Hernandez <ma...@gm...> wrote: The big revelation for me was that I realized I could use fractals as input functions to other fractals, as well as composing them from adding or multiplying. I tend to start with the standard perlin noise to define the major continents, then use things like rigid multifractal to build mountains into it. From there I use another perlin noise to add smaller hills and valleys, and use yet another to define where to place all those. Here's a 2d example of the output. http://redmine.alephnought.com/projects/cubit/wiki/World#Pretty-pictures I didnt have a terrain renderer yet, so I dont know what the landscape looked like, but I liked the start of it. For something like you're mentioning, I think I might treat it as a strip of a standard 2d heightmap. That way you might get some neat parallax as the ship flys through it. On Mon, Aug 8, 2011 at 8:39 PM, Brennan Rusnell <bre...@gm...> wrote: > I'd recommend using Ridged Multifractals: > https://www.internal.pandromeda.com/engineering/musgrave/unsecure/S01_Course _Notes.html > http://www.ypoart.com/downloads/Musgrave.htm > http://vterrain.org/Elevation/Artificial/ > This is a great book on the topic: > http://books.google.com/books/about/Texturing_modeling.html?id=bDlSJd8GfMcC > Hope this helps. > -- > Brennan Rusnell > > On Mon, Aug 8, 2011 at 7:22 PM, Joel B <one...@ea...> wrote: >> >> Hello, I'm looking for algorithms for generating 2d terrain from a side >> view, like the old Defender game from the 80's, except with mountains grass, >> rocks, lakes etc instead of just lines. >> >> Here is an example of what I have done in Photoshop: >> >> http://img855.imageshack.us/img855/8125/examplelp.png >> >> Anyone on this list have some suggestions? It doesn't have to be real >> time, although that would be interesting too. >> >> - Joel >> >> ---------------------------------------------------------------------------- -- >> uberSVN's rich system and user administration capabilities and model >> configuration take the hassle out of deploying and managing Subversion and >> the tools developers use with it. Learn more about uberSVN and get a free >> download at: http://p.sf.net/sfu/wandisco-dev2dev >> _______________________________________________ >> 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 > > > ---------------------------------------------------------------------------- -- > uberSVN's rich system and user administration capabilities and model > configuration take the hassle out of deploying and managing Subversion and > the tools developers use with it. Learn more about uberSVN and get a free > download at: http://p.sf.net/sfu/wandisco-dev2dev > > _______________________________________________ > 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 > -- /// // ---------------------------------------------------------------------------- -- uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ 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 -- Megan Fox http://www.glassbottomgames.com/ |
From: Andy F. <pad...@ob...> - 2011-08-09 15:04:06
|
An alternative take to random/quasi-stochastic methods I'll mention an exercise we did with my London undergraduates for a Lunar Lander terrain. The problem was to make the terrain controllable, in order to insert plausible landing sites, (or IIRC "defender" well, you might want to create volatile terrain to nicely hide ground based missle silos) Rather than starting with a Perlin source and filtering as Megan suggests, we found a great way was to Fourier construct with about 5 or 6 sine components. By setting the frequency and amplitude coefficients the terrain could have a useful "roughness" parameter, with local consistency, without unexpected dicontinuities (effectively band limiting the terrain within the frame resolution) and remain well bounded in height. Compared to a pink or Perlin source and IIR filter it's swings and roundabouts in terms of cost. - Andy On Tue, 9 Aug 2011 07:49:44 -0600 Megan Fox <sha...@gm...> wrote: > I'd also recommend Perlin - once you start mixing high or low passed > low-frequency Perlin noise with high/low-passed high-frequency noise, you > get some very, very interesting results. > > The key, and what will define your continents and the feel of the resultant > shape, is the number of layers of noise, and how you scale or cut (high/low > pass) each layer. > > Hugo Elias's page is an oldy, but it has some really great info on this > topic: http://freespace.virgin.net/hugo.elias/models/m_clouds.htm - that > page is the one that turned me on to how cool noise could be in the first > place (my version of his cloud algorithm: > http://www.youtube.com/watch?v=kHvJqPxXUXM). I realize he's working in a > slightly different space, but those basic techniques can be applied from a > side view just as they can from a top-down view. > > On Mon, Aug 8, 2011 at 11:34 PM, Marc Hernandez <ma...@gm...> wrote: > > > The big revelation for me was that I realized I could use fractals > > as input functions to other fractals, as well as composing them from > > adding or multiplying. > > > > I tend to start with the standard perlin noise to define the major > > continents, then use things like rigid multifractal to build mountains > > into it. > > From there I use another perlin noise to add smaller hills and > > valleys, and use yet another to define where to place all those. > > > > Here's a 2d example of the output. > > http://redmine.alephnought.com/projects/cubit/wiki/World#Pretty-pictures > > I didnt have a terrain renderer yet, so I dont know what the > > landscape looked like, but I liked the start of it. > > > > For something like you're mentioning, I think I might treat it as a > > strip of a standard 2d heightmap. That way you might get some neat > > parallax as the ship flys through it. > > > > On Mon, Aug 8, 2011 at 8:39 PM, Brennan Rusnell > > <bre...@gm...> wrote: > > > I'd recommend using Ridged Multifractals: > > > > > https://www.internal.pandromeda.com/engineering/musgrave/unsecure/S01_Course_Notes.html > > > http://www.ypoart.com/downloads/Musgrave.htm > > > http://vterrain.org/Elevation/Artificial/ > > > This is a great book on the topic: > > > > > http://books.google.com/books/about/Texturing_modeling.html?id=bDlSJd8GfMcC > > > Hope this helps. > > > -- > > > Brennan Rusnell > > > > > > On Mon, Aug 8, 2011 at 7:22 PM, Joel B <one...@ea...> wrote: > > >> > > >> Hello, I'm looking for algorithms for generating 2d terrain from a side > > >> view, like the old Defender game from the 80's, except with mountains > > grass, > > >> rocks, lakes etc instead of just lines. > > >> > > >> Here is an example of what I have done in Photoshop: > > >> > > >> http://img855.imageshack.us/img855/8125/examplelp.png > > >> > > >> Anyone on this list have some suggestions? It doesn't have to be real > > >> time, although that would be interesting too. > > >> > > >> - Joel > > >> > > >> > > ------------------------------------------------------------------------------ > > >> uberSVN's rich system and user administration capabilities and model > > >> configuration take the hassle out of deploying and managing Subversion > > and > > >> the tools developers use with it. Learn more about uberSVN and get a > > free > > >> download at: http://p.sf.net/sfu/wandisco-dev2dev > > >> _______________________________________________ > > >> 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 > > > > > > > > > > > ------------------------------------------------------------------------------ > > > uberSVN's rich system and user administration capabilities and model > > > configuration take the hassle out of deploying and managing Subversion > > and > > > the tools developers use with it. Learn more about uberSVN and get a free > > > download at: http://p.sf.net/sfu/wandisco-dev2dev > > > > > > _______________________________________________ > > > 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 > > > > > > > > > > > -- > > /// // > > > > > > ------------------------------------------------------------------------------ > > uberSVN's rich system and user administration capabilities and model > > configuration take the hassle out of deploying and managing Subversion and > > the tools developers use with it. Learn more about uberSVN and get a free > > download at: http://p.sf.net/sfu/wandisco-dev2dev > > _______________________________________________ > > 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 > > > > > > -- > Megan Fox > http://www.glassbottomgames.com/ -- Andy Farnell <pad...@ob...> |
From: Megan F. <sha...@gm...> - 2011-08-09 13:50:12
|
I'd also recommend Perlin - once you start mixing high or low passed low-frequency Perlin noise with high/low-passed high-frequency noise, you get some very, very interesting results. The key, and what will define your continents and the feel of the resultant shape, is the number of layers of noise, and how you scale or cut (high/low pass) each layer. Hugo Elias's page is an oldy, but it has some really great info on this topic: http://freespace.virgin.net/hugo.elias/models/m_clouds.htm - that page is the one that turned me on to how cool noise could be in the first place (my version of his cloud algorithm: http://www.youtube.com/watch?v=kHvJqPxXUXM). I realize he's working in a slightly different space, but those basic techniques can be applied from a side view just as they can from a top-down view. On Mon, Aug 8, 2011 at 11:34 PM, Marc Hernandez <ma...@gm...> wrote: > The big revelation for me was that I realized I could use fractals > as input functions to other fractals, as well as composing them from > adding or multiplying. > > I tend to start with the standard perlin noise to define the major > continents, then use things like rigid multifractal to build mountains > into it. > From there I use another perlin noise to add smaller hills and > valleys, and use yet another to define where to place all those. > > Here's a 2d example of the output. > http://redmine.alephnought.com/projects/cubit/wiki/World#Pretty-pictures > I didnt have a terrain renderer yet, so I dont know what the > landscape looked like, but I liked the start of it. > > For something like you're mentioning, I think I might treat it as a > strip of a standard 2d heightmap. That way you might get some neat > parallax as the ship flys through it. > > On Mon, Aug 8, 2011 at 8:39 PM, Brennan Rusnell > <bre...@gm...> wrote: > > I'd recommend using Ridged Multifractals: > > > https://www.internal.pandromeda.com/engineering/musgrave/unsecure/S01_Course_Notes.html > > http://www.ypoart.com/downloads/Musgrave.htm > > http://vterrain.org/Elevation/Artificial/ > > This is a great book on the topic: > > > http://books.google.com/books/about/Texturing_modeling.html?id=bDlSJd8GfMcC > > Hope this helps. > > -- > > Brennan Rusnell > > > > On Mon, Aug 8, 2011 at 7:22 PM, Joel B <one...@ea...> wrote: > >> > >> Hello, I'm looking for algorithms for generating 2d terrain from a side > >> view, like the old Defender game from the 80's, except with mountains > grass, > >> rocks, lakes etc instead of just lines. > >> > >> Here is an example of what I have done in Photoshop: > >> > >> http://img855.imageshack.us/img855/8125/examplelp.png > >> > >> Anyone on this list have some suggestions? It doesn't have to be real > >> time, although that would be interesting too. > >> > >> - Joel > >> > >> > ------------------------------------------------------------------------------ > >> uberSVN's rich system and user administration capabilities and model > >> configuration take the hassle out of deploying and managing Subversion > and > >> the tools developers use with it. Learn more about uberSVN and get a > free > >> download at: http://p.sf.net/sfu/wandisco-dev2dev > >> _______________________________________________ > >> 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 > > > > > > > ------------------------------------------------------------------------------ > > uberSVN's rich system and user administration capabilities and model > > configuration take the hassle out of deploying and managing Subversion > and > > the tools developers use with it. Learn more about uberSVN and get a free > > download at: http://p.sf.net/sfu/wandisco-dev2dev > > > > _______________________________________________ > > 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 > > > > > > -- > /// // > > > ------------------------------------------------------------------------------ > uberSVN's rich system and user administration capabilities and model > configuration take the hassle out of deploying and managing Subversion and > the tools developers use with it. Learn more about uberSVN and get a free > download at: http://p.sf.net/sfu/wandisco-dev2dev > _______________________________________________ > 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 > -- Megan Fox http://www.glassbottomgames.com/ |
From: Marc H. <ma...@gm...> - 2011-08-09 05:34:54
|
The big revelation for me was that I realized I could use fractals as input functions to other fractals, as well as composing them from adding or multiplying. I tend to start with the standard perlin noise to define the major continents, then use things like rigid multifractal to build mountains into it. From there I use another perlin noise to add smaller hills and valleys, and use yet another to define where to place all those. Here's a 2d example of the output. http://redmine.alephnought.com/projects/cubit/wiki/World#Pretty-pictures I didnt have a terrain renderer yet, so I dont know what the landscape looked like, but I liked the start of it. For something like you're mentioning, I think I might treat it as a strip of a standard 2d heightmap. That way you might get some neat parallax as the ship flys through it. On Mon, Aug 8, 2011 at 8:39 PM, Brennan Rusnell <bre...@gm...> wrote: > I'd recommend using Ridged Multifractals: > https://www.internal.pandromeda.com/engineering/musgrave/unsecure/S01_Course_Notes.html > http://www.ypoart.com/downloads/Musgrave.htm > http://vterrain.org/Elevation/Artificial/ > This is a great book on the topic: > http://books.google.com/books/about/Texturing_modeling.html?id=bDlSJd8GfMcC > Hope this helps. > -- > Brennan Rusnell > > On Mon, Aug 8, 2011 at 7:22 PM, Joel B <one...@ea...> wrote: >> >> Hello, I'm looking for algorithms for generating 2d terrain from a side >> view, like the old Defender game from the 80's, except with mountains grass, >> rocks, lakes etc instead of just lines. >> >> Here is an example of what I have done in Photoshop: >> >> http://img855.imageshack.us/img855/8125/examplelp.png >> >> Anyone on this list have some suggestions? It doesn't have to be real >> time, although that would be interesting too. >> >> - Joel >> >> ------------------------------------------------------------------------------ >> uberSVN's rich system and user administration capabilities and model >> configuration take the hassle out of deploying and managing Subversion and >> the tools developers use with it. Learn more about uberSVN and get a free >> download at: http://p.sf.net/sfu/wandisco-dev2dev >> _______________________________________________ >> 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 > > > ------------------------------------------------------------------------------ > uberSVN's rich system and user administration capabilities and model > configuration take the hassle out of deploying and managing Subversion and > the tools developers use with it. Learn more about uberSVN and get a free > download at: http://p.sf.net/sfu/wandisco-dev2dev > > _______________________________________________ > 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: Joel B <one...@ea...> - 2011-08-09 04:46:11
|
Thanks very much for the suggestions! - Joel |
From: Brennan R. <bre...@gm...> - 2011-08-09 03:40:14
|
I'd recommend using Ridged Multifractals: https://www.internal.pandromeda.com/engineering/musgrave/unsecure/S01_Course_Notes.html http://www.ypoart.com/downloads/Musgrave.htm http://vterrain.org/Elevation/Artificial/ This is a great book on the topic: http://books.google.com/books/about/Texturing_modeling.html?id=bDlSJd8GfMcC Hope this helps. -- Brennan Rusnell On Mon, Aug 8, 2011 at 7:22 PM, Joel B <one...@ea...> wrote: > Hello, I'm looking for algorithms for generating 2d terrain from a side > view, like the old Defender game from the 80's, except with mountains grass, > rocks, lakes etc instead of just lines. > > Here is an example of what I have done in Photoshop: > > http://img855.imageshack.us/img855/8125/examplelp.png > > Anyone on this list have some suggestions? It doesn't have to be real time, > although that would be interesting too. > > - Joel > > ------------------------------------------------------------------------------ > uberSVN's rich system and user administration capabilities and model > configuration take the hassle out of deploying and managing Subversion and > the tools developers use with it. Learn more about uberSVN and get a free > download at: http://p.sf.net/sfu/wandisco-dev2dev > _______________________________________________ > 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: Joel B <one...@ea...> - 2011-08-09 02:22:12
|
Hello, I'm looking for algorithms for generating 2d terrain from a side view, like the old Defender game from the 80's, except with mountains grass, rocks, lakes etc instead of just lines. Here is an example of what I have done in Photoshop: http://img855.imageshack.us/img855/8125/examplelp.png Anyone on this list have some suggestions? It doesn't have to be real time, although that would be interesting too. - Joel |
From: <mjo...@gm...> - 2011-05-23 06:35:01
|
Hey Game, you won't have to worry about your credit card debt anymore http://michiganrestaurantreviews.com/redirect.php?to=aHR0cDovL3d3dy5jbmJjNy5jb20vP3BpZD0yNDI5MDE= |
From: Sébastien L. <seb...@do...> - 2011-04-04 11:06:40
|
Hello all, I actually try to reimplement the algorithm given in the following paper about filtering cubemap. http://developer.amd.com/media/gpu_assets/Isidoro-CubeMapFiltering.pdf But adapted to cosine power function. My goal is to get the right blurred cubemap for a given specular lobe for the phong lighting model. This is actually what allow HDRShop for the latlong environment format. But here I want a fast version directly from cubemap (HDRShop is slow - I suppose it used only brute force). I already implement the algorithm for cubemap, taking count of solid angle and get the same result as HDRShop but faster with the tricks provided (Precompute solid angle and direction vector in a lookup cubemap). The algorithm looks like as follow foreach(face) { for(INT Y = 0; Y < Size; Y++) for(INT X = 0; X < Size; X++) { Wp = GetCubeDirection() IrradianceAtThisTexel = Integral(Wp) } } Integral(Wp) { foreach(face) for(INT Y = 0; Y < Size; Y++) for(INT X = 0; X < Size; X++) { Wi = GetCubeDirection() DotWiWp = dot(Wi,Wp); LobeShape = pow(DotWiWp, SpecularPower); WeightSum += LobeShape * SolidAngleForThisTexel; Irradiance = RadianceFromCubemap * DotWiWp * SolidAngleForThisTexel; Sum += Irradiance * LobeShape; } return Sum /= WeightSum; } Now I try to implement the second optimization: "Determine bounding box regions for angular extent in each face on input cubemap." But I a am little lost in math. I understand that I need to take the solid angle sustented by the specular lobe then convert it to "cubemap region" and return the bounding box of this region for each face but I don't know how to do that. I googling for this topic but still not get good reference. If someone can give me pointer or can explain me how to get the solid angle of specular lobe, and how to projected it on face, I would much appreciate. Thank you Lagarde Sébastien |
From: Jon W. <jw...@gm...> - 2011-04-02 00:49:56
|
On Fri, Apr 1, 2011 at 1:41 AM, Jamie Fowlston <ja...@qu...> wrote: > On 01/04/2011 04:00, Jon Watte wrote: > > > It's possible to hack with things like "assumed velocity" being > > remembered at the beginning of the time step -- do you have any thoughts > > on possibly better solutions? > > > nasty situations Just Worked with no special cases (Newton's cradle was > a favourite). > > That actually brings up another favorite topic: conservation of momentum when it's a body/body collision instead of a body/world collision. That, too, needs to be updated to use the "pre-removal" velocities for calculation. In the end, what I got at the time was one step where the objects were "touching," but the correct relative velocities/spins were applied so that the next step, the right bounce/spin/movement happened. Sincerely, jw |
From: Paul F. <pa...@wi...> - 2011-04-01 08:42:13
|
> This is pretty cool! Thanks for sharing. No probs :) > What I've found when doing the "remove velocity" thing in the past (sweeping > spheres against trimeshes, mostly), is that the amount of bounce you get (if > you have >0 restitution) varies randomly. The reason being that "almost all" > versus "almost none" of the velocity will be removed for any given timestep, > depending on how soon within the timestep the object will intersect the > target. I have to admit, i've never tried this solution with a physics engine which supported non zero restitution - none of the games i've worked on have called for it :) > It's possible to hack with things like "assumed velocity" being remembered > at the beginning of the time step -- do you have any thoughts on possibly > better solutions? I not totally sure - you could always calculate what the 'restitution portion' of the resulting velocity would have been and then just add that back on as a target in the constraint solver, but i've no idea if that would actually work :) > (There's also the discontinuity in motion from removing a random amount of > time, but as you say -- you gotta stop somewhere ;-) It ends up being less of a discontinuity and more like a relaxation of the response over a couple of frames - the more iterations you run, the more resolved the final solution as ever :) Cheers, Paul. -- Paul Firth http://www.wildbunny.co.uk http://www.facebook.com/WildbunnyLtd email: pa...@wi... |
From: Jamie F. <ja...@qu...> - 2011-04-01 08:41:46
|
On 01/04/2011 04:00, Jon Watte wrote: > This is pretty cool! Thanks for sharing. > What I've found when doing the "remove velocity" thing in the past > (sweeping spheres against trimeshes, mostly), is that the amount of > bounce you get (if you have >0 restitution) varies randomly. The reason > being that "almost all" versus "almost none" of the velocity will be > removed for any given timestep, depending on how soon within the > timestep the object will intersect the target. > It's possible to hack with things like "assumed velocity" being > remembered at the beginning of the time step -- do you have any thoughts > on possibly better solutions? > (There's also the discontinuity in motion from removing a random amount > of time, but as you say -- you gotta stop somewhere ;-) I did stuff that looked a lot like this some years ago, off the back of the Jakobsen Hitman physics paper. It's pretty easy to eliminate the discontinuity and get the bounce right for this sort of simple collision... I spent a lot more time generalizing the solution to 3D bodies (with constraints?), and I can't honestly remember if I got all the way there... have some notes somewhere.... But it all worked really surprisingly well in a number of tests. Lots of nasty situations Just Worked with no special cases (Newton's cradle was a favourite). But if I read Paul's article correctly, the whole point of his Speculative Contacts approach is to make sure the objects are perfectly in contact at the start of the next frame. And, like you say, there'll be artefacts from that.... The way we did it way back when, it stabilized pretty decently in the first place without that... so what am I missing? :) May be rambling, not nearly enough sleep! Jamie > 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 28, 2011 at 12:27 PM, Paul Firth <pa...@wi... > <mailto:pa...@wi...>> wrote: > > Hi guys, > > Just thought i'd post this here in case you've not already seen the > article in the thread on gamdev.net <http://gamdev.net/>: > > http://www.wildbunny.co.uk/blog/2011/03/25/speculative-contacts-an-continuous-collision-engine-approach-part-1/ > > Its my blog post on a new collision detection technique as seen in > games such as Little Big Planet... > > Hope you enjoy it :) > > Cheers, Paul. > > -- > Paul Firth > http://www.wildbunny.co.uk <http://www.wildbunny.co.uk/> > http://www.facebook.com/WildbunnyLtd > email: pa...@wi... <mailto:pa...@wi...> |
From: Jon W. <jw...@gm...> - 2011-04-01 03:00:41
|
This is pretty cool! Thanks for sharing. What I've found when doing the "remove velocity" thing in the past (sweeping spheres against trimeshes, mostly), is that the amount of bounce you get (if you have >0 restitution) varies randomly. The reason being that "almost all" versus "almost none" of the velocity will be removed for any given timestep, depending on how soon within the timestep the object will intersect the target. It's possible to hack with things like "assumed velocity" being remembered at the beginning of the time step -- do you have any thoughts on possibly better solutions? (There's also the discontinuity in motion from removing a random amount of time, but as you say -- you gotta stop somewhere ;-) 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 28, 2011 at 12:27 PM, Paul Firth <pa...@wi...> wrote: > Hi guys, > > Just thought i'd post this here in case you've not already seen the > article in the thread on gamdev.net: > > > http://www.wildbunny.co.uk/blog/2011/03/25/speculative-contacts-an-continuous-collision-engine-approach-part-1/ > > Its my blog post on a new collision detection technique as seen in > games such as Little Big Planet... > > Hope you enjoy it :) > > Cheers, Paul. > > -- > Paul Firth > http://www.wildbunny.co.uk > http://www.facebook.com/WildbunnyLtd > email: pa...@wi... > > > ------------------------------------------------------------------------------ > Create and publish websites with WebMatrix > Use the most popular FREE web apps or write code yourself; > WebMatrix provides all the features you need to develop and publish > your website. http://p.sf.net/sfu/ms-webmatrix-sf > _______________________________________________ > 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: Paul F. <pa...@wi...> - 2011-03-28 19:27:09
|
Hi guys, Just thought i'd post this here in case you've not already seen the article in the thread on gamdev.net: http://www.wildbunny.co.uk/blog/2011/03/25/speculative-contacts-an-continuous-collision-engine-approach-part-1/ Its my blog post on a new collision detection technique as seen in games such as Little Big Planet... Hope you enjoy it :) Cheers, Paul. -- Paul Firth http://www.wildbunny.co.uk http://www.facebook.com/WildbunnyLtd email: pa...@wi... |