3D Cabs
#671
Posted 08 September 2021 - 02:55 AM
Try exporting with a tick mark in Retain Names to see if this makes a difference.
I had an issue with a digital speed display (SPEEDOMETER:0:20) that would not work in game. On examination of the .S file with a text editor, I could not find any reference to SPEEDOMETER:0:20. The object merging optimisation does not recognise the 'special' names and as part of the optimisation the names are removed by the geometry stays.
To allow the shape file optimisation, I gave the digital display a 2 frame location (translation) animation of 0.5mm. This is not noticeable in game.
Hope this helps.
Cheers,
Marek.
#672
Posted 21 October 2021 - 08:06 PM
Quote
Actually, even 2 frames are not needed, just give the display a single animation frame (either rotation or location) and it would export just fine .. :) I had the same issue and learned the hard way about this thing .. :unsure: :blush:
#673
Posted 16 December 2021 - 10:59 AM
I've made a reverse lever for my loco, but it doesn't want to center itself. When OR thinks the lever is "centered," the lever is actually in the "reverse" position:
Here's how I defined the lever in the .cvf:
Lever ( Type ( CUTOFF LEVER ) Style ( NOT_SPRUNG ) MouseControl ( 1 ) NumFrames ( 35 ) NumPositions ( 0 ) NumValues ( 0 ) ScaleRange ( -0.85 0.85 ) )
..and here's how it appears in the .s file, a total of 35 frames, -0.85 to 0.85, with each frame at intervals of 0.05:
anim_node CUTOFF:0:0 ( controllers ( 1 tcb_rot ( 35 slerp_rot ( 0 0.25881904 0.0 0.0 0.96592581 ) slerp_rot ( 1 0.24391373 0.0 0.0 0.96979696 ) slerp_rot ( 2 0.22895056 0.0 0.0 0.97343802 ) slerp_rot ( 3 0.2139331 0.0 0.0 0.9768483 ) slerp_rot ( 4 0.19886489 0.0 0.0 0.9800269 ) slerp_rot ( 5 0.18374953 0.0 0.0 0.9829731 ) slerp_rot ( 6 0.16859059 0.0 0.0 0.98568618 ) slerp_rot ( 7 0.15339167 0.0 0.0 0.9881655 ) slerp_rot ( 8 0.13815637 0.0 0.0 0.99041045 ) slerp_rot ( 9 0.12288831 0.0 0.0 0.99242049 ) slerp_rot ( 10 0.1075911 0.0 0.0 0.99419522 ) slerp_rot ( 11 0.09226837 0.0 0.0 0.99573416 ) slerp_rot ( 12 0.07692377 0.0 0.0 0.99703699 ) slerp_rot ( 13 0.06156091 0.0 0.0 0.99810332 ) slerp_rot ( 14 0.04618346 0.0 0.0 0.99893296 ) slerp_rot ( 15 0.03079506 0.0 0.0 0.99952573 ) slerp_rot ( 16 0.01539936 0.0 0.0 0.99988145 ) slerp_rot ( 17 0.0 0.0 0.0 1.0 ) slerp_rot ( 18 -0.01539936 0.0 0.0 0.99988145 ) slerp_rot ( 19 -0.03079506 0.0 0.0 0.99952573 ) slerp_rot ( 20 -0.04618346 0.0 0.0 0.99893296 ) slerp_rot ( 21 -0.06156091 0.0 0.0 0.99810332 ) slerp_rot ( 22 -0.07692376 0.0 0.0 0.99703699 ) slerp_rot ( 23 -0.09226836 0.0 0.0 0.99573416 ) slerp_rot ( 24 -0.10759108 0.0 0.0 0.99419522 ) slerp_rot ( 25 -0.12288829 0.0 0.0 0.99242049 ) slerp_rot ( 26 -0.13815635 0.0 0.0 0.99041045 ) slerp_rot ( 27 -0.15339166 0.0 0.0 0.9881655 ) slerp_rot ( 28 -0.16859058 0.0 0.0 0.98568618 ) slerp_rot ( 29 -0.18374951 0.0 0.0 0.9829731 ) slerp_rot ( 30 -0.19886488 0.0 0.0 0.9800269 ) slerp_rot ( 31 -0.21393308 0.0 0.0 0.9768483 ) slerp_rot ( 32 -0.22895055 0.0 0.0 0.97343808 ) slerp_rot ( 33 -0.24391373 0.0 0.0 0.96979696 ) slerp_rot ( 34 -0.25881904 0.0 0.0 0.96592581 ) ) ) ) anim_node CUTOFF:0:1 ( controllers ( 1 tcb_rot ( 35 slerp_rot ( 0 -0.25881904 0.0 0.0 0.96592581 ) slerp_rot ( 1 -0.24391373 0.0 0.0 0.96979696 ) slerp_rot ( 2 -0.22895056 0.0 0.0 0.97343802 ) slerp_rot ( 3 -0.2139331 0.0 0.0 0.9768483 ) slerp_rot ( 4 -0.19886489 0.0 0.0 0.9800269 ) slerp_rot ( 5 -0.18374953 0.0 0.0 0.9829731 ) slerp_rot ( 6 -0.16859059 0.0 0.0 0.98568618 ) slerp_rot ( 7 -0.15339167 0.0 0.0 0.9881655 ) slerp_rot ( 8 -0.13815637 0.0 0.0 0.99041045 ) slerp_rot ( 9 -0.12288831 0.0 0.0 0.99242049 ) slerp_rot ( 10 -0.1075911 0.0 0.0 0.99419522 ) slerp_rot ( 11 -0.09226837 0.0 0.0 0.99573416 ) slerp_rot ( 12 -0.07692377 0.0 0.0 0.99703699 ) slerp_rot ( 13 -0.06156091 0.0 0.0 0.99810332 ) slerp_rot ( 14 -0.04618346 0.0 0.0 0.99893296 ) slerp_rot ( 15 -0.03079506 0.0 0.0 0.99952573 ) slerp_rot ( 16 -0.01539936 0.0 0.0 0.99988145 ) slerp_rot ( 17 0.0 0.0 0.0 1.0 ) slerp_rot ( 18 0.01539936 0.0 0.0 0.99988145 ) slerp_rot ( 19 0.03079506 0.0 0.0 0.99952573 ) slerp_rot ( 20 0.04618346 0.0 0.0 0.99893296 ) slerp_rot ( 21 0.06156091 0.0 0.0 0.99810332 ) slerp_rot ( 22 0.07692376 0.0 0.0 0.99703699 ) slerp_rot ( 23 0.09226836 0.0 0.0 0.99573416 ) slerp_rot ( 24 0.10759108 0.0 0.0 0.99419522 ) slerp_rot ( 25 0.12288829 0.0 0.0 0.99242049 ) slerp_rot ( 26 0.13815635 0.0 0.0 0.99041045 ) slerp_rot ( 27 0.15339166 0.0 0.0 0.9881655 ) slerp_rot ( 28 0.16859058 0.0 0.0 0.98568618 ) slerp_rot ( 29 0.18374951 0.0 0.0 0.9829731 ) slerp_rot ( 30 0.19886488 0.0 0.0 0.9800269 ) slerp_rot ( 31 0.21393308 0.0 0.0 0.9768483 ) slerp_rot ( 32 0.22895055 0.0 0.0 0.97343808 ) slerp_rot ( 33 0.24391373 0.0 0.0 0.96979696 ) slerp_rot ( 34 0.25881904 0.0 0.0 0.96592581 ) ) ) )
NOTE: "CUTOFF:0:1" is the part that represents the reach rod going toward the power reverse gear.
So guys, please help me out!
#675
Posted 16 December 2021 - 01:08 PM
Lever (
Type ( CUTOFF )
Position ( 357 361 176 60 )
Graphic ( blank.ace )
Style ( NOT_SPRUNG )
MouseControl ( 1 )
NumFrames ( 32 16 2 )
NumPositions ( 32 )
NumValues ( 32 )
Orientation ( 0 )
DirIncrease ( 0 )
ScaleRange ( -0.75 0.75 )
)
Also the entry in the .eng file may need to be changed.
Typically:
Cutoff ( -0.75 0.75 0.01 0
NumNotches( 0 ))
Which is Range -75% 75%, Increment 1%, Initial position 0
It's a bit confusing to work out what interacts with what.
Geoff
Oh, byt the way, well done for trying a 3d cab. It will be worth it in the end.
#676
Posted 16 December 2021 - 01:21 PM
But, the cutoff is notched control anyway.
#677
Posted 16 December 2021 - 04:41 PM
mrmosky, on 16 December 2021 - 01:08 PM, said:
Lever (
Type ( CUTOFF )
Position ( 357 361 176 60 )
Graphic ( blank.ace )
Style ( NOT_SPRUNG )
MouseControl ( 1 )
NumFrames ( 32 16 2 )
NumPositions ( 32 )
NumValues ( 32 )
Orientation ( 0 )
DirIncrease ( 0 )
ScaleRange ( -0.75 0.75 )
)
Also the entry in the .eng file may need to be changed.
Typically:
Cutoff ( -0.75 0.75 0.01 0
NumNotches( 0 ))
Which is Range -75% 75%, Increment 1%, Initial position 0
It's a bit confusing to work out what interacts with what.
Geoff
Oh, byt the way, well done for trying a 3d cab. It will be worth it in the end.
I did everything you said, although I changed the values to reflect 35 frames and -0.85 to 0.85, but the lever still won't center itself.
EDIT: Even with the values changed to reflect 32 frames and 75%, it still won't center itself.
EDIT #2: I uncompressed your .s file and noticed that the keyframes for your cutoff control are tcb_key whereas mine are slerp_rot. Does that make any difference? The Blender MSTS exporter exports slerp_rot by default...
#678
Posted 17 December 2021 - 12:49 AM
Geoff
#679
Posted 17 December 2021 - 06:34 AM
After trying a few things, the problem seems to be in the cvf file.
I have attached a modified one which works for the Regulator and Cutoff, saved in a zip file. You will notice that the main change is to add the following entries for each control:
Position ( 550 270 720 900)
Graphic ( )
These should not be needed as neither of them is related to a 3d cabview. For some reason, however, the controls will not work without them.
I noticed that the mouse cursor is actuating the control from the position of the pivot point on the lever. This is because that is where the centre of rotation is positioned. If you want to have the
mouse actuating at the handle end of the lever, there are a couple of ways to do this. One way is to have another dummy part (it need only be a small one) positioned inside the handle. That should be made a sub-part of the lever in Blender. Then it will move in concert with the lever animation. As this dummy part has a centre in the handle, you can actuate the lever from there. If you want to.
Cheers,
Geoff
Attached File(s)
-
Challenger_Test_Cab.zip (1.11K)
Number of downloads: 182
#680
Posted 17 December 2021 - 10:56 AM
mrmosky, on 17 December 2021 - 06:34 AM, said:
After trying a few things, the problem seems to be in the cvf file.
I have attached a modified one which works for the Regulator and Cutoff, saved in a zip file. You will notice that the main change is to add the following entries for each control:
Position ( 550 270 720 900)
Graphic ( )
These should not be needed as neither of them is related to a 3d cabview. For some reason, however, the controls will not work without them.
I noticed that the mouse cursor is actuating the control from the position of the pivot point on the lever. This is because that is where the centre of rotation is positioned. If you want to have the
mouse actuating at the handle end of the lever, there are a couple of ways to do this. One way is to have another dummy part (it need only be a small one) positioned inside the handle. That should be made a sub-part of the lever in Blender. Then it will move in concert with the lever animation. As this dummy part has a centre in the handle, you can actuate the lever from there. If you want to.
Cheers,
Geoff
Thanks, Geoff. The lever now works perfectly.
You're right about the levers rotating around their pivots instead of the handles. As someone who uses a RailDriver instead of mouse control most of the time, it's something I must've overlooked. However, I do plan on hopefully correcting this--all I need to do is duplicate the lever, adjust the animation accordingly to match the "original" part (used as a guide for animating), and that should fix that.