CulDeVu

Members
  • Content count

    119
  • Joined

  • Last visited

Community Reputation

3034 Excellent

About CulDeVu

  • Rank
    Crossbones+

Personal Information

Recent Profile Visitors

13472 profile views
  1. This smells suspiciously of homework, but I'll bite...   As far as I understand, the only difference between Gauss-Seidel and Projected Gauss-Seidel is that the projected version clamps its values against the constraints at every iteration. It's useful if you're trying to solve a linear system with constraints. I don't know of its origin, but it appears (from googling, I'm no expert) that it's been implemented in the Bullet physics engine for some time now as a solver. The original Gauss-Seidel was published in the late 1800s and was created by Gauss some time before, so I wouldn't doubt that he was at least aware of the Projected version.
  2. You can't get the exact value of the squared sum of all the lengths just from the squared lengths, but you CAN get some nice bounds, if that helps.   For any a1, a2, ..., an >= 0, the lower bound (a1 + a2 + ... + an)^2 >= a1^2 + a2^2 + ... + an^2 holds.   Furthermore, if you can guarantee that a1^2, a2^2, ..., an^2 are all greater than or equal to 1, then additionally the upper bound (a1 + a2 + ... + an)^2 <= a1^2 + a2^2 + ... + an^2 + 2*a1^2*a2^2 + 2*a1^2*a3^2 + ... + 2*a1^2*an^2 + 2*a2^2*a3^2 + ... also holds.   In case you have trouble following all those coefficients and exponents and stuff, the latter term (after the "+ an^2 + ") is for i in [1,n] for j in [i+1,n] sum += 2 * ai^2 * aj^2 The good part about that upper bound condition is that you can easily make sure it holds by scaling the grid accordingly. It's an O(n^2) operation, but so is calculating the upper bound.   Hope that helps a bit!
  3. Presentation and expectations

    Hey Kane, welcome to the site!   Yeah, we don't get many introduction posts, but we see them everyone once in a while. I like them, though. They really makes the forums seem more friendly :)
  4. No such matrix is possible, because that's not a linear transformation. The reason that projection matrices can get away with that sort of distortion is because of the division by w term, which makes the whole transformation nonlinear.   To see why, assume that M is a matrix that satisfies your desired transformation. It's easy to see that     This is contradicts the fact that your transformation is linear.
  5. Trump Style

    I can see really any tower defense or plants vs zombies style game
  6. Pressure simulation for a game.

    Wind can be modeled pretty nicely by just regular old forces in Box2D, but that doesn't seem like what you're wanting. That little web game is really just a fluid simulation, with bells and whistles added on top of it. In those simulations, air, water, fire, and pretty much everything else that isn't rigid is described with by the equations of fluid dynamics. Pressure is part of the Navier-Stokes equations, the one that defines how fluids move, and advection is a natural extension of those equations as well.   A good tutorial, if you're into building cool simulations yourself, would be: https://software.intel.com/en-us/articles/fluid-simulation-for-video-games-part-1   If you're more into just using a physics engine, though, LiquidFun is just Box2D but with support for fluids: http://google.github.io/liquidfun/   Those links should at least give you a place to start, and some keywords to start Googling around.
  7. Finding perimeter path of connected nodes?

    I don't have a full answer, but I have some ideas.   For one thing, you can't just use connectedness and distance information between nodes, because it's pretty easy to find two isomorphic graphs that don't have the same perimeter. Furthermore, I have no idea how to do this elegantly for anything other than planar graphs (or, graphs without "intersecting pathways" as you call it). But this should work for all planar graphs: denote the graph "G" create a list called "Loop" create a stack called "Working" find some initial cycle in the graph // there are many ways to do this add this cycle to Loop, ordering all its vertices CCW remove the paths between the vertices in the initial cycle from G while some node "V" in Loop that has more than 0 nodes connected to it: clear Working Working[0] = some node connected to V in G // remember, we're deleting paths between nodes, so this might always be different than last time while the top of Working isn't in Loop: push any node that's connected to the top of Working in G to Working // we've now found a loop that connects to our main Loop // now to figure out how to merge the two into the "outer" one perform an inside-outside test to Working[0], with respect to Loop if Working[0] is outside: make the winding of Working be CCW remove the nodes in Loop between V and top of Working, exclusive insert Working into Loop, after vertex V remove all paths in Working from G I haven't tested this, but the idea is that you can progressively build the outer loop from smaller loops connected to the main one. The only requirement is that you have to have an initial loop to start with, but there are many ways to do that. The CCW winding enforcement is required for the inside-outside test that happens (this is the part where the concept of "outer" comes into play). In pictures, it would look sorta like this:   --> --> Here, the green is "Loop", and the red is "Working" from the psuedocode above.   I hope this helps a little!
  8. Sunlight theory

    (A rendering thread that's gone unanswered for 2 hours?! This isn't the GameDev that I know and love)   The theory sunlight hitting a planet is the same theory for any light hitting any object. The thing I think you're looking for, though, is Lambert's Cosine Law, which is one of the fundamental concepts in any physically-inspired rendering. Specifically, for any point on your planet, the amount that that place is illuminated is: (brightness of the light) * (cosine of angle between the surface normal and the light source) / (distance from the surface and light source)^2.   Hope that helps!
  9. Learning Global Illumination

    I've been slowly getting my feet wet with global illumination and other, non-realtime rendering methods for a change
  10. sponza

    From the album Learning Global Illumination

    This is the image I made for my portfolio to show off the project. The statue is a bust of Lenin, if you were wondering.
  11. diffAndSpec

    From the album Learning Global Illumination

    Showing off microfacet importance sampling, with stochastic sampling between material layers   500 samples per pixel.
  12. GPU raytraced global illumination

    Wow, this is a blast from the past. I guess I should add some more updated images to this collection.   It's actually incredibly simple to create a BVH from scratch once you know what you're doing, which you wouldn't think would be the case just from thinking about the problem. That's actually what I like most about this topic: it's really easy to get into, but mastery is extremely hard in any single aspect of pathtracing.