Jump to content

Spline help, thought


jobjobplayrough

Recommended Posts

1st Thanks for the work on the Spline Tools! especially the CSV tools. Sadly the Terrain Height script takes around 30 min to complete it's pass when I try to run it on the length of spline that I want to use to set up my basic roadway grid on an 8Km map. I have tried giving it just the basic set height and still takes around 30min. I am sure it's probably something with my layout or placement of the spline on the terrain wireframe, but I can't seem to figure out why it's taking as long as it does. 

Anyway I have found a work around for my situation, That's not really what I am here for, just passing along that information. What I really was wondering is if there is a way to have a dedicated script to "smooth" along a spline. Similar to how you can set the smoothness in your current Terrain Height Script if that makes sense. Sadly I am just smart enough to be dangerous when it comes to scripting but not smart enough to actually right a script.  

Link to comment
Share on other sites

  • Wrinkley

I would be interested to know what your workround is, was it the suggestion that was made to you on another site to do it in sections ?

Regardless, Giants Editor is not a high end editor it is basic editor with a propensity to freeze and crash when doing the simplest of tasks, I have noticed that the latest versions are a lot less stable than the previous ones and take far longer when executing the simplest of scripts. It is only designed for basic editing on a normal base 2k x 2k map anyway so when trying to use it on larger maps problems must be expected.

" a dedicated script to "smooth" along a spline"

I take it you are thinking of a spline script that uses something like the smooth brush (middle mouse button in GE) and not the terrain height which flattens the terrain along a spline.

I personally don't see much point (or use) in a script like that as the smoothing brush is far more flexible to use and any modification done by it can be undone whereas if done by a script it can only be redone  by reloading the i3d (providing you haven't saved the map after running the script). Any script created to do the smoothing would first have to take into account the various heights along and across whatever width is set on the spline to ensure that any exsisting terrain levels were maintained and just smoothed before actually carrying out the smoothing and would take a fairly long time in execution.

One method of creating a roadway is to set the terrain height script to the full width (including edges with smoothing if required) and execute it, then zoom out so you can see  the roadway and with the smoothing brush set to a suitable level and size that covers the whole width +2m run it along the spline, zoom in and check then redo if necessary (adjusting smoothing levels to suit) once happy,  in the terrain height script set only the road bed width and execute, you should then have a roadway with reasonably smooth edges (may require a bit more smoothing in places)

Another tip to shorten the time taken for execution of the Terrain Height script would be to set the "Set Distance Between Points" to a higher figure that way a lrger area would be transformed on each pass of the script, bear in mind that a too large figure will cause problems on curves.

 

Link to comment
Share on other sites

I just figured a shorter spline would be less calculations, so in theory should be quicker.  I done both 5 and 10 for the distances between points. My map is also full of rolling hills and I am avoiding doing to much cutting of the hills when it comes to gravel style roads. 

I just have 3 saved scripts of the built in terrain height scripts setup and run them in succession to build up the Roadway and give it a ditch effect running along each side, then go back and run the smoothing brush along the edge. My idea was to use the spline to basically "knock" off the edge. That just me being picky tho. lol  was kind of hoping to be able to duplicate your "smoothness" setting in the Terrain Height setup to be able to run it on the edge outside of running the entire script. but I do understand the downfalls behind it. 

Appreciate the response!

 

Link to comment
Share on other sites

  • Wrinkley

The option to set the edge width and smoothing in the Terrain Height script was implemented to assist with creating embankments and cuttings for the railway system and for short sections of roads on the side of hills/mountains.

The smoothing is carried out by dividing the edge height by the smoothing setting so to use in your context the spline would either have to be moved to the left or right hand edge of the initial roadbed and only the edge settings used (left or right not both in this configuration) or the normal spline settings for the whole width used again with either the edge height raised or lowered and then re run with the edge width and height reduced by 1 each time and smoothing from 1 to 5 until edge width and height 0 (zero), as explained in the tutorial.

Simply put the edge height must be raised or lowered for the smoothing to work which could cause problems on other parts of the spline transformation with excessive edge deformation, requiring extra smoothing using the smoothing brush

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now