Jump to content

Contour Textures for Terrains


fahim108

Recommended Posts

Well, I was just doodling around in 2k7 the other day and found this odd way of making contour lines (and bands) on terrain models. :?

 

fahim108_terrain_01.png

 

Use the EDGESURF command to model the terrain surface, then map a texture on the XZ plane. That's it!... :shock: :D Note that the texture should, preferably, consist of horizontal color bands and/or horizontal lines to depict contours.

 

fahim108_terrain_02.png

 

By the way, can we change this EDGESURFd surface to sold without using the m2s lisp in 2k7? I am thinking of more weird possibilities now... :wink:

Link to comment
Share on other sites

  • Replies 33
  • Created
  • Last Reply

Top Posters In This Topic

  • fahim108

    10

  • Nuttieke

    3

  • CADTutor

    2

  • Steamineagle

    2

Top Posters In This Topic

Posted Images

  • 1 month later...

that look awsome man, i would love to learn how to do that.

i wonder if i can use that to do contour line for a slab. i already have the elevation mark of high and low.. how difficult would it be to transfer this to that 3d contours?

this is what i want to apply that 3d contours on..

ayers.gif

 

can you please explain how to do this clearly? and the texture you use?

 

thank you very much.

Link to comment
Share on other sites

i've used the EDGESURF command for awhile now... it's always cool to see what you can come up with.... basically it's just fun to 3DOrbit it around, see all the waves lol.

 

james, textures are used to signify positive values in the Z axis over a plane.... if you've ever messed with Bryce this could show you more of what i'm talking about. now, i'm not 100% sure how Fahim did it, but i'm guessing this is how. lets say you use a black/gray/white texture, the black would be @0 Z, and gray would gradually make the mesh high, and all the way to white would make the mesh it's highest points. 3DS Max does this really well too, especially for transparencies, i used to mess with that a little in college, but never got too far into it. just had to do it for classes.

 

once again, nice renders fahim.... keep 'em coming :-)

Link to comment
Share on other sites

Yup! Styk's right, I used EDGESURF in modeling those contours. But I don't think EDGESURF is the right solution for your problem... i.e. If you already have the contour lines. :huh: EDGESURF is used for blending/extruding the terrain "sections" not contours (planer). :x

 

If you're working on 2K7, you may use the LOFT command. Make sure all your contour lines (splines) are "closed". :cry: Elevate these lines (to their respective heights) in 3D space, then use the LOFT command. Select the splines in lofting order. Hit enter. :shock:

 

Regarding the texture, you can use any jpeg image having horizontal bands (or lines) and map it in XZ plane (keep the material "stretched to fit"). That's it! :?

 

I recommend you start off with some basic shapes before doing it on this map. Please note, lofting may not work for split contours. :glare: 8)

Link to comment
Share on other sites

What’s The Exact Procedure?

 

Okay... So here's a detailed version of the earlier "tip" that I posted. I'm using 2k7 so am not sure if the other versions would support this... anyways, here's the procedure:

 

Let's make out a 3D terrain out of the following contour map.

 

01.gif

 

Using the DIV command, divide the horizontal "border" of the map into 10 equal parts (for more accuracy use a higher value). Also, mark the four corners of the map for later reference. Delete the border.

 

02.gif

 

Elevate the contours (splines) to their respective heights in 3D space. You can use two viewports to do this, one displaying the plan, the other displaying the front view (or any side view). Select a contour line from the viewport showing the Planner view, then use the other viewport to move in Z-axis.

 

Once all the contours are placed at their respective heights, use the SPLINE command to make out the perimeter of the terrain by joining the corners (earlier marked) with the elevated contours, as shown below (in red).

 

03.gif

 

Change the view to 2D wireframe (if it got altered), move to the planner view and draw the 11 vertical lines using the earlier 10 divisions (set the PDMODE value to 2 to make the nodes visible).

 

04.gif

 

Now use the TRIM command to shave-off the contours by the vertical lines. Make out a spline through these cut points (end points of the trimmed contours). Here, the vertical lines in red are the splines thus formed, while the second "slot" is being trimmed.

 

05.gif

 

Once all the trimming and "splining" is done, select all the splines. It should resemble the illustration shown below.

 

06.gif

 

When viewed in 3D, the above terrain looks like this:

 

07.gif

 

Now use the LOFT command to generate the wireframe into a 3D mesh.

 

