gdalgorithms-list Mailing List for Game Dev Algorithms (Page 36)
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: Jose M. <jos...@ya...> - 2009-05-05 18:24:02
|
Thank you very much, Eric! Very usefull tips... ________________________________ De: Eric Haines <eri...@gm...> Para: Game Development Algorithms <gda...@li...> Enviadas: Terça-feira, 5 de Maio de 2009 15:03:04 Assunto: Re: [Algorithms] Simple algorithm for regular polygon union [Trying again, since I moved my email address and my reply got filtered out.] I don't know of a "stripped down" union library for this particular problem. It sounds like you've already found some of these, but the best page I know that lists a few 2D polygon union packages is the one linked from Jeremy's: http://www.cs.man.ac.uk/~toby/alan/software/links.html. Eberly's had the least restrictive licensing, though wasn't particularly efficient (but gave solid results - he uses exact integer arithmetic). I've used this package in shipping software, it works well. I found most of the other packages listed had "For non-commercial use only" or other limitations, which was annoying. The Eberly link from the GPC page is broken, and you'll have to dig on Eberly's site a bit for the code: Classes here, and paper on his algorithm at the bottom: http://www.geometrictools.com/LibFoundation/ComputationalGeometry/ComputationalGeometry.html Actual code here: http://www.geometrictools.com/SampleFoundation/Boolean2D/Boolean2D.html Eric On Tue, May 5, 2009 at 1:48 PM, Jeremy <jsw...@gm...> wrote: Something like this? http://www.cs.man.ac.uk/~toby/alan/software/gpc.html On Tue, May 5, 2009 at 9:30 AM, Jose Marin <jos...@ya...> wrote: Hi, I have found some libraries in the net to perform polygon operations, but I need a very simple one: union of closed convex polygons. Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com |
|
From: Eric H. <eri...@gm...> - 2009-05-05 18:03:15
|
[Trying again, since I moved my email address and my reply got filtered out.] I don't know of a "stripped down" union library for this particular problem. It sounds like you've already found some of these, but the best page I know that lists a few 2D polygon union packages is the one linked from Jeremy's: http://www.cs.man.ac.uk/~toby/alan/software/links.html. Eberly's had the least restrictive licensing, though wasn't particularly efficient (but gave solid results - he uses exact integer arithmetic). I've used this package in shipping software, it works well. I found most of the other packages listed had "For non-commercial use only" or other limitations, which was annoying. The Eberly link from the GPC page is broken, and you'll have to dig on Eberly's site a bit for the code: Classes here, and paper on his algorithm at the bottom: http://www.geometrictools.com/LibFoundation/ComputationalGeometry/ComputationalGeometry.html Actual code here: http://www.geometrictools.com/SampleFoundation/Boolean2D/Boolean2D.html Eric On Tue, May 5, 2009 at 1:48 PM, Jeremy <jsw...@gm...> wrote: > Something like this? http://www.cs.man.ac.uk/~toby/alan/software/gpc.html > > > > On Tue, May 5, 2009 at 9:30 AM, Jose Marin <jos...@ya...>wrote: > >> >> Hi, >> >> I have found some libraries in the net to perform polygon operations, but >> I need a very simple one: union of closed convex polygons. >> > |
|
From: Jose M. <jos...@ya...> - 2009-05-05 18:02:21
|
Yes, but looks like that lib have some restrictions for commercial use. ________________________________ De: Jeremy <jsw...@gm...> Para: Game Development Algorithms <gda...@li...> Enviadas: Terça-feira, 5 de Maio de 2009 14:48:13 Assunto: Re: [Algorithms] Simple algorithm for regular polygon union Something like this? http://www.cs.man.ac.uk/~toby/alan/software/gpc.html On Tue, May 5, 2009 at 9:30 AM, Jose Marin <jos...@ya...> wrote: Hi, I have found some libraries in the net to perform polygon operations, but I need a very simple one: union of closed convex polygons. Do you know any? Thank you. Jose Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ 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 Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com |
|
From: Jeremy <jsw...@gm...> - 2009-05-05 17:48:18
|
Something like this? http://www.cs.man.ac.uk/~toby/alan/software/gpc.html On Tue, May 5, 2009 at 9:30 AM, Jose Marin <jos...@ya...> wrote: > > Hi, > > I have found some libraries in the net to perform polygon operations, but I > need a very simple one: union of closed convex polygons. > > Do you know any? > > Thank you. > > Jose > > > Veja quais são os assuntos do momento no Yahoo! +Buscados > http://br.maisbuscados.yahoo.com > > > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK > i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > 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: Jose M. <jos...@ya...> - 2009-05-05 16:30:48
|
Hi,
I have found some libraries in the net to perform polygon operations, but I need a very simple one: union of closed convex polygons.
Do you know any?
Thank you.
Jose
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com
|
|
From: Alen L. <ale...@cr...> - 2009-05-05 13:56:47
|
Sam wrote at 5/5/2009: > I'm not quite sure what you mean by diffuse radiance? Eh, sorry. This radiometry terminology always gets somehow mixed up in my head. :) I was refering to irradiance, whereas I think that method of testing would work e.g. for incoming radiance. > If you start with a SH function in a cube map (say, an L1 term), > "do your thing" to get it into SH, and then regenerate a cube map > (or similar) from your generated SH data you can still check whether > it's correct as the end result should just be a scaled version of > the original. The scaling should depend on which of the 3 of the > above you are working with in the "do your thing" step. Am I wrong to think that the difference is not just a scaler in some of those cases? When trying to get irradiance SH from a cubemap which represents radiance, I'm convolving not just by the SH, but also by clamped cosine. When convolving with cosine, I'm effectively generating a "blurry" SH from a "non-blurry" cubemap. Converting that "blurry" SH into a cubemap will generate a "blurry" cubemap, which cannot be easily compared to the "non-blurry" original (save for doing O(P^2) convolution in the cubemap space and comparing to that). I'm not very proficient with SHs, so it's all a bit hand-wavy on my side, but... Such test passes if I use the c0-c4 coefficients as intended for irradiance (without the 2/3 and 1/4 parts), but not if I use the coefficients that incorporate cosine convolution (those with 2/3 and 1/4). This leads me to believe that my hunch makes sense. Granted, I could generate a cubemap from synthetic SHs, convolve them back and check that the result is exactly different by the 2/3 and 1/4 factors in the correct places. But I fear it kind of defeats the purpose of testing. > If it's radiance it should be exactly the same, if it's irradiance > it should be scaled by the cosine terms (see the ramamoorthi paper) > and if it's exit radiance it'll be the irradiance * albedo. > Even if you ignore scaling you should still be able to check that if > you put a single SH term in you get a single SH term back - all > other terms should remain 0. That passes. But it seems like (and is intuitive to be that way) this kind of test covers only existence of correct x/y/z powers in the polynomials. Putting any coefficients in front passes the test. (E.g. if c0-c4 are all 1, this test passes.) Or am I missing something? In general I'd be very happy if I could test whether the convolution actually generates SHs that are equivalent (to within approximation error) to the source cubemap _with_ cosine term already included. I guess there is no other way than to convolve the old-fashioned way? Thanks, Alen |
|
From: Sam M. <sam...@ge...> - 2009-05-05 12:10:13
|
Hi Alen, I'm not quite sure what you mean by diffuse radiance? There are roughly 3 diffuse values that I think about: - incoming radiance (ie. an environment cube map) - irradiance (ie. a blurry cube map: the radiance convolved with the cosine) - exit radiance (ie. irradiance multiplied by the surface albedo) I definitely left off those details in my email :) If you start with a SH function in a cube map (say, an L1 term), "do your thing" to get it into SH, and then regenerate a cube map (or similar) from your generated SH data you can still check whether it's correct as the end result should just be a scaled version of the original. The scaling should depend on which of the 3 of the above you are working with in the "do your thing" step. If it's radiance it should be exactly the same, if it's irradiance it should be scaled by the cosine terms (see the ramamoorthi paper) and if it's exit radiance it'll be the irradiance * albedo. Even if you ignore scaling you should still be able to check that if you put a single SH term in you get a single SH term back - all other terms should remain 0. Cheers, Sam -----Original Message----- From: Alen Ladavac [mailto:ale...@cr...] Sent: Tue 05/05/2009 09:56 To: Sam Martin Cc: Game Development Algorithms Subject: Re: [Algorithms] Undershooting in spherical harmonics generated bycubemap convolution Sam wrote at 4/28/2009: >> Do you mean to generate a cubemap by evaluating SHs with synthetic >> values like (1, 0, 0,..., 0) and see if they transform back to >> themselves? Sounds interesting. Will have to try that. > Yep, exactly. You can turn this into a proper unit test. Unfortunately, it seems that this is not a correct test for my case. Perhaps I haven't specifically mentioned a "slight" detail: this used to specify diffuse radiance, not irradiance. As this includes the cosine term, I believe that such two-way transformation is not possible. Right? Alen |
|
From: Alen L. <ale...@cr...> - 2009-05-05 08:56:30
|
Sam wrote at 4/28/2009: >> Do you mean to generate a cubemap by evaluating SHs with synthetic >> values like (1, 0, 0,..., 0) and see if they transform back to >> themselves? Sounds interesting. Will have to try that. > Yep, exactly. You can turn this into a proper unit test. Unfortunately, it seems that this is not a correct test for my case. Perhaps I haven't specifically mentioned a "slight" detail: this used to specify diffuse radiance, not irradiance. As this includes the cosine term, I believe that such two-way transformation is not possible. Right? Alen |
|
From: Monteleone, N. <nat...@lm...> - 2009-05-04 16:44:00
|
The hard part is figuring out the screen area I want to allow it to live in - the overlay in question is rendered to a texture and then pasted on the terrain. I think I know how to do it though - I know the 2d bound of my overlay. I can combine that with the min/max height of the terrain underneath to get a pretty good bounding box, then project that to screen space like Mr. Watte said. -Nathan -----Original Message----- From: Tom Plunket [mailto:ga...@fa...] Sent: Sunday, May 03, 2009 8:26 PM To: Game Development Algorithms Subject: Re: [Algorithms] Keeping an object's label on the screen > I have to draw some billboard text over some shapes we've "painted" onto > our terrain via multitexturing. Normally this is easy enough - just > plop the label in an auto-rotated billboard and float it above the > center of the geometry. But I need to keep the label on screen at all > times if any part of the painted geometry is visible. I.e. if I have a > square painted on the terrain, but I can only see a small corner of it, > I still need to show the whole label. Draw the text if the object isn't culled. You know where you want the text drawn (if you were to draw onto the center of the object), and if you've got the text rect you can just move it so it's within the screen area you want to allow it to live in. -tom! -- ------------------------------------------------------------------------ ------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ 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: Tom P. <ga...@fa...> - 2009-05-04 01:26:08
|
> I have to draw some billboard text over some shapes we've "painted" onto > our terrain via multitexturing. Normally this is easy enough - just > plop the label in an auto-rotated billboard and float it above the > center of the geometry. But I need to keep the label on screen at all > times if any part of the painted geometry is visible. I.e. if I have a > square painted on the terrain, but I can only see a small corner of it, > I still need to show the whole label. Draw the text if the object isn't culled. You know where you want the text drawn (if you were to draw onto the center of the object), and if you've got the text rect you can just move it so it's within the screen area you want to allow it to live in. -tom! -- |
|
From: Monteleone, N. <nat...@lm...> - 2009-04-29 20:17:38
|
Ok thanks. Using the bounding box like that seems a lot faster than trying to analyze an ID buffer. Not worried about overlapping for now :) -----Original Message----- From: Jon Watte [mailto:jw...@gm...] Sent: Wednesday, April 29, 2009 1:56 PM To: Game Development Algorithms Subject: Re: [Algorithms] Keeping an object's label on the screen Monteleone, Nathan wrote: > > What's a good algorithm to figure out where to draw the label? > In general, this is easy, by projecting the desired location to screen space. However, you can get into situations where a corner is visible on the screen, but the center of the object is behind the camera, which may lead to poorly behaved labels. Just project the corners of the bounding box of the object to screen space; take the average of the corners that are in front of the camera, and project that to screen space. Form the rectangle around that, and clamp that rectangle to screen space to force it onto the screen. If you also want multiple labels to sort themselves out without overlapping, it gets slightly more twisty. Sincerely, jw ------------------------------------------------------------------------ ------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ 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: Monteleone, N. <nat...@lm...> - 2009-04-29 20:17:31
|
Unfortunately the terrain isn't very flat :-( ________________________________ From: Jeff Russell [mailto:je...@8m...] Sent: Wednesday, April 29, 2009 1:43 PM To: Game Development Algorithms Subject: Re: [Algorithms] Keeping an object's label on the screen The idea I had in mind was to do something in screen space... I'd write out an object ID version of the projected texture, apply it, render the terrain geometry into a low-res buffer, then compute min/max screen coords for each object. Then I could just draw my text label in screen space based on that information. Is this a sane approach? Could be, if your object counts are reasonably small. If this is just sections of the terrain we're talking about, and your terrain is at least sort of flat, you could just project the bounds of these shapes into screen space and center your label accordingly. -- -------------------------------------------- Jeff Russell Engineer, 8monkey Labs www.8monkeylabs.com -------------------------------------------- |
|
From: Jon W. <jw...@gm...> - 2009-04-29 18:56:06
|
Monteleone, Nathan wrote: > > What’s a good algorithm to figure out where to draw the label? > In general, this is easy, by projecting the desired location to screen space. However, you can get into situations where a corner is visible on the screen, but the center of the object is behind the camera, which may lead to poorly behaved labels. Just project the corners of the bounding box of the object to screen space; take the average of the corners that are in front of the camera, and project that to screen space. Form the rectangle around that, and clamp that rectangle to screen space to force it onto the screen. If you also want multiple labels to sort themselves out without overlapping, it gets slightly more twisty. Sincerely, jw |
|
From: Jeff R. <je...@8m...> - 2009-04-29 18:43:37
|
*The idea I had in mind was to do something in screen space... I’d write out an object ID version of the projected texture, apply it, render the terrain geometry into a low-res buffer, then compute min/max screen coords for each object. Then I could just draw my text label in screen space based on that information. Is this a sane approach?* Could be, if your object counts are reasonably small. If this is just sections of the terrain we're talking about, and your terrain is at least sort of flat, you could just project the bounds of these shapes into screen space and center your label accordingly. -- -------------------------------------------- Jeff Russell Engineer, 8monkey Labs www.8monkeylabs.com -------------------------------------------- |
|
From: Monteleone, N. <nat...@lm...> - 2009-04-29 18:29:04
|
I have to draw some billboard text over some shapes we've "painted" onto our terrain via multitexturing. Normally this is easy enough - just plop the label in an auto-rotated billboard and float it above the center of the geometry. But I need to keep the label on screen at all times if any part of the painted geometry is visible. I.e. if I have a square painted on the terrain, but I can only see a small corner of it, I still need to show the whole label. What's a good algorithm to figure out where to draw the label? The idea I had in mind was to do something in screen space... I'd write out an object ID version of the projected texture, apply it, render the terrain geometry into a low-res buffer, then compute min/max screen coords for each object. Then I could just draw my text label in screen space based on that information. Is this a sane approach? Otherwise I'd have to create a geometric representation of our shapes that conforms to the terrain and choose a 3d location for my text based on the view frustum. That seems painful to implement efficiently. Thanks, Nathan |
|
From: Nicholas \Indy\ R. <ar...@gm...> - 2009-04-28 20:14:29
|
Last I checked, the SquirrelFish Extreme engine was built comparatively well for embedding in applications other then the browser. Nicholas "Indy" Ray On Tue, Apr 28, 2009 at 9:17 AM, Jon Watte <jw...@gm...> wrote: > Philip Taylor wrote: >> On Tue, Apr 28, 2009 at 5:24 AM, Jon Watte <jw...@gm...> wrote: >> > >> There's JavaScript, which has pretty huge adoption (outside of games), >> >> and all that stuff) it typically runs in), and is designed to be >> embedded into another application and to execute untrusted (often >> malicious) code. >> >> > > Except the available implementations are, by and large, terrible for > embedding -- even worse than Python. Given that JS is found mostly in > web browser, the actual implementations I've seen are all terribly > browser-centric, and not even factored or documented for separate embedding. > > Although V8 looks good -- I hadn't looked at that previously. > > Sincerely, > > jw > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > 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 > <div><br></div> |
|
From: Mike S. <mik...@gm...> - 2009-04-28 20:14:23
|
On Tue, Apr 28, 2009 at 9:17 AM, Jon Watte <jw...@gm...> wrote: > Except the available implementations are, by and large, terrible for > embedding -- even worse than Python. Given that JS is found mostly in > web browser, the actual implementations I've seen are all terribly > browser-centric, and not even factored or documented for separate embedding. Which implementations? The Mozilla JS engine has been embedded in non-browser environments since I started working on it in 1997, and indeed before. V8 is pretty browser-independent as well, not sure about Squirrelfish/Nitro. Mike |
|
From: Jon W. <jw...@gm...> - 2009-04-28 16:18:16
|
Philip Taylor wrote: > On Tue, Apr 28, 2009 at 5:24 AM, Jon Watte <jw...@gm...> wrote: > > There's JavaScript, which has pretty huge adoption (outside of games), > > and all that stuff) it typically runs in), and is designed to be > embedded into another application and to execute untrusted (often > malicious) code. > > Except the available implementations are, by and large, terrible for embedding -- even worse than Python. Given that JS is found mostly in web browser, the actual implementations I've seen are all terribly browser-centric, and not even factored or documented for separate embedding. Although V8 looks good -- I hadn't looked at that previously. Sincerely, jw |
|
From: Philip T. <ex...@gm...> - 2009-04-28 13:55:05
|
On Tue, Apr 28, 2009 at 1:26 PM, Rachel Blum <r....@gm...> wrote: >> >> There's JavaScript, which has pretty huge adoption (outside of games), >> C-like syntax, closures, prototype-based inheritance, active >> communities working on the language spec and on implementations and on >> applications, is reasonably elegant and powerful (see some articles on >> http://www.crockford.com/javascript/), is quite small (the language >> itself, distinct from the web browser environment (with DOM and AJAX >> and all that stuff) it typically runs in), > > The downside: If you want to include additional JavaScript libraries you > have to (as far as I know) resort to the web browser as preprocessor. Which > kind of destroys any idea of modularity. There's no need to get a web browser involved; but you do need your embedding application to provide some functionality, since JS has no built-in API for accessing files or networks. (The core language does arrays, strings, regexps, dates, maths, etc, but little else.) That's pretty trivial - in SpiderMonkey it's a dozen lines of code to define a C function that reads your script library files and passes them to the script evaluation API, and to expose it to scripts so they can call it themselves to load other scripts. The language has no built-in support for concepts like namespacing, but you can use the same tricks that modern web scripting libraries use (e.g. wrapping files in anonymous functions so they don't pollute the global namespace, and then exporting everything as properties of a single namespace-like global value), and you can do some other tricks using the JS engine's embedding API. But I guess this is the wrong list for continuing discussion of such things... -- Philip Taylor ex...@gm... |
|
From: Sam M. <sam...@ge...> - 2009-04-28 13:22:13
|
Hi Alen, > Do you mean to generate a cubemap by evaluating SHs with synthetic > values like (1, 0, 0,..., 0) and see if they transform back to > themselves? Sounds interesting. Will have to try that. Yep, exactly. You can turn this into a proper unit test. > Hm, the current result seems to be of correct brightness so perhaps, > that is not it. Worth noting that the overall brightness is controlled by just the L0 (ambient) value. The others all integrate to zero and just 'add shape' to the signal. So it's possible to get the ambient value correct and the others wrong. If they are too low in general the lighting will be too directionless. If they are too high you exaggerate the shape (and ringing). Btw, if it does turn out to be ringing, the easiest way to reduce this is to simply scale down the L1 and L2 terms :). > When integrating across a cubemap, I use these > coefficients: Off the top of my head, these look ok - the cosine term is the rational on the right hand side. I note they are identical to the Ramamoorthi paper: http://graphics.stanford.edu/papers/envmap/. Did you learn about SH through a different paper to this? If so I'd recommend reading the Ramamoorthi paper in some detail. For one, I just noticed it happens to have some numerical SH values in it for Paul Debevec's light probes, which you can grab online. Cheers, Sam -----Original Message----- From: Alen Ladavac [mailto:ale...@cr...] Sent: 28 April 2009 13:25 To: Sam Martin; Fabian Giesen Cc: Game Development Algorithms Subject: Re: [Algorithms] Undershooting in spherical harmonics generated bycubemap convolution Fabian wrote at 4/28/2009: > The second order SH basis functions aren't (and their symmetries are > rotations by multiplies of 90 degrees, not 180, around the Z axis), > so you'll get undershooting in other places too. That makes sense. Thanks! Sam wrote at 4/28/2009: > - Check your maths and implementation to make sure your coeffs are > scaled appropriately. It can be helpful to project cube maps with the > single SH basis elements in them to ensure you get the coeffs out you > expect and at the right scale. Do you mean to generate a cubemap by evaluating SHs with synthetic values like (1, 0, 0,..., 0) and see if they transform back to themselves? Sounds interesting. Will have to try that. > - Check you are including the scaling for the cosine convolution. If you > are missing it your L2 SH will be too bright and can produce this kind > of artefact. Hm, the current result seems to be of correct brightness so perhaps, that is not it. When integrating across a cubemap, I use these coefficients: static const FLOAT c[5] = { 0.282095f*0.282095f * 1.0f, 0.488603f*0.488603f * 2.0f/3.0f, 1.092548f*1.092548f * 1.0f/4.0f, 0.315392f*0.315392f * 1.0f/4.0f, 0.546274f*0.546274f * 1.0f/4.0f }; in these equations: FLOAT SHC[9] = { c[0], c[1] * v.x, c[1] * v.y, c[1] * v.z, c[2] * v.x * v.z, c[2] * v.z * v.y, c[2] * v.y * v.x, c[3] * (3.0f* v.z*v.z -1.0f), c[4] * (v.x*v.x - v.y*v.y) } integrated over the cube and additionally weight each pixel by differential angle expressed as R^(-3/2) (to compensate for the cube shape). When approximating just one directional light, I use these coefficients: static const FLOAT c[5] = { 0.282095f*0.282095f * PI*16.0f/17.0f * 1.0f, 0.488603f*0.488603f * PI*16.0f/17.0f * 2.0f/3.0f, 1.092548f*1.092548f * PI*16.0f/17.0f * 1.0f/4.0f, 0.315392f*0.315392f * PI*16.0f/17.0f * 1.0f/4.0f, 0.546274f*0.546274f * PI*16.0f/17.0f * 1.0f/4.0f } But that is just a fixed multiplier for all coeficients, and that should be covered as the current brightness seems correct (testing with simple blue/red cubemaps etc.) > - Check for bugs by testing the rotational invariance. Ie. rotate your > cube map and ensure the projection rotates as expected. Checked, seems correct. > I guess you could also test a known cubemap + SH coeffs to compare your > output with other peoples? Sounds like a good idea. Do you know of any such examples? Google didn't find anything useful. Thanks, Alen |
|
From: Rachel B. <r....@gm...> - 2009-04-28 12:27:07
|
> > There's JavaScript, which has pretty huge adoption (outside of games), > C-like syntax, closures, prototype-based inheritance, active > communities working on the language spec and on implementations and on > applications, is reasonably elegant and powerful (see some articles on > http://www.crockford.com/javascript/), is quite small (the language > itself, distinct from the web browser environment (with DOM and AJAX > and all that stuff) it typically runs in), The downside: If you want to include additional JavaScript libraries you have to (as far as I know) resort to the web browser as preprocessor. Which kind of destroys any idea of modularity. I like the language a lot, but this one "feature" kills it outright. If you (the OP) really want a C-like scripting language, see Ch (http://www.softintegration.com/ ) or CINT (http://root.cern.ch/drupal/content/cint) Rachel |
|
From: Alen L. <ale...@cr...> - 2009-04-28 12:24:50
|
Fabian wrote at 4/28/2009:
> The second order SH basis functions aren't (and their symmetries are
> rotations by multiplies of 90 degrees, not 180, around the Z axis),
> so you'll get undershooting in other places too.
That makes sense. Thanks!
Sam wrote at 4/28/2009:
> - Check your maths and implementation to make sure your coeffs are
> scaled appropriately. It can be helpful to project cube maps with the
> single SH basis elements in them to ensure you get the coeffs out you
> expect and at the right scale.
Do you mean to generate a cubemap by evaluating SHs with synthetic
values like (1, 0, 0,..., 0) and see if they transform back to
themselves? Sounds interesting. Will have to try that.
> - Check you are including the scaling for the cosine convolution. If you
> are missing it your L2 SH will be too bright and can produce this kind
> of artefact.
Hm, the current result seems to be of correct brightness so perhaps,
that is not it. When integrating across a cubemap, I use these
coefficients:
static const FLOAT c[5] = {
0.282095f*0.282095f * 1.0f,
0.488603f*0.488603f * 2.0f/3.0f,
1.092548f*1.092548f * 1.0f/4.0f,
0.315392f*0.315392f * 1.0f/4.0f,
0.546274f*0.546274f * 1.0f/4.0f
};
in these equations:
FLOAT SHC[9] = {
c[0],
c[1] * v.x,
c[1] * v.y,
c[1] * v.z,
c[2] * v.x * v.z,
c[2] * v.z * v.y,
c[2] * v.y * v.x,
c[3] * (3.0f* v.z*v.z -1.0f),
c[4] * (v.x*v.x - v.y*v.y)
}
integrated over the cube and additionally weight each pixel by
differential angle expressed as R^(-3/2) (to compensate for the cube
shape).
When approximating just one directional light, I use these
coefficients:
static const FLOAT c[5] = {
0.282095f*0.282095f * PI*16.0f/17.0f * 1.0f,
0.488603f*0.488603f * PI*16.0f/17.0f * 2.0f/3.0f,
1.092548f*1.092548f * PI*16.0f/17.0f * 1.0f/4.0f,
0.315392f*0.315392f * PI*16.0f/17.0f * 1.0f/4.0f,
0.546274f*0.546274f * PI*16.0f/17.0f * 1.0f/4.0f
}
But that is just a fixed multiplier for all coeficients, and that
should be covered as the current brightness seems correct (testing
with simple blue/red cubemaps etc.)
> - Check for bugs by testing the rotational invariance. Ie. rotate your
> cube map and ensure the projection rotates as expected.
Checked, seems correct.
> I guess you could also test a known cubemap + SH coeffs to compare your
> output with other peoples?
Sounds like a good idea. Do you know of any such examples? Google
didn't find anything useful.
Thanks,
Alen
|
|
From: Fabian G. <f.g...@49...> - 2009-04-28 09:16:49
|
Hi Alen, > So to ask a concrete question: Is it normal for SH approximation > errors in such "spiky" cases to generate undershooting in directions > that are not directly opposite to the brightest point? If you look at the basis functions for l=2: http://web.uniovi.es/qcg/harmonics/harmonics.html you should see what's going on. For first order SH, you will indeed only get undershooting in the opposite direction, since all the functions are point-symmetric around zero. The second order SH basis functions aren't (and their symmetries are rotations by multiplies of 90 degrees, not 180, around the Z axis), so you'll get undershooting in other places too. Kind regards, -Fabian Giesen |
|
From: Sam M. <sam...@ge...> - 2009-04-28 09:10:53
|
Hi Alan, SH can suffer from ringing and that really bright sun isn't going to help, but there's a myriad of other things that can go wrong and produce the same problems. Ringing is usually less of a problem for representing irradiance as its low frequency (as opposed to radiance or visibility). >From your description it sounds like you could well have other problems so it's worth ruling those out first. Some suggestions on things to check: - Check your maths and implementation to make sure your coeffs are scaled appropriately. It can be helpful to project cube maps with the single SH basis elements in them to ensure you get the coeffs out you expect and at the right scale. - Check you are including the scaling for the cosine convolution. If you are missing it your L2 SH will be too bright and can produce this kind of artefact. - Check for bugs by testing the rotational invariance. Ie. rotate your cube map and ensure the projection rotates as expected. I guess you could also test a known cubemap + SH coeffs to compare your output with other peoples? Hope that helps, Sam -----Original Message----- From: Alen Ladavac [mailto:ale...@cr...] Sent: 28 April 2009 08:31 To: Game Development Algorithms Subject: [Algorithms] Undershooting in spherical harmonics generated bycubemap convolution Hi all, When generating 2nd order SHs by convolving environment cubemaps, In some rare cases I get some strange artefacts that seem as if that is just a limitation of 2nd order SHs, but I'm not sure, so I figured I'd ask... The problematic case is where there is only a handful of very bright (~2000x the cubemap average) pixels in one narrow direction (~0.5 deg). (This example is generated by a sun disk in the skies, when seen through a small window in a dark room). In this case I get large undershooting (manifesting as a black spot) in some other direction. Depending on the bright direction, the black spot is sometimes on the opposite side, but sometimes it is e.g. 90 or 135 degrees from the bright side, etc. I was expecting to see something like this in the exact opposite direction, but I'm a bit surprised to see it move around. Then again, I'm not an SH expert, so I'm probably wrong. So to ask a concrete question: Is it normal for SH approximation errors in such "spiky" cases to generate undershooting in directions that are not directly opposite to the brightest point? Thanks, Alen ------------------------------------------------------------------------ ------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ 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: Philip T. <ex...@gm...> - 2009-04-28 08:15:26
|
On Tue, Apr 28, 2009 at 5:24 AM, Jon Watte <jw...@gm...> wrote: > So, how to design a well-adopted, robust, small, powerful language with > pretty syntax and an effective C integration layer? And what language > has all that but I've missed? :-) There's JavaScript, which has pretty huge adoption (outside of games), C-like syntax, closures, prototype-based inheritance, active communities working on the language spec and on implementations and on applications, is reasonably elegant and powerful (see some articles on http://www.crockford.com/javascript/), is quite small (the language itself, distinct from the web browser environment (with DOM and AJAX and all that stuff) it typically runs in), and is designed to be embedded into another application and to execute untrusted (often malicious) code. It has several major independent open-source implementations (http://www.mozilla.org/js/spidermonkey/ and http://webkit.org/blog/214/introducing-squirrelfish-extreme/ and http://code.google.com/p/v8/) all of which include some kind of JIT (there's been a lot of competition on performance over the past couple of years) and all of which have their own approaches to C integration. On the other hand, the implementations vary in their suitability for real-time use (non-incremental GC pauses), and in support for multithreading, debugging, non-standard language extensions, non-x86 JIT, etc, so there's always some tradeoffs. -- Philip Taylor ex...@gm... |