News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

MaK DE 1002

Started by the almighty snark, November 21, 2008, 09:27:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

the almighty snark

Hello, ive been playing simutrans for quite a while now, and figured i should repay you all for the hard work you' ve done!

So, i decided to create some extra content for people to use. Im a gamedesigner, not graduated yet, but i can find my way around most tools! So i figured i should make one of my favorite locomotives, the MaK DE 1002, the loc that was used as the base for the NS 6400, which i find a joy for the eye to see, couple 5 to eachother with a coal train and feel the earth tremble!

As you can notice, im dutch, so i have been using Raven's NS package a lot! Its wonderfully done! I hope to be able to reach the same style by using 3dstudiomax and rendering it with basic materials. If this project will turn out succesfull then i might try and create more MaK locomotives!

But, i have a question, i think i got most of the proces right, but i couldnt find what i would need to put in the .dat file. If that is set-up correctly then all i need is the PNG and and makeObj?

And thanks again for creating this game!

DirrrtyDirk

Hi and welcome to simutrans and the forum!

The .dat files are just plain text files, containing all the values for the object, in case of vehicles that includes name, speed, power, cost, payload, etc. You might want to check pak64 sources (they're open source, available on sourceforge) for an idea of how .dat and pak files work together. For pak128 all you need to do is use bigger graphics (and a little different command in makeobj).

Out of the .dat file (with all the parameters) and the .png file (with the graphics), makeobj creates a .pak file that simutrans can use.

The hardest and most time consuming part is however simply to draw the graphics. Writing the .dat is easy and creating a pak out of both is the simplest of all. So, when you have the .png ready, you're already 98% done.
  
***** PAK128 Dev Team - semi-retired*****

the almighty snark

Cheers! ;D Sounds pretty straight forward, il check it out tommorow!


DirrrtyDirk

Quote from: the almighty snark on November 21, 2008, 09:58:08 PM
Sounds pretty straight forward

It is.  8) (Well, at least most of the time...)

You might also want to check out the wiki page on vehicles.
  
***** PAK128 Dev Team - semi-retired*****

the almighty snark

Thanks a ton!! ;D That's exactly what i was looking for!

One more question, how should i set-up the rendering for the best results? I set up the camera to orthographic and in a 26.57 down angle but should the vehicle fit in the 128x128 tile? Or is that merely for alignment and how will it effect the display?

Hope im not bothering you to much with n00bie questions :)

DirrrtyDirk

I'm a pixel pusher, not a renderer so I don't know anything about that, sorry.

However, vehicle size follows a certain scale in each pakset, and the length parameter in the .dat file.

In pak128, the scale is something like roundabout 2 - 2.5 meters per length unit. And length=16 is a full tile, so the default value of length=8 results in a vehicle with half tile length. Most vehicles have values between 6 and 10, since there's rarely need for more (or less). As pak128 is not yet open source, you can only check some addons to see about size and position for now.

You might want to checkout the Japanese pak128 addons site, since there are many (but not all) addons published including their source files. For a small and simple engine with sources, maybe try this one (it was done by me a while ago).
  
***** PAK128 Dev Team - semi-retired*****

the almighty snark

Aaah, makes sense! Il just experiment a bit with i until i get something that im happy with. I can only imagine a ludmilla or a clas 66 being a full tile long ;D

the almighty snark

Been experimenting with your source! Works like a charm, although the train now carries a halo around itself, not quite sure where it comes from, but i'm quite sure its my fault. Oh, the cars are from Ravens cargo set!

DirrrtyDirk

Looks like an anti-aliasing problem (or whatever the function for smoothing the edges of the engine with the background is called in your program) Anyhow, looks like your software used several tones of light blue around the edges, instead of the one and only correct RGB-value of 231/255/255.
  
***** PAK128 Dev Team - semi-retired*****

the almighty snark

