News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Modern Vehicles

Started by The Hood, December 16, 2014, 08:54:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

NoMorePacers

What exactly needs doing?

jamespetts

In terms of the code, there is a list here. (Actually, since I posted that message, one coder has taken an interest in working on several features, which is quite promising, but it would be enormously helpful to have more).

In terms of pakset work, we could do with more trees, the road vehicles all need re-scaling and we could do with a better range of them, we are short of aircraft (these are a bit trickier than some other vehicles, partly because of the high standard set by Giuseppe), we could probably do with some more ships, it would be good to have more variety of town halls through the ages, more attractions would very much be welcome (things like swimming pools, police stations, fire stations, prisons, courts, hospitals, more schools, leisure centres, community centres, museums, galleries) as would more city buildings. The city buildings are probably the easiest to do more of; the greatest need is probably in road vehicles, attractions and aircraft (in that order). Many if not all of these would be worthwhile for Standard, too.
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.

fam621

James, the debug of 12.0 that you sent me, I deleted something and it wont work. Its keeps saying "FATAL ERROR".... Can it be possible to send me a full file of it on the site you gave me the debug on please? Please compile the convoys from standard and the liveries for me please.... :)

Moe Ron


jamespetts

We have those very ones in the pakset thanks to The Hood.
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.

fam621

When the BR Class 350 is introduced in June 2005, it doe's not carry the delivered livery.... Instead it carries London Midland livery. When I choose W. Midlands PTE, it does not show the Centro/Silverlink livery.... :(

jamespetts

It ought to have the delivered livery available, which looks like this:



I think that there is a bug in the .dat file where the livery is given the wrong name. I had assumed that the delivered livery is not specific to a franchise and had put it under the generic label of "Private operator", but had mis-spelt this name in the .dat file. However, what you write about a Centro/Silverlink livery makes me wonder whether this should properly be called "Private operator"; is the livery above actually a Centro/Silverlink livery, or is it indeed an unbranded generic livery from the manufacturer awaiting vinyls?
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.

fam621

Okay, may I have an updated .dat file please?

Milko

Hello fam21

James has update the file on github. You may found the updated file on github https://github.com/jamespetts (here you may find all the updates).

Branch half-heights

Giuseppe

fam621

How are the .dat files meant to work?

Rollmaterial

Quote from: fam621 on August 19, 2016, 11:58:11 AM
How are the .dat files meant to work?

.dat files are source files for paksets. You have to compile the pak from the sources from github. Here's a tutorial to compiling Simutrans-Experimental and Pak128.Britain-Ex: http://forum.simutrans.com/index.php?topic=14254.msg141124#msg141124

jamespetts

Quote from: fam621 on September 30, 2016, 10:16:29 PM
For those who don't know, there is a soft of similar topic to this in the Experimental version of the Pak128.Britain. Link to it: http://forum.simutrans.com/index.php?topic=15665.0

That topic is more a request for new vehicles than showcase of new vehicles that have actually been added.
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.

jimbolimbo9

Hi, has there been any further advancements on the developments shown here?
James L

My Flickr - click here.

jamespetts

Hello - welcome to the forums! There has not been any further production of modern vehicles since those last shown in this thread; the developer who was focussing on modern vehicles, The Hood, has stepped down from developing owing to becoming a new father (see here for details).

I am currently working on road vehicles, some of which will be modern, but, aside from my annual Christmas pakset project, have to concentrate on coding work at the present, and there are not any other active developers.

I am trying to encourage others to get involved in producing new objects for the pakset. The workflow for graphics has very recently got a lot easier (a new system implemented in the code a few months ago allows using graphics automatically exported from the 3d modelling program, Blender, without any post-processing at all), so I do recommend that you have a go if you would like to see more things.
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.

jimbolimbo9

Ah ok, will need to get accustomed to using Blender. I am certainly willing to produce some modern buses for the pak, but I heard there were some scaling issues that needed to be rectified first?
James L

My Flickr - click here.

jamespetts

#120
I learnt to use Blender from this tutorial. There are many sections there that you can ignore entirely for the purposes of Simutrans graphics creation, including anything to do with nodes, particle effects, the game engine, animation, soft bodies, bump mapping, normal mapping and more or less everything in the "advanced" category.

The best thing to do is to download some of the existing .blend files from one of the two repositories (here and here) and modify it (e.g. to create a very similar but slightly different vehicle, or a different livery for the same vehicle; the different liveries are only used in Simutrans-Experimental, however).

For exporting the graphics from Blender, you will need to use this Blender script (there are multiple tutorials on how to install a Blender script: it is very simple).

