superheatedsteam, on 16 October 2015 - 10:07 PM, said:
I am working on a 2D loco cab and having problems with the scaling values in the position function.
Position ( 155 348 x y )
Using the above for reference, if I change the 'y' value the animation graphic scales as documented. However changing the 'x' value appears to have no effect on the scaling. I have tried values form 0 to 100 with no visible effect.
This is for a MultiStateDisplay > Type ( THROTTLE_DISPLAY MULTI_STATE_DISPLAY ), multi-frame animation as used in the default Dash 9 locomotive.
The background 2D texture of the cab is 1920x1080. The area that the throttle_display physically occupies on this background texture is 30 x 40 pixels. I therefore created a 9 frame animation graphic comprising 3 frames across and 3 frames down that totals 90 x 120 pixels. I assumed this would provide a non distorted, pixel perfect overlay over the background image.
When in game I used the the y value to make the throttle_display fit horizontally within a border. This was fine but the vertically the graphic was only filling in 80% of the border. To work around this I increased the vertical height of each animation frame in order to fill in this space but this in turn changed the horizontal scaling in game. Do I need to perform jiggery pokery with the animation graphic dimensions and scaling factor to get it to fit pixel perfect, or am I missing something in relation to the scaling parameters for animation frames?
I am using OR v 1.0.1.3095.
Cheers,
Marek.
Its good to some taking advantage of this adavance. Now I am not the author of this code, I discovered OR could do this during a deliberate search for such a feature (Note 1). The effect you are describing is the way it works, you have to do the graphic for the animation in an aspect ratio that makes the control look right on the panel. I may say I have never had any problem with this. I always do the graphics as one sees them in real life, ie one cannot scale the aspect ratio of an animation only the graphics size, one has to set the scaling factor by trail and error as it seems to vary from cabview to cabview. (Note 2)
Have you tried my Bluebird cabview, I meant to include the original graphics in TGA format as an example so that anyone could see how I achieved the final result. Note I have only actaully done tthree control animations and two of these are on the Bluebird. The reason for this is all my cabviews are based around the instruments so the driver can read them correctly. This usually means most controls are out of frame.
Note 1: I saw that OR could scale the cabview to suit the monitor, I reasoned i it could do this maybe it could scale the gauges and animations as well.
Note 2: I have OR set up NOT to scale the aspect ratio of the cabview (i cannot rememeber exactly what the option is at the moment), I do this so the controls look correct.
If there's any more questions please feel free to ask.
To the Elvas Towers GURU's, this is now the second question on Hi res 2D cabs, would it be possible to gather both together and make i "sticky" some where so anyone else could see the particular question was asked. The manual delibrately contains little practical info to keep it from getting into "epic" proportions.
Lindsay