In need of some nCloth advice - Road shaped by terrain

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  01 January 2013
In need of some nCloth advice - Road shaped by terrain

This is my first post in the Maya Dynamics section of CGsociety and my first take at working with nCloth (surprisingly enough!). I'm trying to shape a road along a terrain by making the road into nCloth and the terrain into a passive collider. Things -are- working but I need some help on the nCloth settings because the different setups here are basicly endless.

Create a heightmap with GeoControl2
Use this heightmap as a deformer in Maya via the plugin iDeformer in order shape a plane into terrain
Create a 2D curve (top view) on this terrain that navigates around mountains
Create a rectangular NURBS shape (the road) and extrude it along the curve
Convert to polygons, add an edge split along the road on the top side of it (where you would drive)
UV unwrap and texture
Create nCloth from this road
Create passive collider from the terrain
Play around with nCloth settings

Now I've set the gravity on the nucleus to 100 and I've tried all the nCloth presets and while some of them seem reasonable enough, all of them have at least one flaw: the most common one being inflation of the road mesh. So instead of just spending several hours on this all in vain I thought it would be best to ask for some pointers instead so I know what to look at.

Below is a screenshot of my scene:
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
  01 January 2013
Just to get some more clarity of what you are looking to do the terrain moving around and you want the road to follow/flop around?
Or are you just trying to get your base road mesh to follow your static terrain exactly?
In either case, you will probably want to to the extrusion after building the base shape. With nCloth, thickness like this will just get in your way.
If you are needing the dynamic floppy option the nCloth is a good start. Ramping your gravity up to 100 might be a bit overkill. The substeps and collision iterrations on the nucleus will be key attributes to tweak. As for your actual cloth settings load up some of the presets to get things started. Maybe try is a better starting point than the default settings. I think the big attributes here will be the mass/collision thickness/bend angle dropoff of the cloth.
If this is your first time playing with nCloth I would recommend doing some testing in a simplified scene around the same scale that you are working. It will give you faster feedback of the settings you are changing.

If this is just way to build a static mesh I would try some non-dynamic options. You could easily draw your curve right in your deformed mesh, or project the curve. Or, you could project the base road mesh(before extruding). Check out the Maya Membrane node for basic shrinkwrapping...or SOuP if that is an option.
Hopefully these thoughts will get you moving a little...or help us get a little more of just what you are looking for.
  01 January 2013
Both the terrain and the road will be static - so I just want the road to fall down, deform to the shape
of the surface and then stay there. So the road nMesh should basicly behave like a straw of cooked spaghetti.

I guess it would be easier to just make the road in 2D and then extrude the sides, but even so the problem remains.
I've toyed around with the presets today and all the settings and it's like sitting in a sinking boat.
I plug one hole to stop a leak, and immediatly after another leak appears. I plug that leak and another appear.

Two biggest issues are:
1) The road always hovers above the ground - it's not even touching the terrain, and it's not due to stretching.
2) The center line on the top of the road inflates, clipping thru the backside.
The backside is just there for testing purposes, it will be removed later on. So when I spot clipping I know I have a V-shaped road.

I had some other issues as well that I've learned how to fix (thanks to trial and error), such as the road gliding away to the side, the road compressing (like a wire or string) and so on.
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
  01 January 2013
Instead of extruding a nurbs plane, create a simple degree 1 curve with 2 cvs (a line segment) and extrude that. Adjust the nurbs to poly to give a nice uniform mesh ribbon of uniform sized quads but not too dense. Make cloth and set the friction to 2. Worked fine for me. You can perhaps increase bend/stretch/compression resistance depending on the result you want.
  01 January 2013
I'm already ahead of you Duncan

I'm not using a NURBS plane for the extrusion: I'm using a NURBS circle that I've set to linear with 4 sections. Then I've rotated that 45 degs around the Z axis and shaped it like a trapezoid (used rectangle first, but now it's a trapezoid.)
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
  01 January 2013
Yes, but you don't want to simulate an extruded tube... a flat surface will be much better. The cloth solve will handle any added thickness you wish and you can extrude the output cloth mesh to thicken the result for rendering if desired.

I've attached an example scene.

If you must simulate a tube (or a flattened bag) then make sure the self collision flag is set to fullSurface and carefully adjust the selfCollideWidthScale( you can visualize the width using the solverDisplay attribute). It is really much better to simulate just a flat strip, however, not a tube.

If you want smooth corners and such don't simulate a high resolution cloth. Instead smooth the output mesh after the fact.
Attached Files
File Type: zip (10.2 KB, 9 views)
  01 January 2013
Alright thanks. I'll give it another go when I'm back at work on monday.
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
  01 January 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 12:29 AM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.