continued...

Link to comment
Share on other sites

And How To Map A Texture On It?

 

Preferably in a 3D view, draw a reference line in the Z-axis measuring the highest altitude of the terrain.

 

08.gif

 

Use the MATERIALMAP command to start the mapping process. Use the Planer option and select the terrain. Enter T (to reset). The screen should look like this:

 

09.gif

 

Enter R (to rotate), move your mouse over the red circular band (to rotate along the X-axis).

 

10.gif

 

Once hovered, click on it and select the TOP End point of the previously drawn reference line. This would rotate the "map" along X-axis and place it in the ZX plane.

 

11.gif

 

Now move your mouse over the Top Left Grip of this MAP and drag it to the TOP END of the reference line. This would resize the map. Now hit enter.

 

12.gif

 

Choose any material consisting of horizontal bands (or lines) to depict contours. In the Adjust Bitmap window, make sure the "fit to object" option is checked.

 

14.gif

 

Apply the material to the terrain and render it. That's it!

 

15.jpg

 

For a cross-check, I added horizontal lines to the actual material to verify the precision of the process and here's what I got...

 

16.jpg

 

Very much impressive!!

Link to comment
Share on other sites

Hi! Fahim108,

 

Fantastic........just fantastic!

 

So this is 'Drape Mass Element' on steroids!...kind of...

Yes..... I know now it's not in AutoCAD 2007 ( drape ).

 

I'm using 2005, soon to be on 2006 & then soon after that onto 2007.

What you have done has given me a major incentive to get to 2007.

 

This post I'm keeping in my sights.

Any more? Comon StykFacE, get one in an' show us. Anybody else?

 

 

regards ( dribble drool )

 

 

Stephen

Link to comment
Share on other sites

I was thinking if it's possible to convert the above listed procedure to an AutoLISP (or something like that), so we don't have to go through the same process again an again while making new contours. Just a thought... o:)

Lemme add, I no nothing about "writing" AutoLISPs, I just use them! :oops: :P

Link to comment
Share on other sites

Now lets proceed to the next step... building SOLID terrains! :? (time to forget the M2S Lisp)!! ...atleast for 2k7 users! :twisted:

 

contours_2.jpg

 

Simply use "closed" polylines (instead of splines) for drawing the terrain "section". Enter PEDIT and select the FIT > CLOSE option there. The polyline would change into a 2D closed spline. Then use the LOFT command... BANG!! :shock: Slice off the unwanted regions. :wink:

 

You can use any of the 3D operations like UNION, SUBTRACT, INTERSECT, etc. with this 3D lump!! Hurray! :)

Link to comment
Share on other sites

  • 3 months later...

For 'gawds' sake, don't let Boro Nut answer this! or else I'll have another sore stomach laughing at his answer.

( See end of :- http://www.cadtutor.net/forum/showthread.php?t=11231. )

 

It could be a speech impediment.........

 

or more likely, Lisp or Autolisp is a written sequence of commands, in code form, which instructs AutoCAD to carry out a particular task or set of tasks. The file extension is *.lsp.

Very useful if you know how. Unfortunately, I don't.

 

 

Stephen

Link to comment
Share on other sites

  • 11 months later...

Hi there, Just doing a quick search to find out how to create a terrain. I have been using the edgesurf command to create the base in sections. The question really is how do I make it into a solid now? Here's an image, hopfully this might help.:huh:

terrain image for CTsml.jpg

Link to comment
Share on other sites

  • 2 weeks later...

Or if you use Civil 3D you can simply build your surface, then go to Surfaces > Utilities > Drape Image > Select your image file (must be inserted into the dwg prior to draping) > Select the surface to apply it to > Give it a Render Material Name > Done. Go 3d orbit or admire it via the object viewer.

Link to comment
Share on other sites

  • 4 months later...

Hi,

I tried the edgesurf;rulesurf and loft commands but they dont seem to working well. i converted all my splines into closed poly's and still nada. are there no macros or lisps written for a simple drape command in 2007 or 2008???

Link to comment
Share on other sites

  • 7 months later...

I am trying to follow the tutorial given by fahim108. I am doing alright until the part where I am supposed to draw the splines through the trimmed contours. My spline won't snap to a contour end point if I've already previously snapped to an endpoint on that same contour. It won't let me model it correctly, and I don't know the reason. Does anyone have any ideas?

 

Thanks very much.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...