The International Simutrans Forum

 

Author Topic: Aircraft rotations and the automatic rendering script  (Read 3759 times)

0 Members and 1 Guest are viewing this topic.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18588
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Aircraft rotations and the automatic rendering script
« on: April 27, 2014, 02:08:45 PM »
I have been working with Giuseppe (Milko) recently on some aircraft, particularly with respect to liveries and rendering. What we noticed was that the automatic rendering script did not correctly align aircraft. Aircraft need to be in the middle of the tile, so the "vehicle" rendering preset does not work. However, using the "normal" preset gives rise to at least one anomalous rotation:



See the rightmost render on this graphic. Giuseppe's (manually) corrected version is:



Does anyone have any idea why the automatic renderer is giving an anomalous graphic? Is it, perhaps, that the "normal" version of the script was intended only for buildings with four (cardinal) rotations, and therefore that the ordinal directions (of which the rightmost image is one) were not all adjusted?

It would be very helpful to be able to automate aircraft rendering - the misalignment of the rightmost image is noticeable when the aircraft is on the taxiway, which is unfortunate. If aircraft rendering could be automated fully, the speed of aircraft production could be increased, and it would be easier to add multiple liveries (which I am planning to do with Giuseppe's help to some of the existing aircraft at some point, as well as possibly assisting Giuseppe with liveries and rendering for new aircraft).

Offline The Hood

  • Moderator
  • *
  • Posts: 2889
  • pak128.Britain developer
Re: Aircraft rotations and the automatic rendering script
« Reply #1 on: April 27, 2014, 03:44:56 PM »
No idea - Is that the SW image (as labelled in the blender output)? Of course you could just add an offset to the dat files, but the solution would be to track down the orientation and fix the camera location in the python script. Unfortunately I can't remember how I worked out the camera locations right now...

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18588
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Aircraft rotations and the automatic rendering script
« Reply #2 on: April 27, 2014, 04:23:45 PM »
The image is North-West rather than South-West. Do you remember whether you modified all of the ordinal directions when adapting my adapted version of Zeno's script to the "normal" rotations, differentiating the "vehicle" rotations?

Offline The Hood

  • Moderator
  • *
  • Posts: 2889
  • pak128.Britain developer
Re: Aircraft rotations and the automatic rendering script
« Reply #3 on: April 28, 2014, 05:45:30 PM »
It was the "vehicle" alignments that I added. The "normal" alignments were the old ones inherited from Zeno's script.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18588
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Aircraft rotations and the automatic rendering script
« Reply #4 on: April 28, 2014, 05:59:47 PM »
Hmm - perhaps Zeno could assist us; is he still around, do you know?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18588
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Aircraft rotations and the automatic rendering script
« Reply #5 on: May 02, 2014, 04:38:13 PM »
With Zeno's assistance, I think that I have managed to fix that: here is the latest version of the script, with a corrected alignment for aircraft.

Example here of a correctly aligned aircraft graphic produced with the modified script:




Offline The Hood

  • Moderator
  • *
  • Posts: 2889
  • pak128.Britain developer
Re: Aircraft rotations and the automatic rendering script
« Reply #6 on: May 03, 2014, 06:15:53 AM »
Great. Is that a new plane or a new livery for an existing one?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18588
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Aircraft rotations and the automatic rendering script
« Reply #7 on: May 03, 2014, 11:02:56 AM »
This is the 707-120 (we currently have a 707-420) in Dan Air livery. This is my attempt at altering the model, but Guiseppe is working on a better version with more accurate wing shapes and scale, so I suggest waiting for that.