# Closed Catmull-Rom surfaces. Possible?

This topic is 4632 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello I'm working on a project that allows the user to manipulate catmull-rom surfaces. Lately I've been trying to figure out how to associate a set of points with a set of catmull-rom patches in such a way to make the overall surface closed, and I'm beginning to wonder if it is even possible. It's easier with bezier surfaces because neighbouring patches only have to share the corner points... Any ideas? Thanks Edit: Removed confusing sentence [Edited by - averisk on February 9, 2006 6:20:42 AM]

##### Share on other sites
if I remember correctly, you just have to loop the points. say you have n points, to evaluate between (n-2) and (n-1), you'll need points 0, 1, 2, ect...

##### Share on other sites
if I remember correctly, you just have to loop the points. say you have n points, to evaluate between (n-2) and (n-1), you'll need points 0, 1, 2, ect...

##### Share on other sites
Quote:
 Original post by oliiiif I remember correctly, you just have to loop the points. say you have n points, to evaluate between (n-2) and (n-1), you'll need points 0, 1, 2, ect...

I'm not really sure what you mean. Are you suggesting I take a 2d grid of patches and curl it around to make a cylinder-like surface? Well then I'd have holes in the top and bottom

From what I can tell I don't think it's possible... so I'm settling for what you are describing, except with bezier surfaces on the ends to sew the holes in.

##### Share on other sites
Sorry to resurrect this thread, I just wanted to say for anyone that cares that it is possible, and that it's not even necessary to define extra non-surface points or intermediate specially behaved patches to sew together the corners/ends.
It was the weirdest thing, I gave up and then woke up the next day with the solution :)
It's a bit tricky so email me or post here if interested

##### Share on other sites
it's easily possible, if your points are arranged into traingles or quads, just make patches out of them. I'm not sure if I'm understanding what you're trying to accomplish. it may be that the surface is more bendy then the underlying representation tho.

Quote:
 it's not even necessary to define extra non-surface points or intermediate speciall

this is what bessel overhauser splines are for. they dont assume uniform knot positions. this will smooth out the places where you have points that are reall close to eachother, then next to them points that are far from eachother.

##### Share on other sites
Quote:
 Original post by timwit's easily possible, if your points are arranged into traingles or quads, just make patches out of them. I'm not sure if I'm understanding what you're trying to accomplish. it may be that the surface is more bendy then the underlying representation tho.

Sorry, I'm terrible at explaining things
At the moment my program allows the user to edit a 2-d grid of catmull-rom quad patches. Due to the nature of the work I'm doing, it is desirable that the 2-d grid wraps around and connects itself together to form a completely closed 3-d surface. However, the way catmull-rom patches work make this difficult. It's actually a lot like trying to take a square piece of paper and bend it into a sphere.

Quote:
 this is what bessel overhauser splines are for. they dont assume uniform knot positions. this will smooth out the places where you have points that are reall close to eachother, then next to them points that are far from eachother.

I've actually never even heard of 'bessel overhauser' splines. Surprisingly, google doesn't know much either... I'm not sure I understand the difference, do you know where I can find some more information on it?

My solution at the moment is pretty slick but if there's a better way then great

##### Share on other sites
the best thing bessel overhauser curves do is they dont assume uniform knot positions and they are paramaterized in a different way to make the curves smoother when the knots(points) are non uniform. I'm sure you've noticed that the curves can get a bit spikey when this happens. in any event I dont think this is what you're talking about now that I'm rereading your questions, but it's definitly an improvment on the algorithm. if you care I'll post some pics showing the differences and if you still care and can't find anything about them I'll show you some math. But now that I think I get your problem, I'll just say that using rational bsplines(a spline with a w component) might give you a bit more strength, these are the only types of curves that can form closed conics. but there seems to be a lot of different effects to make a surface "wrap around" what exactly is the effect your looking for? I'd like to hear your solution if you dont mind.

##### Share on other sites
Quote:
 Original post by timwthe best thing bessel overhauser curves do is they dont assume uniform knot positions and they are paramaterized in a different way to make the curves smoother when the knots(points) are non uniform. I'm sure you've noticed that the curves can get a bit spikey when this happens. in any event I dont think this is what you're talking about now that I'm rereading your questions, but it's definitly an improvment on the algorithm. if you care I'll post some pics showing the differences and if you still care and can't find anything about them I'll show you some math. But now that I think I get your problem, I'll just say that using rational bsplines(a spline with a w component) might give you a bit more strength, these are the only types of curves that can form closed conics.

Yes, I understand what you mean now

Bessel overhauser curves sound extremely useful to me. I would very much appreciate anything you can offer me on this topic (ie. math, pics, etc.) since google only returns three results for 'bessel overhauser' (none of which being helpful).

Also, I hadn't thought to add weights to the control points but now that you mention it, this might be worthwhile. Maybe I could even generalize my catmull-rom patches to cardinal and allow the user to control the tension.

Quote:
 but there seems to be a lot of different effects to make a surface "wrap around" what exactly is the effect your looking for?

Well, I didn't want to go into too much detail about why I need this, lest I scare away would-be posters, but here goes:
I'm working on a basic editor for generating terrain. At the moment, the terrain is based on a grid of catmull-rom patches that span across the entire working area of the level. This works ok but I am afraid it will become too restrictive, in the case where, say, I want to model a small planet, or a large subterranean cavern. In the former case, I would need the ability to have the grid of patches completely "wrap around". In the latter case, I would also require this, the difference being that the surface would be hollowed out.

I didn't really care how many patches it took to define the closed surface since I had an algorithm that allowed the user to recursively split selected patches into four children to add local detail.

Keep in mind this is highly simplified. There's a good reason why I don't just use Catmull-Clark surfaces (which easily offer this ability)

Does any of that make sense?

Quote:
 I'd like to hear your solution if you dont mind.

I can't really explain it without using an image. I'm at work right now otherwise I'd draw one up for you. I will post again when I get home with an explanation.

##### Share on other sites
OK...

Here's the standard point assignments for the pink catmull-rom patch shown:

Now, imagine a 6x6 grid of this pattern wrapped around like a piece of paper to create a tube. The overall surface is closed except for the ends, which give us big ugly holes.

Consider the following image, which depicts one of the ends of the cylinder and describes how these holes can be filled (colors corresponding to those used in the normal case above)

Note that some points are treated as multiple different control points in this scheme. This results in a continuous, closed surface using nothing but catmull rom patches. It makes sense if you imagine the tube continuing out towards the end and then twisting around the end point to come out on the other side (well at least to me...)

1. 1
Rutin
25
2. 2
3. 3
4. 4
5. 5

• 10
• 13
• 19
• 14
• 9
• ### Forum Statistics

• Total Topics
632942
• Total Posts
3009344
• ### Who's Online (See full list)

There are no registered users currently online

×

## Important Information

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!