To use the new, easier workflow, make sure that "output" under render options is set to RGBA rather than RGB (so that Blender automatically adds the transparent background so that you don't have to do it separately); most of the older .blend files have "output" set to RGB, which will produce black backgrounds.

For road vehicles, you need to set the "Rendering views for Simutrans" Blender plugin to "Render 8 views normal alignment". For any other type of vehicles, including trams, rail vehicles, water vehicles and aircraft, you will need to set "Rendering views for Simutrans" to "Render 8 views vehicle alignment". For buildings, signs, signals, stations and stops, you will need to set it to "Render 4 views normal alignment". You can ignore the "make masks" button on that plugin: it is designed for a different pakset's workflow.

Once you have the graphics (8 .png files per vehicle, one for each alignment as will be produced automatically from the Simutrans render plugin), you need to create the .dat file. The .dat file is a text file used to specify the vehicle's data, such as its name, introduction date, capacity, power, graphics and so on. Again, the easiest thing to do is to adapt an existing .dat file. Note that there are some parameters in .dat files that are only relevant to Simutrans-Experimental.

Once you have the .dat and .png files, you will need to compile these into .pak files using a program called makoebj. There is a separate makeobj for Simutrans-Experimental and for the normal version of Simutrans (Simutrans-Standard). .pak files compiled for Simutrans-Experimental cannot be used with Simutrans-Standard, and .pak files for Simutrans-Standard will lack the data necessary for the Simutrans-Experimental specific features. You can download versions of makeobj for both Standard and Experimental from links on these forums.

Edit: For road vehicles, you will need to specify offsets in the .dat files. Do this just by copying the following code, and replacing the name of the graphics in this instance ("daimler-wagonette") with the name of the graphics in question:


EmptyImage[E]=./images/daimler-wagonette_E.0.0,-33,14
EmptyImage[SE]=./images/daimler-wagonette_SE.0.0,-13,0
EmptyImage[S]=./images/daimler-wagonette_S.0.0,0,0
EmptyImage[SW]=./images/daimler-wagonette_SW.0.0,-8,10
EmptyImage[W]=./images/daimler-wagonette_W.0.0,4,5
EmptyImage[NW]=./images/daimler-wagonette_NW.0.0,12,10
EmptyImage[N]=./images/daimler-wagonette_N.0.0,0,33
EmptyImage[NE]=./images/daimler-wagonette_NE.0.0,0,24


For Simutrans-Experimental, if you want to specify liveries, a slight change in the format is required, as in this example:


liverytype[0]=General-early
liverytype[1]=General

EmptyImage[E][0]=./images/lgoc-x-type-double-general-early_E.0.0,-33,14
EmptyImage[SE][0]=./images/lgoc-x-type-double-general-early_SE.0.0,-13,0
EmptyImage[S][0]=./images/lgoc-x-type-double-general-early_S.0.0,0,0
EmptyImage[SW][0]=./images/lgoc-x-type-double-general-early_SW.0.0,-8,10
EmptyImage[W][0]=./images/lgoc-x-type-double-general-early_W.0.0,4,5
EmptyImage[NW][0]=./images/lgoc-x-type-double-general-early_NW.0.0,12,10
EmptyImage[N][0]=./images/lgoc-x-type-double-general-early_N.0.0,0,33
EmptyImage[NE][0]=./images/lgoc-x-type-double-general-early_NE.0.0,0,24

FreightImage[E][0]=./images/lgoc-x-type-double-general-early-loaded_E.0.0,-33,14
FreightImage[SE][0]=./images/lgoc-x-type-double-general-early-loaded_SE.0.0,-13,0
FreightImage[S][0]=./images/lgoc-x-type-double-general-early-loaded_S.0.0,4,0
FreightImage[SW][0]=./images/lgoc-x-type-double-general-early-loaded_SW.0.0,-8,10
FreightImage[W][0]=./images/lgoc-x-type-double-general-early-loaded_W.0.0,4,5
FreightImage[NW][0]=./images/lgoc-x-type-double-general-early-loaded_NW.0.0,12,10
FreightImage[N][0]=./images/lgoc-x-type-double-general-early-loaded_N.0.0,0,33
FreightImage[NE][0]=./images/lgoc-x-type-double-general-early-loaded_NE.0.0,0,24

EmptyImage[E][1]=./images/lgoc-x-type-double_E.0.0,-33,14
EmptyImage[SE][1]=./images/lgoc-x-type-double_SE.0.0,-13,0
EmptyImage[S][1]=./images/lgoc-x-type-double_S.0.0,0,0
EmptyImage[SW][1]=./images/lgoc-x-type-double_SW.0.0,-8,10
EmptyImage[W][1]=./images/lgoc-x-type-double_W.0.0,4,5
EmptyImage[NW][1]=./images/lgoc-x-type-double_NW.0.0,12,10
EmptyImage[N][1]=./images/lgoc-x-type-double_N.0.0,0,33
EmptyImage[NE][1]=./images/lgoc-x-type-double_NE.0.0,0,24

FreightImage[E][1]=./images/lgoc-x-type-double-loaded_E.0.0,-33,14
FreightImage[SE][1]=./images/lgoc-x-type-double-loaded_SE.0.0,-13,0
FreightImage[S][1]=./images/lgoc-x-type-double-loaded_S.0.0,4,0
FreightImage[SW][1]=./images/lgoc-x-type-double-loaded_SW.0.0,-8,10
FreightImage[W][1]=./images/lgoc-x-type-double-loaded_W.0.0,4,5
FreightImage[NW][1]=./images/lgoc-x-type-double-loaded_NW.0.0,12,10
FreightImage[N][1]=./images/lgoc-x-type-double-loaded_N.0.0,0,33
FreightImage[NE][1]=./images/lgoc-x-type-double-loaded_NE.0.0,0,24


This also gives an example of the loaded and empty graphics which are useful to have for old open top 'buses where it is possible to see whether there are people on board or not. This system is also useful for lorries that are not entirely enclosed so that it is possible to see the load, if there is one.

Just to be clear, the "EmptyImage" and "FreightImage" system (empty and full graphics) can be used both in Experimental and Standard, whereas the liveries (the zero and one, etc. in square brackets after FreightImage or EmptyImage can be used only in Experimental.

Because the pakset is open source (under the Artistic Licence 1.0), you may only modify and distribute existing objects and .blend files (and your objects can only be included in a release of the pakset) if and in so far as the new objects/graphics/.blend files that you produce are also made available under the Artistic Licence 1.0.

***

Road vehicles are indeed in the process of being rescaled. If you want to work on 'buses, therefore, I recommend that you start by using one of the new .blend files in the relevant directory of my repository: look for .blend files with a modification date of December 2016 or newer. These will already be set up for rendering with the new system and be in the correct scale.

In order to calibrate the scale accurately, you can import this 15 meter ruler into Blender. In Pak128.Britain, we use a slightly odd scaling system, in that the width and height are 1.25 times the scale of the length. Also, any vehicle over 15 meters in length uses a special logarithmic scaling system, as a linear scaling system would result in large ships and aircraft being too big to fit in the largest allowed size of graphics. However, rail and road vehicles are never this long, so if you are concentrating on those, you can ignore this complexity.

All of the road vehicle graphics except those that I am rescaling now (the work is in progress, so more will be re-scaled the further in the future from this post that one goes) will be to the wrong scale. The rail vehicles should mostly be to the correct scale, except for earlier (pre-1960s) wagons, many of which are too large (I have not got around to re-scaling those yet). The trams, aircraft and boats should all now be to the correct scale.

***

I hope that this is helpful. I am posting all of this here because the official guide is now rather out of date, but you might find that it contains some useful information not in this post. If there is any conflict between this post and the official guide, however, follow this post, as it is more up to date.

Do let us know if you have any queries or get stuck, and we will be glad to help you.
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.

jimbolimbo9

Thank you James, will try this later. One question, when you mention creating 'liveries', could I make a different livery of a bus (say the Enviro400) and make it compatible in Standard, therefore making it a 'new vehicle' in the vehicle list?
James L

My Flickr - click here.

jamespetts

Quote from: jimbolimbo9 on December 27, 2016, 06:40:05 PM
Thank you James, will try this later. One question, when you mention creating 'liveries', could I make a different livery of a bus (say the Enviro400) and make it compatible in Standard, therefore making it a 'new vehicle' in the vehicle list?

Yes, that is certainly possible. You would have to have different .dat files for each livery/vehicle that way, however.
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.

jimbolimbo9

Is there any other software other than Blender that I can use? Tried installing but it throws up an error basically saying that my laptop isn't man enough to run it.
James L

My Flickr - click here.

jamespetts

It may be possible in theory to use something other than Blender, but I do not know what other software might be used or how to go about using it. It would certainly be much more difficult than using Blender, as you would not be able to use the automatic scripts.

Are you sure that the problem is with your hardware? Until last year, I was running Blender on an ancient Athlon 3000XP at my parents' house, with an equally ancient graphics card. What exactly is the error message?
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.

jimbolimbo9

Quote from: jamespetts on December 29, 2016, 04:07:10 PM
Are you sure that the problem is with your hardware? Until last year, I was running Blender on an ancient Athlon 3000XP at my parents' house, with an equally ancient graphics card. What exactly is the error message?

From what I remember vaguely it was something to do with OpenGL 2.1
James L

My Flickr - click here.

jamespetts

Quote from: jimbolimbo9 on December 29, 2016, 04:19:59 PM
From what I remember vaguely it was something to do with OpenGL 2.1

I don't think that I can assist much without more detail. Does your laptop have any sort of 3d acceleration at all? You may be better off asking on the Blender forums about this issue.
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.

jimbolimbo9

I have found this from another forum. Seems like my laptop model has issues with running Blender.
"After attempting to run Blender after installing it, I finally hit upon the idea that my integrated graphics card probably doesn't like Ubuntu very much, and that all the things that weren't working had to do with OpenGL and/or 3d hardware acceleration."
James L

My Flickr - click here.

jamespetts

That is most unfortunate. Were there any workarounds/fixes suggested? I don't think that I shall be able to assist you to overcome general OpenGL issues any better than people on the Blender/Ubuntu forums, I am afraid.
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.

jamespetts

Did you manage to make any progress with your Blender/OpenGL issues in the end?
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.

jimbolimbo9

Quote from: jamespetts on January 02, 2017, 04:44:40 PM
Did you manage to make any progress with your Blender/OpenGL issues in the end?

Hi, sorry for the (long..!) delay in replying, went off Simutrans for a while. Got myself back into it, and sadly I've not solved the issues. I'm willing to give ideas for new vehicles and possibly some supporting photos but sadly I won't be able to make them  :-[
James L

My Flickr - click here.

jamespetts

Welcome back! It is splendid that you are still interested in working on Simutrans; it is a shame that you are still having technical troubles with OpenGL.

Sadly, ideas and photographs are in plentiful supply (I now follow you on Flickr for the latter); it is the work needed to implement them into Simutrans that is lacking.

Are you sure that you cannot solve your OpenGL issues? When I searched for the phrase that you quoted in the post above, I found a thread on ubuntuforums.org marked as [SOLVED], the solution being in this post. The person who had the problem was running an ACER Aspire 5735Z. Is this similar to what you are running?
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.

jamespetts

Actually, there is one thing that you could do if you really cannot get your 3d graphics working, which is assist with the work on sound. I have in recent months added quite a number of sounds for road, rail and air vehicles (the ships already had a variety of horn sounds), but a number of sounds, mainly for road vehicles, are still missing, especially for lorries and vans and some very early petrol engined 'buses.

In summary, adding sounds involves trawling Youtube for videos with suitable sounds (i.e. a clean recording of 5-10 seconds of the relevant vehicle accelerating from a stop, or, in the case of an aircraft, taking off; you can sometimes cheat if the initial part is not clean by getting the sound of the vehicle accelerating from second gear, etc.), asking the video poster's permission to use it and any other videos on the channel in Simutrans under the Artistic Licence 1.0 (explaining that Simutrans is a non-commercial, open source game), and then, on permission being given (the response rate is very approximately 20%, of which about 90% are positive responses), recording the sound from the video using Audacity or similar, selecting the relevant 5-10 seconds of sound, adding a very short (1/10th of a second or so) fade in at the beginning and a much longer fade out at the end (road vehicles in particular benefit from a long fade out), and then adding the video poster's details to credits.txt in the /sound directory.

As will be appreciated, this is an easy if somewhat time consuming job, but I find it quite satisfying.
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.

fam621

Hello James, I've been wondering that its been a long time since new liveries have been added to Simutrans and I am currently planning on doing 2 liveries or more for the game.

jamespetts

Quote from: fam621 on August 21, 2017, 05:09:01 PM
Hello James, I've been wondering that its been a long time since new liveries have been added to Simutrans and I am currently planning on doing 2 liveries or more for the game.

Splendid - do let me know how you get on. If you have any questions about how to do this, do post them in a separate thread and I shall do my best to assist.
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.

NoMorePacers

Quote from: fam621 on August 21, 2017, 05:09:01 PM
Hello James, I've been wondering that its been a long time since new liveries have been added to Simutrans and I am currently planning on doing 2 liveries or more for the game.
What liveries?

fam621


NoMorePacers

There are some liveries I would like for my new map later on - however the map will take a long time and I'll probably do them myself.

jamespetts

Quote from: NoMorePacers on August 21, 2017, 07:47:06 PM
There are some liveries I would like for my new map later on - however the map will take a long time and I'll probably do them myself.

Do let me know if you need any pointers for producing these liveries - any work would be much appreciated.
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.

NoMorePacers

Nothing now as the pakset covers the early 1970's fairly well, I may model some slam-door units (nothing major) but I'm fine for now. Thank you for offering your assistance, I appreciate it immensely.