Bezier-patch terrain

Started by
12 comments, last by NeXius 20 years, 11 months ago
Hi I''m making an terrain editor. The terrain is stored as a map of Catmull-Rom patches and the user moves around control points to edit the terrain. It works fine at the moment, but something I''ve wanted to do from the beginning is not just overhangs, and not just caves, but caves that go under the ground and pop up somewhere else on the terrain. I''m trying really hard to figure out how to do this, but I just can''t visualize how this is possible. Anyone ever attempt anything like this? Also post if you have a question about the editor... MSN: stupidbackup@hotmail.com (don''t both e-mailing) ICQ: 26469254 (my site)
MSN: stupidbackup@hotmail.com (not actual e-mail)ICQ: 26469254(my site)
Advertisement
Let me explain some more.

The problem is that while you can easily make a cylinder of catmull-rom patches that connects to four control points on each end, you can't connect this with a terrain of patches

Here's a picture:





Now, all I want to do is continue building the little mound there up into the sky while maintaining continuity with the terrain, but I can't get it to do this because when choosing a corner point on the terrain, there is two to choose from (1 and 2, assuming we're talking about the closest patch) and therefore I cannot maintain continuity...

Any bright ideas?

EDIT: clarified a bit more

[edited by - nexius on May 6, 2003 7:18:10 AM]
MSN: stupidbackup@hotmail.com (not actual e-mail)ICQ: 26469254(my site)
it seems you have a rigid grid of spline patches: that way youll never be able to even make overhangs i believe, let alone caves that will connect two part of the map. in order to archieve that, youll need a moer dynamic structure i think.
What kind of dynamic structure did you have in mind?
MSN: stupidbackup@hotmail.com (not actual e-mail)ICQ: 26469254(my site)
I don''t have the patches stored as a two-dimensional array or anything... It''s just a vector of patches. You can easily add patches, delete patches, and modify
MSN: stupidbackup@hotmail.com (not actual e-mail)ICQ: 26469254(my site)
well, the thing is, the x and y positions of your patches seem to be fixed, only the z position is variable. if you were able to drag the controllpoints freely in all three dimensions, that would make overhangs a piece of cake.

if you want interconnecting tunnels though.. hmm that would be kinda hard i suppose. maybe if there was no array or vector, but some sort of linked structure? ie each spline has a pointer to its four neighboring splines, and you would be able to add patches freely in an editor, it would be possible i suppose, but that would be quite hard i think.
Yes! That''s exactly the way it''s set up.

The patches can be modified in three dimensions (the way it works is that if you just hold down the left mouse button, the point goes up, and if you hold down the right button too, it can go up but also right, and if you''re just holding the right button, it goes forward and back).

And each patch has links to its four neighbouring nodes and also 16 references to control points that make up the 2D grid.

Overhangs are a piece of cake, and even caves, but this tunnel thing is where I hit a snag.
MSN: stupidbackup@hotmail.com (not actual e-mail)ICQ: 26469254(my site)
How about two patches connected along a "seam"?
______________________________________________________________________________________The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ"So. Any n00bs need some pointers? I have a std::vector<n00b*> right here..." - ZahlmanMySite | Forum FAQ | File Formats______________________________________________________________________________________
Is there not some method of using trimming you could use, to somehow cut a hole through the terrain?

I''ve not really started to learn curved surfaces though, so I wouldn''t really know.
quote:Original post by OklyDokly
Is there not some method of using trimming you could use, to somehow cut a hole through the terrain?


Yes, but it wouldn''t be continuous, so it would look really bad.

quote:Original post by Thunder_Hawk
How about two patches connected along a "seam"?


I''m not sure what you mean. Could you explain a bit more?

I appreciate the help!
MSN: stupidbackup@hotmail.com (not actual e-mail)ICQ: 26469254(my site)

This topic is closed to new replies.

Advertisement