News:

SimuTranslator
Make Simutrans speak your language.

Vehicle add on questions

Started by Andyh, July 29, 2020, 06:42:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andyh

Not sure if this is exactly the right board to post on, but I have a couple of questions related to add on vehicle construction, specifically rail locomotives.  Would be grateful for any advice.


1. What does the "Length" parameter in the vehicle DAT file represent?  What is its function?


2. How can I get the depot icon for my new locomotive to appear correctly (i.e. the correct size and position in relation to the other icons in the depot dialog)?  I can get my new loco to appear in the depot screen with all the necessary functionality, but the icon is too large and is not aligned correctly with the other vehicles on the screen.








jamespetts

The "length" parameter represents how long that the vehicle is in the game. Its function is to ensure that any vehicle coupled immediately after it be positioned correctly. It has no function for vehicles that will not have anything coupled after them.

The graphical representation of vehicles in the depot is automatic, using the in-game vehicle graphics. The vehicle will look correct in the depot if it looks correct in the game. If the appearance of the vehicle in the depot is too large and misaligned, then the graphic itself is too large and mis-aligned and will need to be modified to be smaller and re-aligned.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Andyh

Thanks James.  I'm a little puzzled by the second answer though; it doesn't jibe with my observations.  I took great care (and much trial and error) to position the my new loco.  It now looks fine on the tracks, by itself and when hauling a train.  If one was being really picky you might say it was a pixel or two out of alignment, but no more than that.  But the depot icon is seriously misaligned and overlapping other vehicles. 

jamespetts

Quote from: Andyh on July 29, 2020, 08:26:19 PM
Thanks James.  I'm a little puzzled by the second answer though; it doesn't jibe with my observations.  I took great care (and much trial and error) to position the my new loco.  It now looks fine on the tracks, by itself and when hauling a train.  If one was being really picky you might say it was a pixel or two out of alignment, but no more than that.  But the depot icon is seriously misaligned and overlapping other vehicles. 

It is one specific alignment (the South alignment) used in the depot window, so make sure that this alignment in particular is correct.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Mariculous

Quote from: jamespetts on July 29, 2020, 08:02:22 PMThe vehicle will look correct in the depot if it looks correct in the game. If the appearance of the vehicle in the depot is too large and misaligned, then the graphic itself is too large and mis-aligned
I agree, apart from airplanes and ships, which are generally larger and will often look too large in the depot. Such examples can be found in pak128.britain-ex either.

So take this as a guideline for road and railway vehicles, but don't be too confused if an airplane or ship looks too large in the depot.

jamespetts

Quote from: Freahk on July 29, 2020, 10:13:03 PM
I agree, apart from airplanes and ships, which are generally larger and will often look too large in the depot. Such examples can be found in pak128.britain-ex either.

So take this as a guideline for road and railway vehicles, but don't be too confused if an airplane or ship looks too large in the depot.

This is only true of aircraft and ships if they are intentionally rendered in a higher tilesize than the pakset permits: this is a hack used to allow larger vehicles (such as ships and aircraft) to be represented in the game.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Andyh

Thanks for your help James.  I fixed the issue.  The misalignment seemed to be caused by the "halo" created around an image as a result of rendering with anti-aliasing.  As soon as I turned anti-aliasing off, the image was correctly aligned in the depot screen.

This brings up the more substantive question of how to use anti-aliasing in Blender renders while avoiding the annoying halo effect.  I notice that anti-aliasing is standard protocol for pak 128 Britain Ex.  Are there render settings that prevent or minimize haloing?

jamespetts

Quote from: Andyh on July 30, 2020, 05:59:09 PM
Thanks for your help James.  I fixed the issue.  The misalignment seemed to be caused by the "halo" created around an image as a result of rendering with anti-aliasing.  As soon as I turned anti-aliasing off, the image was correctly aligned in the depot screen.

This brings up the more substantive question of how to use anti-aliasing in Blender renders while avoiding the annoying halo effect.  I notice that anti-aliasing is standard protocol for pak 128 Britain Ex.  Are there render settings that prevent or minimize haloing?

For Pak128.Britain, the render settings are already set up on all of the .blend files - you might find it useful to adapt the .blend file template if you are making objects for a different pakset, or simply re-use it if you are making objects for Pak128.Britain.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.