Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mapping of huge rail tracks(80miles)
#1
Hi, can you give me some best practices to create these rail tracks? 
The path should be loaded from the file and everything should work in real time.

Tracks and other things related to the train will be generated on the spline.
I need some tips how to optimize this? It is possible to cut spline to smaller spline? Or Maybe one big spline is more efficient.

Thanks.
Reply
#2
Hi,

First of all, read these two pages
https://curvyeditor.com/documentation/ge...performace  (this one is about curvy generators)
https://curvyeditor.com/documentation/sp...erformance  (this one is about splines)

Then (and this is maybe something you are already aware of) the first thing to do if you want to optimize is to profile. Unity included a decent profiler https://docs.unity3d.com/Manual/Profiler.html
Also, if you use a recent Unity version you can download this useful package too https://blogs.unity3d.com/2019/05/13/int...-analyzer/

Then, to answer your specific questions:
  • It is best to generate a mesh from a long spline than generating multiple meshes from small splines and combining them.
  • If needed, Curvy can serialize and deserialize splines from/to Json. More about it here: https://curvyeditor.com/documentation/import_export (functionality available through the API too)
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
Thanks, i will try it.
Reply
#4
Hi,
I have a new question. I have my predefinded long straight spline with only 5 points. And i want to generate meshe in runtime, and unload unsed meshes. Can i generate mesh in space between points? Or mesh can be generated only when start and end are point. What is best approach? Smile
Reply
#5
You can do that by using the Range property of the Shape Extrusion module
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  UV mapping improvements (code included!) bac9-flcl 1 3,477 08-07-2015, 11:50 AM
Last Post: Jake
Question Curvy & Playmaker: Strafe Character to Left or Right on spline (rail) dxpsite 5 7,682 10-01-2013, 07:42 AM
Last Post: Jake
  Rail placing rapid99 5 7,902 05-28-2013, 06:04 AM
Last Post: Jake

Forum Jump: