The International Simutrans Forum

 

Author Topic: MaK DE 1002  (Read 31629 times)

0 Members and 1 Guest are viewing this topic.

MaK DE 1002
« on: November 21, 2008, 09:27:36 PM »
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!
« Last Edit: November 21, 2008, 09:45:27 PM by the almighty snark »

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: MaK DE 1002
« Reply #1 on: November 21, 2008, 09:53:26 PM »
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.

Re: MaK DE 1002
« Reply #2 on: November 21, 2008, 09:58:08 PM »
Cheers! ;D Sounds pretty straight forward, il check it out tommorow!


Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: MaK DE 1002
« Reply #3 on: November 21, 2008, 10:08:59 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.

Re: MaK DE 1002
« Reply #4 on: November 22, 2008, 06:36:19 PM »
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 :)

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: MaK DE 1002
« Reply #5 on: November 22, 2008, 07:04:21 PM »
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).

Re: MaK DE 1002
« Reply #6 on: November 22, 2008, 07:15:05 PM »
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

Re: MaK DE 1002
« Reply #7 on: November 22, 2008, 09:25:48 PM »
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!

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: MaK DE 1002
« Reply #8 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.

Re: MaK DE 1002
« Reply #9 on: November 22, 2008, 09:40:50 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?
« Last Edit: November 22, 2008, 09:53:46 PM by the almighty snark »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10641
  • Languages: De,EN,JP
Re: MaK DE 1002
« Reply #10 on: November 22, 2008, 09:59:04 PM »
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.

Re: MaK DE 1002
« Reply #11 on: November 22, 2008, 10:08:24 PM »
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!

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: MaK DE 1002
« Reply #12 on: November 22, 2008, 10:11:20 PM »
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.

Re: MaK DE 1002
« Reply #13 on: November 22, 2008, 10:21:15 PM »
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?

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: MaK DE 1002
« Reply #14 on: November 22, 2008, 10:26:09 PM »
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.

Re: MaK DE 1002
« Reply #15 on: November 22, 2008, 10:36:02 PM »
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.

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: MaK DE 1002
« Reply #16 on: November 22, 2008, 10:45:48 PM »
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.

Re: MaK DE 1002
« Reply #17 on: November 22, 2008, 10:53:45 PM »
Thanks, i got some usefull value's from looking at those. Il post some more info tomorrow!

Offline Zeno

  • ENASSA Designer
  • Devotees (Inactive)
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: MaK DE 1002
« Reply #18 on: November 22, 2008, 10:54:55 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.

Re: MaK DE 1002
« Reply #19 on: November 22, 2008, 11:02:06 PM »
Weight : 90T
Max Speed: 90 KM/H
power : 1320 kW
Engine : Diesel
gear : unknown

Intro date 1986 -1993

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: MaK DE 1002
« Reply #20 on: November 22, 2008, 11:13:25 PM »
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 ?
« Last Edit: November 22, 2008, 11:15:43 PM by DirrrtyDirk »

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: MaK DE 1002
« Reply #21 on: November 22, 2008, 11:35:29 PM »
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.

Offline Zeno

  • ENASSA Designer
  • Devotees (Inactive)
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: MaK DE 1002
« Reply #22 on: November 22, 2008, 11:39:07 PM »
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!

Re: MaK DE 1002
« Reply #23 on: November 23, 2008, 08:54:07 AM »
@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!

Re: MaK DE 1002
« Reply #24 on: November 23, 2008, 10:33:35 AM »
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.

Offline Zeno

  • ENASSA Designer
  • Devotees (Inactive)
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: MaK DE 1002
« Reply #25 on: November 23, 2008, 10:46:55 AM »
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).

Re: MaK DE 1002
« Reply #26 on: November 23, 2008, 10:50:17 AM »
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.

Re: MaK DE 1002
« Reply #27 on: November 23, 2008, 02:29:16 PM »
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 :).

Re: MaK DE 1002
« Reply #28 on: November 24, 2008, 06:12:07 PM »
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.
« Last Edit: November 24, 2008, 07:07:18 PM by the almighty snark »

Offline Zeno

  • ENASSA Designer
  • Devotees (Inactive)
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: MaK DE 1002
« Reply #29 on: November 24, 2008, 07:06:46 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 ;)

Re: MaK DE 1002
« Reply #30 on: November 24, 2008, 07:08:31 PM »
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.

Offline Zeno

  • ENASSA Designer
  • Devotees (Inactive)
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: MaK DE 1002
« Reply #31 on: November 24, 2008, 07:43:54 PM »
Ok then... let me make some calcs... mmm ... aha!  ;D

RC: 103 cents
Cost: 3940000 cents

Re: MaK DE 1002
« Reply #32 on: November 24, 2008, 07:44:51 PM »
Perfect! ;D Thanks a ton!

Re: MaK DE 1002
« Reply #33 on: November 25, 2008, 12:40:42 PM »
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.

Offline vilvoh

  • One of the good guys
  • Administrator (Inactive)
  • *
  • Posts: 4504
  • I'm the constructor, the architect
    • Escala real
Re: MaK DE 1002
« Reply #34 on: November 25, 2008, 12:47:33 PM »
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?
« Last Edit: November 25, 2008, 12:52:07 PM by vilvoh »