Jump to content
  • Advertisement

Catmull Dog

  • Content Count

  • Joined

  • Last visited

Posts posted by Catmull Dog

  1. Ideally you will draw the control points and let the user drag them independently. To move the whole curve the user would type Ctrl-A to select All and then could drag any point to move the whole curve.

    You may prefer Catmull Rom splines as they feature control points that lie on the curve (just the span 1 to 2), where Bezier defines a control polygon and only the endpoints 0 and 3 are on the curve). You can convert between them with a formula that is not too bad (see Figure 4).

  2. An interactive fiction (word) game is a good short-term project.

    Design a map and number each room and list the connections for R rooms.

    Then support 10 directions (the 8 compass directions, up and down).

    A 10 x R matrix then stores the connections between rooms. You could show a photo in each room (perhaps a panoramic one and let the user rotate 360 degrees).

    Then, support simple noun/verb parsing and inventory (pick up the rock).

  3. In 1987 a FORTRAN subroutine package was created that fits points to surfaces using cubic splines (though more of a subdivision scheme it appears than a parametric surface).

    The author published a book (Paul Dierckx - Curve and Surface Fitting with Splines).

    I'm curious:

    1) If it's still useful enough to charge $100 for the book 25 years later, hasn't anyone ported it to C++?
    2) Are there limitations to consider versus using Catmull Rom surfaces or NURBS?
    3) Is localized control possible?



  4. Rewind is simply playing every frame back to the (n-1)th frame, and looping n from max to zero.

    I did this for a billiard simulation 20 years ago and it was cool to watch the break in reverse.

    As nox_pp points out, this requires a deterministic engine (meaning if you have the same input conditions the same results will occur).

  5. The object is probably made out of polgons, so you can test each one as a plane to see which side the given point is on. One way is to go in a certain order and make sure the Z value in the cross product of two edges of the (rotated into XY plane) polygon is consistent (all positive or all negative depending on the way you go).

  6. Making two layers using the surface normals is pretty easy but here are some pitfalls:

    1) Which way do you let the user scale the derived surface? Or do you support both thicker and thinner? This effects the lighting as you need to keep the winding order consistent.
    2) If the surface is open like a tube, you will need to stitch the layers together at the ends. This is much more of a challenge than just deriving a thicker layer.
    3) If you supported cutting holes and stitching pieces together, there are all-new problems when you add thickness, as the two layers (each featuring seamless articulation) are no longer simply offset by the normals, the projected region of intersection needs to be scaled about its midpoint and reprojected onto a slightly different surface.

  7. Thanks K_J_M.

    It seems to me that basic, building-block code like this should be available in a standard form we could all share.

    Instead it seems we all implement the same algorithms and (never having common test data in most cases) we often don't know about the bugs we have in our version.

    The alternative is to buy some API that has more than what you need.

  8. I noticed that when I render without calling glClear on each frame I get a flickering strobe-like effect in Windows 7. I took a snapshot which seems to show what is happening - it looks like it's using sprites with logical AND instead of XOR. It might be the graphics card (nVidia Quadro 2000M) or a setting of some kind.

    I noticed I had to change my rendering slightly to accomodate Windows 7 originally (namely, to save the DC when the window is created and not use the one returned by glBeginPaint), but never knew for sure what changed between that and XP.

    Do you have any idea what this observed effect is or how to restore smoother rendering? It looks ok in normal mode and is only an issue when I try to let objects trace out a path by not clearing between frames.

    Thanks in advance,


  9. While many have discussed the cost of licensing a game engine or technology as a customer, it's more difficult to find information about how developers should go about determining the license pricing structure for their existing, proven technology.

    For example, let's say you as a small business owner have been developing tools for 10 years and you estimate that it cost you $3 Million in time and resources to build a certain product that another company is now interested in licensing (open source).

    Should you estimate how many licenses are realistic and divide, say 10 licenses at $300K each?

    And for your first customer (who takes more risk) should you maybe say $30K (1% of development cost)? Also consider whether the customer is your employer, and how much extra you would want to provide them the source code to existing tools.

    Your input would be appreciated.

  10. Performance was not the main reason, though I'm curious how much faster it will be.

    In order to achieve Centripetal Parameterization (from a 2010 paper "Parameterization and Applications of Catmull-Rom Curves"), we need a recursive approach to the Catmull Rom algorithm. That allows for arbitrary t (or s) values, which allows shape parameters.

    We need a Catmull Rom spline where the control points represent the points of highest curvature (please see attached image).

    I think many make the assumption that is the default when it's not.

  11. In Siggraph '88 (24 years ago this week) there was a great article by Phillip J. Barry and Ronald N. Goldman titled "A Recursive Evaluation Algorithm for a Class of Catmull-Rom Splines".

    In the article they detail a recursive approach to evaluate a CR spline. Representing it this way allows for curve parameters to be added (thus making it Non-Uniform), altering the trajectory of the curve (similar to the Tension parameter in a Cardinal or Kochanek Bartels spline).

    I'm in the process of translating the formula but it's usually harder than it looks.

    Has anyone implemented this? How much faster is it? Is the algorithm available in C++ form?

    Thanks in advance.


  12. Ideally, you will use Vertex normals (take a weighted average of the normals of all adjacent triangles sharing the vertex at that point). This is easier to calculate if the surface is on a regular grid. For polygon soup you may not know all of the triangles that share that vertex.

    If it is as a parametric surface, the normal at u,v is (basically) the cross product of the vectors: (u,v)->(u+delta,v) and (u,v)->(u,v+delta) where delta is the tolerance, normally based on the surface sample resolution.

    But for starters, just use the polygon normal (normalized cross product of two edges of the nearest triangle).

  13. Greetings.

    While Catmull Rom splines have the nice property of going through the control points and are "continuous enough" for most applications, they sometimes behave unpredictably. Namely, the points of highest curvature on the resulting curve are not always where the control points lie.

    A solution for this is to use what is called Centripetal Parameterization which focuses more sampled points on the highest areas of curvature (the term derives from the way a car would slow down when navigating sharp turns, unless driven by this guy).

    The general idea is:

    t i+1 = t i + |P i +1 - P i] ^ a // Where (0<= a <=1) (0 is Uniform,.5 is Centripetal and 1 is Chordal).

    Note: This is a different type of parameterization than Chord length reparameterization (see attached slide showing adjusting the number of points between spans without altering the curve itself). Centripetal alters the trajectory of the curve, similar to the way a Kochanek Bartels spline applies Tension, but unique.

    There are many articles on this subject. Two of the best I found are Parameterization and Applications of Catmull-Rom Curvesand the original E T Y Lee article Choosing nodes in parametric curve interpolation, but they don't seem to explain in layman terms how to go about modifying an existing CR algorithm to make the required changes (ideally there would be an adjustable alpha to blend from Uniform (a=0) to Centripetal (a=.5) to Chordal (a=1.0), but I'm not sure if that refers to blending the results of two functions or if the alpha value really plugs in (it is raised to the power of a so it's square root for Centripetal).


    Does anyone have the actual CR algorithm that implements Centripetal Parameterization? How different from the original CR algorithm is it and how much does it cost?

    With KB splines it's only a few lines difference, but not something you could improvise without a math Ph. D.

    Thanks in advance!

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!