• Advertisement

Archived

This topic is now archived and is closed to further replies.

Bezier-patch terrain

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

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)

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

  • Advertisement