Elvas Tower: Why are there only keyframe indexes from 1 - 10 for throttle levers in the 3D CabView animation calculated? - Elvas Tower

Jump to content

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

Why are there only keyframe indexes from 1 - 10 for throttle levers in the 3D CabView animation calculated? Rate Topic: -----

#1 User is offline   jonas 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 548
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 22 February 2023 - 03:29 PM

Hi to all,

A notch subdivision for the throttle lever in 5% steps in the eng file:

		Throttle ( 0 1 0.05 0
			NumNotches ( 21
				Notch ( 0.00      	0 Dummy )
				Notch ( 0.05      	0 Dummy )
				Notch ( 0.10      	0 Dummy )
				Notch ( 0.15      	0 Dummy )
				Notch ( 0.20      	0 Dummy )
				Notch ( 0.25      	0 Dummy )
				Notch ( 0.30      	0 Dummy )
				Notch ( 0.35      	0 Dummy )
				Notch ( 0.40      	0 Dummy )
				Notch ( 0.45      	0 Dummy )
				Notch ( 0.50      	0 Dummy )
				Notch ( 0.55      	0 Dummy )
				Notch ( 0.60      	0 Dummy )
				Notch ( 0.65      	0 Dummy )
				Notch ( 0.70      	0 Dummy )
				Notch ( 0.75      	0 Dummy )
				Notch ( 0.80      	0 Dummy )
				Notch ( 0.85      	0 Dummy )
				Notch ( 0.90      	0 Dummy )
				Notch ( 0.95      	0 Dummy )
				Notch ( 1.00      	0 Dummy )
			)
		)


and an associated 21-frame rotation-animation of the throttle lever in the s-file of the 3D-CabView:

				anim_node THROTTLE:0:0 (
					controllers ( 1
						tcb_rot ( 2
							tcb_key ( 0  0 -0.891007 0 -0.453991 0 0 0 0 0 )
							tcb_key ( 20 0 -0.707107 0  0.707107 0 0 0 0 0 )
						)
					)
				)


You can increase the throttle value twenty times in 5% increments with the D key. However, no 20 single frames of the throttle lever animation are generated by OR. In fact, the throttle lever only moves 10 times in single frames to a final position that corresponds only to the half of the rotation of the throttle lever, instead to the full rotation of the 20th keyframe.

One of the things I have found out so far is that the frame indexes for the animation are always generated directly from the throttle lever value (0 to 1). The throttle lever value is multiplied by 10 and this results the frame value for the animation. As a result, the frame values can never be greater than 10, which does not correspond to the in fact possible animations. At least I haven't found it documented anywhere that throttle animations can only have a maximum of 10 frames and must be accurately numbered from 1 to 10.

In the above example of the 21 notches, the next frame index is actually only generated every 10% by the OR code as seen in the table below:

Throttle | Frame
value |
-----------------------
0.00 | 0. Frame
0.05 | 0. Frame
0.10 | 1. Frame
0.15 | 1. Frame
0.20 | 2. Frame
0.25 | 2. Frame
0.30 | 3. Frame
0.35 | 3. Frame
0.40 | 4. Frame
0.45 | 4. Frame
0.50 | 5. Frame
0.55 | 5. Frame
0.60 | 6. Frame
0.65 | 6. Frame
0.70 | 7. Frame
0.75 | 7. Frame
0.80 | 8. Frame
0.85 | 8. Frame
0.90 | 9. Frame
0.95 | 9. Frame
1.00 | 10. Frame


However, 20 frames are specified in the animation, so the following throttle <-> frame assignment would be expected:

Throttle | Frame
value |
-----------------------
0.00 | 0. Frame
0.05 | 1. Frame
0.10 | 2. Frame
0.15 | 3. Frame
0.20 | 4. Frame
0.25 | 5. Frame
0.30 | 6. Frame
0.35 | 7. Frame
0.40 | 8. Frame
0.45 | 9. Frame
0.50 | 10. Frame
0.55 | 11. Frame
0.60 | 12. Frame
0.65 | 13. Frame
0.70 | 14. Frame
0.75 | 15. Frame
0.80 | 16. Frame
0.85 | 17. Frame
0.90 | 18. Frame
0.95 | 19. Frame
1.00 | 20. Frame

So I think the relationship between throttle lever values and animation frames should be relative and not absolute. At least in MSTS it had worked and works this way with the ace-pictures of a 2D-CabView.

What are your experiences with it?


#2 User is offline   mrmosky 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 648
  • Joined: 02-October 16
  • Gender:Male
  • Location:Chasetown
  • Simulator:Openrails
  • Country:

Posted 23 February 2023 - 12:53 AM

What is the setting for the throttle in the cvf file? That may have an influence.

Geoff

#3 User is offline   Hobo 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 972
  • Joined: 19-December 04
  • Gender:Male
  • Location:Paris,Ont- Canada
  • Simulator:OPEN RAILS & MSTS
  • Country:

Posted 23 February 2023 - 07:21 AM

If you want 20 throttle settings with corresponding lever movement in 2D cab - - - - then you need the same number in the CVF and the same number of animation frames in the throttle ACE file .
You are just seeing the supplied frames in sequence - -right ?
That's in MSTS or OR

In 3D I imagine it would be in the animation of the cab file . You might ask one of the 3D cab modelers here at the Tower .


Just a thought !

#4 User is offline   jonas 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 548
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 23 February 2023 - 03:15 PM

