Custom DynaTrax profiles?

Collapse
X
Collapse
First Prev Next Last
 
  • Time
  • Show
Clear All
new posts
  • Preki
    Member
    • May 2010
    • 40

    #1

    Custom DynaTrax profiles?

    So... how to create custom DynaTrax profiles? From what I see these are shape profiles saved as a plain text file which can be extruded into an actual track object in the route's world. In the future I'll need a profile for 600 mm gauge track identical to track objects from the Feldbahngleise package. It will make my work much easier when I'll start building the forest railways around Hajnówka in future updates of my upcoming project.
  • eric
    Owner/Admin


    • Dec 2002
    • 8449
    • MP36 UPRR Harvard Subdivision
    • English, SQL
    • General

    #2
    It's simple once you start to see the pattern of how the files are constructed. What's used in the Dynatrax Profile is only slightly different in construction from the TrProfile.stf used to render dynamic track in OpenRails, and you can re-use the coordinates there to build either from the other.

    Each line extruded is grouped as part of either Base, Railtops, or Track, with a specific material attached to each. I don't know the breakdown of the settings for the materials, but you can experiment or re-use one that's already created.

    Within each line to be extruded is the points/vertices that make up the polyline, and each is contained within brackets: (X, Z, 0, UVmap X, UVmap Y)


    Here's an example for a 717mm track system:

    Code:
    profileSet=UK Narrow Gauge
    support=http://support.trainsimfiles.com/
    minSegAngle=0.6
    minSegLength=1.25
    maxSegLength=20
    
    material=BASE (UKNCleanTrack1.ace,0,BlendATexDiff,LinearMipLinear,OptSpecular0,none,test,0,3.125)    
    material=TRACK (UKNCleanTrack2.ace,-1,TexDiff,LinearMipLinear,OptSpecular0,none,normal,4.764,0)    
    material=RAILTOPS (UKNCleanTrack2.ace,-1,TexDiff,LinearMipLinear,OptSpecular25,none,normal,4.764,0)
    
    $ballast="[BASE](-1.25,0.2625,0,-0.1389,0)(1.25,0.2625,0,0.862,0)"
    $rails="[TRACK](-0.43375,0.2625,0,0,0.9323)(-0.43375,0.325,0,0,0.9954).[RAILTOPS](-0.43375,0.325,0,0,0.886)(-0.35875,0.325,0,0,0.769).[TRACK](-0.35875,0.325,0,0,0.9954)(-0.35875,0.2625,0,0,0.9323).(0.35875,0.2625,0,0,0.9323)(0.35875,0.325,0,0,0.9954).[RAILTOPS](0.35875,0.325,0,0,0.769)(0.43375,0.325,0,0,0.886).[TRACK](0.43375,0.325,0,0,0.9954)(0.43375,0.2625,0,0,0.9323)
    
    profile Narrow_2_Foot {
        profilename=UK Narrow Gauge
        gauge=0.7175
        lods=100,400,1200
        degrade=1,2,4
    
        object TRACK {
            subobject=0
            profile=0,$ballast
            profile=0,$rails
            profile=1,$ballast
            profile=1,$rails
            profile=2,$ballast
        }
    }
    This above produces "flat track" similar to XTracks and the original Kuju track. You could modify that to change the shape of the rail or ballast as you see fit, including adding in more points to produce a true rail shape or a shaped 3D ballast.

    Change the values above, and you might get close:

    original --> new
    0.43375 --> 0.344
    0.35875 --> 0.300
    0.2625 --> 0.2
    0.325 --> 0.3
    1.25 --> 1.0

    You'll have positive and negative values for all five.

    Last edited by eric; 05-16-2024, 18:15.
    If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, items saved in our library or the ongoing development of our TSRE Fork, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

    Comment

    • Preki
      Member
      • May 2010
      • 40

      #3
      That's what I tried with literal trial-and-error and here's the initial result:
      Click image for larger version

Name:	Rotfl_track.png
Views:	449
Size:	931.9 KB
ID:	2303487

      Not so pretty to say the least, but at least now I understand how these values work. I think that converting any shape from the package and importing it to Gmax will ease things a little bit since I can read exact vertex coordinates. Nevertheless, I can't believe there's no "what you see is what you get" to create more complex shape profiles for DynaTrax, there must be some way to convert *.s shape data into a profile so the DynaTrax-generated track object fits like a glove to static tracks from FineScale or DBTracks packages.

      Comment

      • eric
        Owner/Admin


        • Dec 2002
        • 8449
        • MP36 UPRR Harvard Subdivision
        • English, SQL
        • General

        #4
        The ballast looks perfect. Don't change anything there..

        The track and rail tops values look to be about double what they should be. Divide those by 2 and try again and it will probably look much better.

        If you are willing to try something different, there is a script available in Python for Blender that can generate track sections. First you create a track profile which is Json based, and then a separate Json file which contains the output file name as well as the track geometry. I've used that to create crossings, slips, turnouts, and several other somewhat complex pieces.

        Contribute to dajones42/dte development by creating an account on GitHub.
        If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, items saved in our library or the ongoing development of our TSRE Fork, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

        Comment

        • Preki
          Member
          • May 2010
          • 40

          #5

          Click image for larger version

Name:	Rotfl_track2.png
Views:	549
Size:	1.19 MB
ID:	2303536
          I used the values you provided and the resulting shape is exactly how I wanted it to be! Texture mapping needs some adjustment, but I'll handle that myself. Big thanks.

          Comment

          • eric
            Owner/Admin


            • Dec 2002
            • 8449
            • MP36 UPRR Harvard Subdivision
            • English, SQL
            • General

            #6
            Glad it worked. Looks great.
            If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, items saved in our library or the ongoing development of our TSRE Fork, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

            Comment

            Working...