#9
Quote from: DirrrtyDirk on November 22, 2008, 09:38:32 PM
Looks like an anti-aliasing problem (or whatever the function for smoothing the edges of the engine with the background is called in your program) Anyhow, looks like your software used several tones of light blue around the edges, instead of the one and only correct RGB-value of 231/255/255.

Righto, that is something i can fix !

EDIT:

There still is some white, which seems to appear after it has been saved as a PNG from photoshop, is there anyone else familiar with this kind off compressing?

prissi

Save as PNG with no JPEG compression (should be standard. Or save as BMP, load in paint, fille background with lets say green and edit the pixel and fill it again in transparent color can do the trick too. Imho photoshop is not very useful for pixel pushing. But everyone has the program he can use best.

the almighty snark

Il have to try that, and yes your right, photoshop isnt very helpfull when needing heavy pixel-texture control. I map for a game called Half-Life, and i spend a week getting alpha maps to work correctly. Photoshop almost always interpolates a few pixels to a in-and-between colour. Eventually i got it working, but it wont improve the image for Simutrans, so maby GIMP or Paint.net makes a good alternative next to the tools you mentioned!

VS

It is not about compressing. PNG is lossless - what you give is what you get again (btw, the jpeg extension is JNG and not used at all).

You must either

a) Configure your renderer not to mix background with objects, or

b) Select the colour e7ffff (231,255,255) with some tolerance and clear to this same colour. And when doing so, set the border to not smoothed, or something like this. It must select pixels either 100% or 0%, or there will be again some edge.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

the almighty snark

Thanks VS! It works perfect! All i need to do know is add some more detail and livery's! ;D

Oh, one more question, how should i put the pricing of this locomotive?

DirrrtyDirk

The position still seems to be a little off, but you're certainly getting there.  :)

And pricing... we are (well actually zeno is) creating a new pricing & balancing system for pak128, but that will still take quite a while until it is finished. So in the meantime, just make something up - within reasonable range. For now, just look around pak128 and use some price of a vehicle roughly similar to yours.
  
***** PAK128 Dev Team - semi-retired*****

the almighty snark

Yeah i noticed its a bit off too, might have something to do with the camera or the positioning in the PNG.

Il dive through the PAK files, i noticed Raven priced the trains in the NS pack very low, which would make this loc somewhere around 3000 compared to its spawn, the NS DE 6400 series, which has more power, is smaller and can go 30 KM faster, and is 3504.

I suppose its a bit low? Since its quite easy to make a lot of profit with raven's vehicles.

DirrrtyDirk

Yes, raven concentrated mainly on just creating graphics - he usually didn't care much for "correct" pricing and balancing, leaving that to others who where interested in his works.
  
***** PAK128 Dev Team - semi-retired*****

the almighty snark

Thanks, i got some usefull value's from looking at those. Il post some more info tomorrow!

Zeno

Quote from: the almighty snark on November 22, 2008, 10:21:15 PM
Oh, one more question, how should i put the pricing of this locomotive?
If you give me some data I can make a quick calculation for you. I'll need for that its weight, max speed, power, engine type, gear, and intro date.

the almighty snark

Weight : 90T
Max Speed: 90 KM/H
power : 1320 kW
Engine : Diesel
gear : unknown

Intro date 1986 -1993

DirrrtyDirk

#20
In simutrans, gear is just an internal multiplier for power. You can use it so that a vehicle still shows its real life power value, but internally the power gets modified by the gear factor, so that you can get the intended in-game behaviour, even when the original power value wouldn't allow for it.

So in your case a gear value of 2 (written as 200 in the .dat file) would give it an internal power of 2640kw (while still showing the original 1320).

So you just have to choose a value for that, usually it lies somewhere between 0.8 and 2.5 (= 80, 250 in the .dat file) - just look around other ST vehicles.

EDIT: Oh and intro date is only one year (and month), the other year you can specify is the retire_year (and month). So have you set intro to 1986 and retire to 1993 ?
  
