PDA

View Full Version : Contour Textures for Terrains



fahim108
20th Aug 2006, 07:38 pm
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. :?

http://www.cadimage.net/postimages/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.

http://www.cadimage.net/postimages/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:

CADTutor
20th Aug 2006, 08:57 pm
That is very cool 8)

Top tip and gold star!

:star:

fahim108
21st Aug 2006, 03:52 am
:) thanx!!

James281
22nd Sep 2006, 01:09 am
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..
http://www.vnforum.com/web/images/ayers.gif

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

thank you very much.

StykFacE
22nd Sep 2006, 01:13 pm
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 :-)

fahim108
24th Sep 2006, 06:57 pm
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)

fahim108
26th Sep 2006, 08:32 am
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.

136

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.

137

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).

138

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).

139

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.

140

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

141

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

142

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

continued...

fahim108
26th Sep 2006, 08:38 am
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.

148

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:

149

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

150

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.

151

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.

152

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.

153

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

154

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...

155

Very much impressive!!

Steamineagle
27th Sep 2006, 02:29 pm
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

fahim108
28th Sep 2006, 04:26 am
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

CADTutor
28th Sep 2006, 07:29 am
Superb tutorial fahim108. Thank you very much.

:star:

fahim108
28th Sep 2006, 07:36 am
Gee! thanks tutor, my pleasure! :)

fahim108
30th Sep 2006, 07:04 am
Now lets proceed to the next step... building SOLID terrains! :? (time to forget the M2S Lisp)!! ...atleast for 2k7 users! :twisted:

165

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! :)

CADIDAC
18th Jan 2007, 11:28 pm
what is a lisp?>

Steamineagle
19th Jan 2007, 09:50 am
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

Gemma Elizabeth
9th Jan 2008, 07:10 pm
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:

rustysilo
23rd Jan 2008, 10:24 pm
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.

Taypee
18th Jun 2008, 12:04 pm
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???

runner2009
16th Feb 2009, 03:39 am
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.

runner2009
16th Feb 2009, 03:52 am
I answered my own question- my contours were still 2D polylines and not splines. Thanks for this reference page.

hetauma
22nd Mar 2009, 01:58 am
I'm really having problems doing this. Actually one problem. My contours are splines and when I try to elevate them nothing happens. Also there is no wrong message from autocad. Although I tried to make a new spline and that one can be elevated.
Any ideas?

carl
24th Mar 2009, 12:18 am
I'm really having problems doing this. Actually one problem. My contours are splines and when I try to elevate them nothing happens. Also there is no wrong message from autocad. Although I tried to make a new spline and that one can be elevated.
Any ideas?

I suggest you select each point on the spline and move it by typing @x,y,z, with x,y,z being the new coordinates for each point. I got another question though. I tried this in autocad architecture 2008 but can't select "fit to object" in the adjust bitmap windows. Any suggestions? thanks in advance

zabilya
29th Mar 2009, 08:31 pm
I'm really having problems doing this. Actually one problem. My contours are splines and when I try to elevate them nothing happens. Also there is no wrong message from autocad. Although I tried to make a new spline and that one can be elevated.
Any ideas?

u can't see if something happens from the plane view
check the property of your contour line geometry elevation if is it what u have indicated


help me out with the following please
i raised my contour lines but then, how should the perimeter be drawn with spline? fit? shouldnt the division mark be raised with contour lines?

roxrc
6th May 2009, 09:56 am
Very good. thanks

ELAK
21st May 2010, 07:58 pm
what changes when you use autocad 2010?
ive followed the procedure fully, it doesn't map the texture into a gradient and i have no idea how to properly use the material options.

ive fooled around a bit and got somewhat closer but it still only renders a single colour. so how do i get it to understand that it need to map the whole gradient based on the Z location of the mesh?

fahim108
22nd May 2010, 05:25 am
...but it still only renders a single color...

Type in MAT
Select your material
Scroll down to Material Scaling and Tiling (display the tab if hidden)
Use scaling units > FIT TO GIZMO
U Tile > (any value) > 1
V Tile > (any value) > 1

That should be the only GUI difference that you may notice. As I don't have 2010 to crosscheck, I am tallying it with 2008 and using my rusty old memory here. :lol:

Ps: I hope you are using a texture with some color gradient in it, otherwise it is not possible! :geek:

lulo
28th Jun 2010, 07:38 am
this tutorial was very good! i finally got to make a 3d model of my contour map..

but i am having a problem with the material..the gradient doesnt follow the z values of my contour. it just shows it in a linear pattern .. is this a special kind of material? i made a new material and making the diffuse map into a gradient ramp.. i am using autocad architecture 2009 :D

Nuttieke
9th Jul 2010, 09:34 am
Do you change something to the TRIM command? Because the lines and contours are not intersecting?

Nuttieke
14th Jul 2010, 08:34 am
anyone? :huh:

fahim108
15th Jul 2010, 04:35 pm
Do you change something to the TRIM command? Because the lines and contours are not intersecting?

You mean the contours are not getting trimmed? If yes, check your TRIM command settings. The Projection option should be governed by the UCS. Also, make sure you're working in the World (or Top) UCS.

21747

I hope it works. :geek:

Nuttieke
16th Jul 2010, 08:18 am
I get this error:

Edge is perpendicular to UCS XY plane.

reccakeys
22nd Jul 2010, 10:12 am
Amazing............... Wow, I want to learn it. I want to learn it!!!!!!!! You are very talented man. I am just a newbie here. Hope I can be good as you...

rvpas
20th Sep 2010, 11:27 pm
Hi every one
To complete this fantastic post
I post a part of my training material where I explain an over way to create a solid terrain in using slice command.
Thanks fahim great tutorial
Bye
Pascal