Jump to content

Spline CSV Creator Panel (updated)


WrinkleysRule

Recommended Posts

  • Wrinkley

This updated Spline CSV Creator Panel script now creates a .obj file of the newly created spline for direct import into Blender without the need to convert from a .csv file


All that is now required to import the spline into Blender is to select 'File -- Import -- Wavefront.obj' and navigate to the location of the CSVdata folder and select the spline_CSV.obj file.

 

Download the Spline CSV Creator Panel.zip (available at the bottom of this post) unzip and copy/paste in the following directory

C:/Users/******/AppData/Local/GIANTS Editor 64bit 9.0.6/scripts

Replacing * with your computer name.

 

Using the script is the same as before so in,
GE Select - Scripts -navigate to where the script is located and select it, a pop up will appear.

W1pETKW.png

Select the required spline
Enter the required CSV Distance
Select 'Create CSV'

A new folder called CSVdata will have been created (if not already there) in the same folder as your map.i3d
containing the following files (spline name will be whatever it is called in the Scenegraph)
spline_CSV.i3d   - new spline with the set number of cv's.
spline_CSV.obj   - new spline.obj for direct import into Blender (this will still need converting to a curve in Blender to create roads etc)
spline_CSVdata.txt - Csv data list for import into Blender using the Spline CSV importer

Bear in mind that ALL Panel scripts can only be used with GE version 9.0.4 and above any previous version (e.g.8.2.2) will still require to use the old scripts that required the use of the Script Editor in GE .

A link to this update will be added to the relevant tutorials

Spline CSV Creator Panel.zip

Link to comment
Share on other sites

  • 1 month later...

How could I modify this script to do multiple splines at one time?  I have generated about 500 splines for a large map using some python scripts (splines that define field edges, for the purpose of AutoDrive).  However, these splines don't conform to the terrain and I'm struggling to merge what you're doing with your script with the large quantity.  Is there a way to run this script for "all selected" splines rather than the "first" selected spline?

Link to comment
Share on other sites

  • Wrinkley

As it appears you only require the splines you would have to rewrite the script so that just the splines are created and using the multiple spline entry section from the
EditorUtils.paintTerrainBySpline script in the EditorUtils.lua (which can be found in C:/Users/YOUR COMPUTER NAME/AppData/Local/GIANTS Editor 64bit 9.0.6/scripts/EditorScripts) to allow multiple splines to be selected, though given the large number of splines (approx 500 of unknown length) I would expect it to take a fair few hours to create all the new splines notwhistanding any crashes/freezes that may/may not occur.
I may be mistaken but as far as I'm aware Autodrive only uses splines(traffic/AI) for route management not for the creation of courses.

Link to comment
Share on other sites

Ok.  I'll have to scratch my head on this one for a bit here.  ChatGPT has been my friend in coding this so far but I'll have to figure out how that function you mentioned works for multiple inputs.

For what it's worth, I'm setting these all up as traffic splines, so that when starting a new savegame the game prompts you to generate AD routes based on traffic splines.  After doing this, I can then pull those routes into AD course Editor and manipulate from there.  I won't do all 500 at a time, but batches sure beats doing individual prompts 500 times.

Edit:  As an alternative I found a way to generate my original splines along the terrain heightmap rather than using your script.  Your comment got me thinking the right direction!

Thanks for the response!

Link to comment
Share on other sites

  • Wrinkley

The CSV script is primarily for use where the spline is created away from the terrain for example tracing the road layout along the Google Earth Layout image then executing the script so that the new spline follows the terrain contours and road shape.

It can also be used to crete a rough spline path with minimal CV's and then create a new spline with a chosen number of CV's for greter accuracy when setting terrain height and road layout.

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