Jump to content
  • Advertisement

WarAmp

Member
  • Content count

    318
  • Joined

  • Last visited

Community Reputation

750 Good

About WarAmp

  • Rank
    Member
  1. Well, what exactly do you need help with? What area are you having problems in?   It looks fantastic, btw.    edit: Prematurely submitted.
  2. The problem is that we DON'T understand what you wrote. Is this something you made? Is this just something you found and thought was cool and wanted to share? What's the purpose? Is it supposed to be a SNES emulator running on the GPU? Etc?
  3. If it's a moving sphere, you can just do ray->triangle intersections, and all you have to do is for each triangle, move the origin of the ray along the normal of the triangle by -radius.   Like this:   Sphere s(center, radius)   foreach(T in Triangles) {    if (s.touching(T))    {        // Already touching the triangle...do whatever.    }    else    {       Ray ray(s.center - (T.normal * s.radius), sphereDirection);       if (ray.Intersect(T))       {          CollisionPosition = ray.intersection;          SpherePositionAtCollision = CollisionPosition + (T.normal * s.radius);       }    } }   edit: I thought about this some more and I am wrong. This *does* do some of the work, but you still need to test the sphere against the triangle edges.
  4. Well, you could have the collision shape actually just be half the width of the sprite, but "slide" based on the direction the sprite is moving.   ie: For ground collisions, the collision shape is width/2, but one side is always at the center of the sprite, and the other side is opposite the direction of motion. If no ground collision is detected, expand the shape to full width and test again, this way you can still handle edge cases when jumping/falling properly.   Does that sound like it should work?
  5. b_2 = 2*b_1 + b_3?   as for 'specific values', just pick anything that doesn't work....   b_2 = 0 or any negative number ( <= 0)...   b_1 = any positive (> 0) number.... b_3 = any positive (> 0) number....   Maybe I don't understand the question?
  6. WarAmp

    Digits of Pi

      This is where your misunderstanding lies. There is a 50% chance that the referee has put a bullet in this gun. Not in this chamber. You don't know which gun you have. You might have the empty gun.   Think of it like this: You have a total of 12 available barrels. 1 barrel has the bullet.  Initial chance: 1/12 second chance 1/11 third chance 1/10 4th chance 1/9 5th chance 1/8 6th chance: 1/7.   It doesn't matter what random subset of barrels you take the first 5 samples from. If there wasn't a bullet yet, it has to be in the next 7 barrels.
  7. WarAmp

    Intersection between a circle and an aabb?

    Step 1) Find the closest point on the AABB to the center (C) of the circle: This will be your potential collision location. (P) Step 2) If the distance between C and P (D = magnitude(C - P)) is less than the radius of the circle (R), then you have a collision! Step 3) The penetration depth is then (R - D) Step 4) The normal is the normalized (C - P) vector.
  8. WarAmp

    lit sphere shader

    You may also try searching the term "MatCap" or "Material Capture" as this is very similar (if not the same) as that. Render your lights and material to a sphere, then use that resulting image as your lighting environment. Essentially you are precomputing light+material interaction for lights fixed to the viewpoint.   http://cgcookie.com/unity/2013/02/18/introduction-to-matcaps-in-unity/
  9. Geo-mipmapping (http://en.wikipedia.org/wiki/Geomipmapping) and  Geo-Clipmapping (http://research.microsoft.com/en-us/um/people/hoppe/gpugcm.pdf)   Are the most common ways of doing this.
  10. This is called "Horizon Mapping" (http://research.microsoft.com/en-us/um/people/cohen/bs.pdf) iirc.  Your implementation of 2 values per point will only work for 1 axis of light though. Take your image for example, what happens when the sun moves over the sky to the other side and begins to set? The occlusion heights from that direction are different, and now your precomputed 2 values are no longer correct.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!