***** PAK128 Dev Team - semi-retired*****

VS

It seems "off track" since the wheels (bogies?) have identical colour to track and gravel underneath it. Make them darker and you may see more clearly how it fits.

For what's it worth, almost all rolling stock in 128 has wheels depicted by only one or two rows of pixels; steam locos have more, but they have huge wheels irl, too.

But do as you please :) If you set your own style and create a large set, internally consistent, it is simply an alternative - not inherently better or worse.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Zeno

I've calculated theorically balanced values for this loco, and are the following:
Purchase price: 45000 cr (DAT value = 4500000)
Running cost: 1.17 cr (DAT value = 117)
Gear: 1 (DAT value = 100, can be ommited)

Try with these values and tell me everybody your impressions; it will be a good feedback for me!

the almighty snark

@Dirk : It is indeed the retire date, 1993.

@VS yeah the gears are a bit screwy, i found that out only after rendering, and i decided that it was something for another day, i also lowered the gears in the 3d model so that there closer to the body for aesthetics purposes.

@Zeno, sounds good! I will have to give it a try to see if they work!

the almighty snark

Zeno, the price and all seems fair, although the acceleration with 8 empty cars behind it seems to be rather slow, should i up the gear a bit?

Although it is pretty realistic, this is a long hauler, not a PAX vehicle.

Zeno

Yes, raise gear to a value wich makes it accelerate as you expect. A value of 1.1 or 1.2 may be enough, but remember you are increasing the power of the loco, and you may get an unwanted result.
The best usually is to adjust and test comparing to other locos of the same ages and similar power, and see if it fits or not in there ;)
When you think you got the correct value, tell me and I'll calculate again the pricing (it will change a little with a higher gear).

the almighty snark

Ok, wil do, il have test it a bit more though, because a small train accelerates pretty fast, and i havent tested it in the standard 128pak yet, only combined with raven's train sets.

the almighty snark

Tested and approved ;D ;)!!

I included the .pak file in this post, i can use some feedback on the pricing, how it handles etc. I think its pretty good right now!

The graphics still needsome reworking, but im quite happy with how it came out :).

the almighty snark

#28
Hey guys, im working on the earlier version of this locomotive, which was introduced in 1982, 4 years earlier. It weighs heavier and has a weaker engine, so if someone would be willing to help me out on the pricing scheme of this one:

Weight : 80-100T
Max Speed: 90 KM/H
power : 1120 kW
Engine : Diesel
gear : unknown

Intro date 1982

Also, if anyone thinks that it would look good in a particular colour scheme then im also open for suggestions :)

EDIT: Here's a render of the current paint scheme, inspired by the HGK DE 93. The red varies on the serval loks painted in this scheme.

Zeno

Quote from: the almighty snark on November 24, 2008, 06:12:07 PM
Weight : 80-100T
gear : unknown
I'll need one defined tonnage... 80 or 100? If it's heavier as you say, I can suppose it's 100tn
Gear: Do your own tests and adjust it, at least a little. After that I'll give you numbers in a minute ;)

the almighty snark

Il keep the gear at 1 so far, it seems to have a decent acceleration when fully loaded, it also looks good. Il go with the 100T, i think they made serval engines for this version.

Zeno

Ok then... let me make some calcs... mmm ... aha!  ;D

RC: 103 cents
Cost: 3940000 cents

the almighty snark


the almighty snark

I completed the second paintscheme for the 1986 version, im working on the 1982 version right now! Here's a screenie for your viewing pleasure ;D.

vilvoh

#34
Looks good but I think you should apply a sharpen filter to the result of the render, in order to get more definition. It looks quite blurry... :-\... Anyway, I like the model. It's simple but the result it's very good. One doubt ¿How did you applied the textures? ¿UV Mapping? ¿projecting them on the model?

Escala Real...a blog about Simutrans in Spanish...