I got one of the skytrain meshes animated on a track but the positioning is all off. Ill have to keep fiddling with it but eventually there will be animated skytrains preferably with emissive windows at night and a proper sound so you can see it moving on the tracks above as you run the track.
https://github.com/ac-custom-shaders-patch/acc-extension-config/wiki/Tracks-–-Animated-objects CSP animated objects. I have them moving in a line but the offset is weird. Just a simple plane for the track. They move back and forth really nicely on the plane but again... offset into the distance. I need to fiddle with the start position and position offset I think. Code: [ANIMATION_...] NODE = train_node MOVE_ALONG = train_loop ; name of a mesh along which train is going to move¹ NODES_FOLLOWING = train_1, train_2 ; names of carriages attached to the train CLUSTER_THRESHOLD = 3 ; might have to adjust to help trajectory detection STARTING_POINT = X, Y, Z ; for unlooped paths, start here and move to another end INVERT_DIRECTION = 0 ; for looped paths TICK_TOCK_MODE = 0 ; set to 1 to go forwards and backwards CUBIC_INTERPOLATION = 0 ; set to 1 for smoother movement (recommended) SPEED_KMH = 40 ; basic train speed* ; PROGRESS = ; travel progress²* PIECE_LENGTH = 5 ; length of attached carriages LAG_UP = 0.9 ; acceleration lag LAG_DOWN = 0.9 ; deceleration lag DELAY_BETWEEN_RUNS = 0, 0 ; min and max boundaries for a random delay between runs, in seconds DEBUG_PATH = 0 ; set to 1 to highlight resulting path ; Path can also contain local speed adjustment areas: SPEED_ADJUSTMENT_0 = 50 ; target speed for a train within that area* SPEED_ADJUSTMENT_0_POINT = X, Y, Z ; coordinates SPEED_ADJUSTMENT_0_RADIUS = 20, 60 ; radius of full effect and of adjustment start, in meters ; Train can also create new inputs for other conditions, great for attaching audio or lights: SPEED_CONDITION_INPUT = MyNewInput_TrainSpeed PROGRESS_CONDITION_INPUT = MyNewCondition_TrainProgress
Ah yeah, the CSP move along path option... I found it really messy and unreliable, so I do it through keyframe animation
Thinking back on your CSP code, is your node pivot point set correctly? In the middle of the train mesh?
Thanks for the tip. Probably not. Ill have to relook at it. Another issue is the Jumbotrons are showing a very low LOD for the cars with no wheels. Gunnars looked really good so Ill have to go back and figure that out too...
It essentially works like a track side camera, so the distance to the “target” car and FOV parameters need to be set correctly.
Things will slow down for a bit as I travel a bit for work. I still have blender so I should be able to get some lighting done and some trees redone... and possibly an export of some Lidar data
Red lights didnt make a ton of sense... so they are green now And yellow lights are tied to yellow flags via dynamic flags
I figured and have the conditions set up because I want it to have green on, yellow only and then blue up top. Couldn't really figure out the LUTs though... is there a good description of how this works somewhere?
see "extension\config\tracks\common\flag_colors.lut" Code: [CONDITION_...] NAME=RACING_FLAG_GREEN_ONLY INPUT=FLAG_TYPE LUT=(|1=0,1,0|2=0|3=0|4=0|5=0|6=0|7=0|8=0|9=0|10=0|11=0|12=0|13=0|14=0|) [CONDITION_...] NAME=RACING_FLAG_NONGREEN INPUT=FLAG_TYPE LUT=(|1=0,0,0|2=1,1,0|3=1,0.5,0|4=1,0.3,0|5=1,0,0|6=0.7,0.7,0.7|7=1,0.5,0.5|8=0.1,0.1,0.1|9=0,0,0.1|10=0.5,0.5,0.5|11=0.5,0.5,0.5|12=0,0,1.5|13=0,0,0|14=1,1,1|)
That got it... and I looked up the proper RGB for the traffic lights. Set up the blue flag but havent seen it yet.
When you say proper traffic light do you mean it cycling through green amber and red as if it was operating normally? I hadnt really thought of that but it might be interesting to try. Right now its tied into the track flags so the lights go amber in the correct area if there is a yellow flag. Not sure if anyone wants that or not as Im pretty sure its not historically accurate but it does provide some extra interactivity to the environment around the driver.
Im having a lot of trouble getting this to move properly along the test mesh using the wrap mesh code. Ive got a test mesh set up and the skytrain moves along a similar path but floating way out in space but Im using this position in red for pivot point and yet the train is animated along the yellow line out in space. Code: [WRAP_MESHES_...] NAME = _train_node_0 MESHES = SKYTRAIN_01 PIVOT_POS = -3.001, -4.57, 0.2533 PIVOT_DIR = -0.256, 0,0 [WRAP_MESHES_...] NAME = _train_node_1 MESHES = SKYTRAIN_02 PIVOT_POS = -2.705, -4.574, 0.2541 PIVOT_DIR = -0.256, 0,0 [WRAP_MESHES_...] NAME = _train_node_2 MESHES = SKYTRAIN_03 PIVOT_POS = -2.404, -4.573, 0.2539 PIVOT_DIR = -0.256, 0,0 ; Animate train [ANIMATED_...] NODE = _train_node_0 ; node to move MOVE_ALONG = train_path ; move along this mesh (this line sets the movement mode) ;MOVE_ALONG = train_loop ; alternative looped path ; all following parameters are the ones for MOVE_ALONG mode: CLUSTER_THRESHOLD = 3 ; required for finding trajectory from train_path properly CUBIC_INTERPOLATION = 1 ; smooth out path NODES_FOLLOWING = _train_node_1, _train_node_2 ; move those things as well INVERT_DIRECTION = 0 ; for looped paths TICK_TOCK_MODE = 1 ; set to 1 to go forwards and backwards STARTING_POINT = -3.19, -4.573, 0.2375 ; for unlooped paths, start here and move to another end SPEED_KMH = 30 ; basic train speed LAG_UP = 0.99 LAG_DOWN = 0.9 DEBUG_PATH = 0
Not sure if you can use the blender axis values “as is”. Try switching the second and third values? or use the CSP object inspector to get the right position
@Johnr777 to the rescue again. Using OI was it. Had to use world coordinates and not Blender. Skytrain now moving on track. I need to now get a mesh following the proper skytrain track, figure out the emissive windows, and we have moving skytrains ... I think its going to look pretty cool moving at night. Oh, and need a sound too.