Thanks to both of you for pointing out the cvf file.
I was actually sure that the cvf values had little to do with the problem described above. In the meantime I spent some more hours testing with the cvf lines "NumFrames" and "ScaleRange" and found out that these values also can have an influence.
But what basically remains as a finding for me is that throttle lever values below 10%, for example 1%, in OR never show the second frame of a 3D CabView animation or the second frame in the 2D CabView image sequence. So it must be at least 10% for a change to be seen in the CabView.
I might try to upload an example loco here soon, where you can already see in the 2D CabView that MSTS and OR work differently in the CabView.

#5 User is offline   jonas 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 548
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 23 February 2023 - 06:28 PM

Attached below is the loco in which you can already in the 2D CabView see that for example a 1% throttle value is not displayed in OR.

In the following pictures you can see the throttle lever at 0%, 1%, 10% and 20%, above in MSTS, below in OR.
In MSTS the throttle lever button is already pushed down at 1%, while OR does not show the next image at all until 10%:

Attached Image: Post04.jpg

The notches in the *.eng looks like this:
		Throttle ( 0 1 0.1 0
                        NumNotches ( 12
                                Notch ( 0.00            0 Dummy )
                                Notch ( 0.01            0 Dummy )
                                Notch ( 0.10            0 Dummy )
                                Notch ( 0.20            0 Dummy )
                                Notch ( 0.30            0 Dummy )
                                Notch ( 0.40            0 Dummy )
                                Notch ( 0.50            0 Dummy )
                                Notch ( 0.60            0 Dummy )
                                Notch ( 0.70            0 Dummy )
                                Notch ( 0.80            0 Dummy )
                                Notch ( 0.90            0 Dummy )
                                Notch ( 1.00            0 Dummy )
                        )
                )
Instead of the 0.01 in the second notch entry, you are welcome to enter 0.05 (5%), or even 0.0001, as I actually need.

The used ace file for the throttle has 12 frames (4x3) and is called "CV_THROTTLE_Jm.ace":
Attached Image: CV_THROTTLE_Jm.jpg
It can be found in the Cabview directory of the loco download here:

Attached File  Loco for Throttle Compare MSTS vs OR.zip (958.75K)
Number of downloads: 81

#6 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 7,045
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 23 February 2023 - 09:03 PM

Hello.
As for 2-d cabs:
*.eng's block refers correspondence between part of range (0 1) and needed function (dummy) for every position.
*.cvf refers num frames (of *.ace-file, referred in graphic() parameter) and num positions (where frames should be changed)
Hence, num positions should be set close to *.eng-file notch values.
Also, note, that ORTS parces num frames in different way, than MSTS (what is horizontal number/what is vertical)-try that.
As for 3-d cabs:
Our authors managed 15-pos (16 frames) controllers to work somehow. I'll look for the code for sending You.

#7 User is offline   mrmosky 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 648
  • Joined: 02-October 16
  • Gender:Male
  • Location:Chasetown
  • Simulator:Openrails
  • Country:

Posted 24 February 2023 - 02:29 AM

Hi Jonas,

I just tried my 3d cab, and I see the same behaviour. The first throttle position is always 10%.

I will change some of my parameters to see if I can affect this.

Geoff

#8 User is offline   Hobo 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 972
  • Joined: 19-December 04
  • Gender:Male
  • Location:Paris,Ont- Canada
  • Simulator:OPEN RAILS & MSTS
  • Country:

Posted 24 February 2023 - 09:25 AM

In your CVF there are 2 things that you haven't considered . Numpositions and Numvalues - - - - position of item - - - value of that position .....

They tell where the " lever : should be and the vaue in that position . That way you can choose whichever frame you want at whatever value you want at that position .

Works for me !

Just a Thought !












'

#9 User is offline   jonas 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 548
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 24 February 2023 - 11:53 AM

Thanks for the tip with NumPositions and NumValues! I should have remembered that this is of course important for specifying exactly when to see which frames of the throttle lever. It's been a few years since I completed a 3D CabView and have since obviously forgotten the details.
I wrote this improved lines in my cvf file
NumPositions ( 12 0 1 2 3 4 5 6 7 8 9 10 11 )
NumValues ( 12 0 0.0001 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 )
and the throttle lever now moves in OR (and MSTS) as I need it too. So, Weter, Hobo and Geoff, thanks again for your interest and involvement with this!

Something from the topic here still stuck with me as erroneous though. The second value in the line "Throttle ( 0 1 0.1 0" is interpreted differently by the OR code than how MSTS intended. In MSTS it is a factor, in OR it is a limit.
In MSTS, the values in each notch line are divided by this second value (100*notch value/second value).
In OR, the notch values are always taken as absolute percentages and the second value is used as the maximum throttle value. Maybe this is still worth correcting in the OR code?

#10 User is offline   Jonatan 

  • Vice President
  • Group: Status: Elite Member
  • Posts: 2,664
  • Joined: 29-March 10
  • Gender:Male
  • Location:Somewhere.
  • Simulator:MSTS and Vehicle Simulator
  • Country:

Posted 24 February 2023 - 12:19 PM

I've used 100 frames in my 3D cab controls and I wouldn't see the them move in their full range initially. Then I set the number of frames in the cvf to 100, the controls moved their full range with smooth motion.

So my experience is: The number of frames in the cvf have to match the number of animation frames of the model, and the number of steps in the eng dictate how the control moves. A notched throttle will move in notches, a nothchless throttle will move smoothly across all 100 frames. 1% equals 1 frame.

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users