Diesel Reskins

Creating and Editing Rollingstock
Itsa Timmy
Hobo
Posts: 28
Joined: Sun Feb 08, 2009 3:53 pm

Diesel Reskins Unread post

I was bored this weekend so I decided to do some FP45 reskins. Note that these are still in beta as I still need to do some tweaking and I plan to add a few more. The Santa Fe and Amtrak versions match with WPandP's modern passenger cars quite well and the MRL one might match the defaults, I haven't checked. Hope you all enjoy and any feedback is greatly appreicated!

Image
Image


Edit: thanks Hawk !*th_up*!
FP45_Pack.zip
(1.83 MiB) Downloaded 353 times
I also threw in two undecorated versions so you can make your own reskins.
Last edited by Itsa Timmy on Tue Feb 10, 2009 1:30 pm, edited 1 time in total.
User avatar
Hawk
The Big Dawg
Posts: 6504
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: Diesel Reskins Unread post

Itsa Timmy wrote:Edit: I can't post attachments, is this disabled for new users?
Yes it is, for the security of the members here, but you should be good to go now. :salute:
Hawk
User avatar
WPandP
Engineer
Posts: 762
Joined: Tue Sep 11, 2007 5:16 pm
Location: Cincinnati, Ohio
Contact:

Re: Diesel Reskins Unread post

Hallelujah!

I've been hoping that someone would do an Amtrak FP45 skin for SO LONG!

These look great, thanks for contributing.
=Winchester, Paston & Portsmouth=
====== We Provide Pride! ======
Itsa Timmy
Hobo
Posts: 28
Joined: Sun Feb 08, 2009 3:53 pm

Re: Diesel Reskins Unread post

I'm glad you like them. :-D I should hopefully have all the minor alignment issues cleaned up and a few more added shortly.

I've decided to dive head first into hex editing and make a dual fp45. I'm doing pretty good so far thanks to bombardiere's and your tutorials, but how do I go about facing my "tender" the other way?
FP45dual1.jpg
User avatar
WPandP
Engineer
Posts: 762
Joined: Tue Sep 11, 2007 5:16 pm
Location: Cincinnati, Ohio
Contact:

Re: Diesel Reskins Unread post

Here's how you turn around.

You have to hex edit the X and Y values of all the points that make up the model. Fortunately, all engines and rolling stock models are set up with the origin (the point where X=0, Y=0, and Z=0) right at the center of the body, down at track level. Thus, what we are doing is spinning the thing 180 degrees around this point. Mathematically, this means that every X and Y value becomes the negative of itself. Z values do not change at all.

I've set up my hex editor to show me 12 columns, as this lines up all the X's in one 4-byte column, all the Y's in another, and the Z's in another. From there, it is pretty easy to just go down the list, changing values. Here's something else I figured out: the floating-point numbers have a neat kind of symmetry that makes the editing go really quick. The value represented by "3F BE 04 C2" becomes its negative by just changing it to "3F BE 04 42" - in the last byte, you change the C to a 4. And anything with ending with "4*" you change to "C*". Occasionally, you get B's and 3's; same thing goes for them. Swap every "3*" with a "B*", and vice-versa.

Now, some complications:

First, most 3DP files contain multiple INST (Instances), which are basically reduced-detail versions of the model. If you leave all of these INST's in the file, then you need to edit each of them in the same way. The game won't crash if you don't, but what will happen is that some player, who has graphics settings ratcheted down to use lower-polygon models, will see a model that doesn't look like what you've promised. I work around this by deleting the INST's beyond the first, and changing the byte that describes how many INST's there are to "01". This forces all players to use the most complex model, which is why I caution players in my Readme files that this mod may tax their system. In practical terms, one mod with a high poly count isn't going to matter much, but as people collect lots of such edited content, their frame rate might slow down a little.

Second, after all the points are declared, there is a section that describes triangles. Each of these begins by listing the three points used, then gives a Normal Vector for each point, then finally a skin coordinate for each point. The Normal Vector controls how the face behaves regarding light sources. To be thorough, one needs to also flip all of these normals (swap C for 4 or B for 3, etc.); otherwise, you end up with the tender looking like it is in shadow somewhat, while the lead unit is in bright sun (or vice-versa). You might not care; my double SD40 set in NW dark blue is so dark, it really isn't noticeable, and besides those engines were usually so dirty that no two of them ever looked exactly alike anyways. But if it does bother you, this is where you fix it. A possible workaround (for engines that are truly symmetrical left and right - the SD40's were not, as there is an air blower bulge on the fireman's side) is to change ONLY the Y values, leave the X values as they are. This will create a model that has all of its faces mirror-imaged, though, so you may have to either edit the skin file, or change the order of points in the triangle descriptions (I can explain that later if needed; just mirroring things in the 2D skin file is probably way easier).

Finally, the Trucks might not be exactly centered around the Origin, so to be safe you'll probably need to go through and flip them, and all of their Bogies, as well. Bogies are just 4 points each, and Trucks are usually just 8 to 16 points (for diesels that is), so this isn't a big deal.

I hope this is enough info for you! Looking forward to what you come up with.
=Winchester, Paston & Portsmouth=
====== We Provide Pride! ======
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: Diesel Reskins Unread post

I hope you don't mind, but I will most likely want to include some of your skins in the Trainmaster express car sets I am working on. I'm working on the idea of getting locomotive skins that correspond to the passenger cars as much as possible. So I'd want to include the Amtrak skins to go with WP&P's Amtrak Budd cars. And this would work out to the default set for the US Express Cars.

Also, I'm interested in any locomotives you make because as I mentioned to WP&P, Canadian RRs pretty much used the same stuff as the US, but for different purposes, and for different lengths of time. An example is the EMD FP9 which can still sometimes be seen in use around here, but have pretty much disappeared in the US a long time ago.
Itsa Timmy
Hobo
Posts: 28
Joined: Sun Feb 08, 2009 3:53 pm

Re: Diesel Reskins Unread post

So far, so good. Thanks again for your help, WPandP.
FP45dual2.jpg
I still need to rotate the trucks and figure out how to rotate the rear lights and remove the headlights. I can't seem to find where they are in the body file, I may mess with the light files and see what happens.

I think I have the stats set up correctly but I'm not sure if its behaving the way its suppose to. I'm probably just being paranoid.

Take a look and let me know what you think.
FP45Double.rar
(297.79 KiB) Downloaded 309 times
And Ned, I don't mind at all, just wait till I get all the bugs out first and credit me in the readme. Ill probably ask Hawk to post them in the downloads section when there ready.
User avatar
WPandP
Engineer
Posts: 762
Joined: Tue Sep 11, 2007 5:16 pm
Location: Cincinnati, Ohio
Contact:

Re: Diesel Reskins Unread post

Looks really good!

As for lights, when I did my double SD40, I was able to edit Y values in the same way, as the lights were separate 3DP files. I left some of them out for the tender, so that only the lead unit has the headlight, but they both have marker lights lit. Like Bogies, the lights were just numbered, and it just keeps loading as many lights as you have sequentially numbered (this would be a way to add, for instance, ditch lights to a modern diesel).

I see you've got the 2D profile figured out, too, so that's good! Beauty shot remains, but I assume you're waiting to do a screen capture until you've got it all worked out.

Next step, of course, is to use these newfound skills to shorten the FP45 into an F40-PH - I'd start by swapping out the trucks for the GP-35's, then adjust all the Body's Y values to fit onto those trucks. Actually, you would have to be selective about which points you move; only the very front (cab) and rear need to move, so you figure out that all the Y-values greater than A or less than B get moved. As for how far they move, I'd compare the trucks - if the FP45's trucks extend out to 35 (maximum Y) yet the GP35's only extend to 30, then you need to move it all by -5. Make sense?

Of course, you'll probably find that the GP-35 trucks don't fit right, due to the long fuel tank. You could either shorten the tank, which means a lot of hunting through the Body.3DP to find the right points, or you could spread the trucks out a little.

So, as you can see, there's a bunch of complications that enter into it when you start 3DP editing, which is why I haven't realized all the potential projects I've visualized so far - including an F40-PH. But there is a lot that can be done.
=Winchester, Paston & Portsmouth=
====== We Provide Pride! ======
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: Diesel Reskins Unread post

Thanks....I was going to wait until you were done since I might want to make some Canadian skins for it as well.

At the same time, I am working on the EMD FP7s and FP9s. I am trying to decide whether I really do need to extend the length of the F3 since it might not be noticeable enough to warrant messing with it. It's only four feet over a 50 ft engine. The difference is in the gearing mostly, as well as skin changes for grills and portholes. So lengthening it may not be necessary. At the same time, I could always just make F7s and F9s since they weren't extended.

But I'm trying to make a passenger specific locomotive that will match the express cars, so I may just change the passenger appeal on the F3 to make it lower, and increase it on the FPs. The main difference is the steam generators for the passenger cars.
User avatar
WPandP
Engineer
Posts: 762
Joined: Tue Sep 11, 2007 5:16 pm
Location: Cincinnati, Ohio
Contact:

Re: Diesel Reskins Unread post

Another thing:

I notice the reversed printing of "Santa Fe" on the lead unit. I know this is because the skin only includes one side, and it is mirrored on the model. In this case, you actually do want it to be mirrored, because of the warbonnet (not to mention all the little doors and grills). The only thing that needs to flip is the text.

There are two ways to deal with this. One would be to squeeze the opposite side into the skin file, and remap the skin coordinates in the triangles descriptions accordingly. This would mean reducing at least some of the regions in the skin file to a lower resolution, in order to clear up some space. As the side of a diesel engine is pretty big, you'd have to clear up a lot of room; my suggestion would be to "squish" it either vertically or horizontally, let's assume vertical. Then, you've got left and right sides stacked on top of each other in the skin file, both squished to half height. This will make future editing difficult, though not impossible. Next, you have to find the two triangles that make up the left side rectangle, and remap their coordinates, moving the bottom points up by half. Do the same for the right side's triangles, moving the top points down by half. The end result is a loss of resolution in the vertical direction, but it may be tolerable.

The second way I can think of is possibly more involved. It is basically a variation of the CargoIcon feature that freight cars use. If you look at the default boxcar, it is just a brown box with minimal lettering. In the game, though, it shows an icon of whatever it is carrying. This is a "decal" of the cargo's icon, on a rectangle that hovers just in front of the car side. We could add a feature like this to an engine, by adding 8 points (4 each side) which are the same as the corners of the sides I mentioned above, except with a slightly greater X-value (like 3.26 versus 3.25). Then, define two new triangles each side to create the rectangles. You've just created a "decal" layer that is just above the engine's side. Now, what you need to do is map that decal layer to a region of the skin file where you have only the text or logo (anything you don't want mirrored). Naturally, this means locating a region where you can do this, and if the skin file is already chock full then you're back to my first suggestion, as you have to resize something and remap in order to fit it in. The benefit to doing things this second way, though, is that it is more flexible - you'll end up with a skin in which you can choose which things are symmetrical versus which are not. In you Santa Fe case, only the words "Santa Fe" would go onto the decal region.

Here is my trick for remapping skin coordinates:

The coordinates in the 3DP file are all "percentages", i.e. they go from 0.00 up to 1.00, with 0.00 being the top or left sides, and 1.00 being the bottom or right sides. Assuming your image editor gives you feedback on where your mouse cursor is (i.e. you are at pixel 64,152), what you can do is resize the image to a useful size, like 1000 x 1000 pixels. Then, as you mouse over a pixel, you can readily convert it in your head - in this case, pixel 64,152 on a 1000 x 1000 image is really 0.064,0.152 for the 3DP.

Another trick:

If you're hunting for the right triangle to remap, you can find it by trial and error. In the first part of the triangle descriptions, where the three points are listed (like point 08, 09, and 0A), just change one of these points to any other point (like 01, 09, 0A). Load the model in-game, and look around for a warped triangle; you've just changed one corner of a face to a whole different point on the model, so there should be a triangular "hole" somewhere. Obviously, if you can make an educated guess then it will be much easier to narrow things down. But this is essentially how I go about figuring out which points to edit on a model - just change one value to an errant value, then examine the model for the error. Incidentally, if you need to rotate the skin as it is mapped onto a triangle, just change the order of the points in this declaration section. For instance, (09, 0A, 08) is a rotation of (08, 09, 0A); you don't have to change the skin coordinates below. And, to mirror image, you need both triangles that make up the rectangle, then swap pairs of points. For instance, if the second triangle is (0B, 09, 0A), then your four points are 08, 09, 0A, and 0B. By examining the coordinates for X and Y values corresponding to each of these points, you may be able to determine that 08 and 09 share the same X values, as do 0A and 0B. This means 08 and 09 are the left side of the rectangle, while 0A and 0B are the right. We already can deduce that 08 and 0B are at diagonally opposite corners, since they are unique to the two triangles, but you can also just examine the Y values to determine that 08 and 0A form the top while 09 and 0B form the bottom. It helps to just sketch out a rectangle and write all these down - I go through many sheets of graph paper as I work! Now that you know all of this, to flip it all you have to do is swap 08 for 0A and 09 for 0B, and vice-versa. By just changing the calls to the point numbers, you don't have to get into the more difficult coordinate remapping.
=Winchester, Paston & Portsmouth=
====== We Provide Pride! ======
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: Diesel Reskins Unread post

After reading all that...okay...I couldn't follow most of it....I am not going to bother extending the F3 for the FP7s and FP9s.
!*00*!
User avatar
WPandP
Engineer
Posts: 762
Joined: Tue Sep 11, 2007 5:16 pm
Location: Cincinnati, Ohio
Contact:

Re: Diesel Reskins Unread post

NedF,

It's actually rather more difficult to explain it than to do it!

But I think you'll be fine to use the default F3 body. I just think that E-units, at least, ought to be elongated; I can tolerate an F9 as a stand in for an FP9, in terms of body length. Maybe I'll rework Bombardiere's E-unit mod at some point in the future.
=Winchester, Paston & Portsmouth=
====== We Provide Pride! ======
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: Diesel Reskins Unread post

From what I;ve read, the only difference between any of them is the length of the A unit which is extended by 4 feet. That as far as the body shape. Grills changed, as did portholes, but most of the changes were internal in the electronics and gearing. I'll look into it more.
Itsa Timmy
Hobo
Posts: 28
Joined: Sun Feb 08, 2009 3:53 pm

Re: Diesel Reskins Unread post

Interestingly enough, there is actually just enough room to fit a duplicate of the side on the top of the skin file, all I have to do is find a place to put the deck texture. Take a look at my undecorated targa and you'll see what I mean. When I get the points figured out and changed, I might as well do the same to the original FP45 but I'm not sure if I should replace the original files or add another engine to the mix. Do you have alot of problems with people screwing stuff up when you have them replace files?

As for an F40-PH, Ill probably hold off on a full engine mod untill I have things figured out a little better. (I only started skinning a week ago) I have a few easier things that I would like to attempt such as an SD40T-2 (Remove the 3 rear fans on your SD40 and add a big boxy vent to replace them, with your permission of course) and a set of Amtrak superliners (Use the autorack as a base?) so If you find time to make one, by all means go right ahead!
User avatar
WPandP
Engineer
Posts: 762
Joined: Tue Sep 11, 2007 5:16 pm
Location: Cincinnati, Ohio
Contact:

Re: Diesel Reskins Unread post

Honestly, I think the F40-PH would be a simpler mod than the Tunnel Motor, though both are achievable. As for the Superliner from an Autorack, NedF and I have been talking about that exact project for a little while. I had actually started out that project. The problem with it is that there is not an available cargo type to make use of it, assuming that we want to keep the Amtrak coach that I've already made. Nobody has yet figured out how to add another express cargo (such as "Tourists"), and even if we did, there is a hard-coded limit to the number of cargoes available in-game. The only use I can come up with for a Superliner is to be a later-era replacement for the coach, which isn't optimal but could work. It could begin around 1990 to 1995, and persist until game end.

Don't let me discourage you from making one! Ned's intent on creating a system whereby we can swap out express sets just by moving PK4's around, and I'm sure he can make use of a Superliner in at least one express set. For my own express set, though, I'm not going to add it.

As for not screwing up files by modding, that is why I tend to assign unique names to all the assets I create. I minimize the number of files that get replaced or overwritten when installing; my coal hoppers, for instance, have no effect on the game's default HopA, HopB, HopC, and HopD assets; rather, the game is directed to load up Hcoal assets instead. If you want to make changes to the FP45, I'd suggest altering the references to assets in the CAR file and naming your revised 3DP's in a unique way. That way, recovery to defaults is as simple as restoring the original CAR file. Make sense?
=Winchester, Paston & Portsmouth=
====== We Provide Pride! ======
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: Diesel Reskins Unread post

The Superliner is a double decker car, whereas I am more interested in the dome car for the Budd cars to use as a diner.

It would be easy to incorporate these cars into an express module in the set up I am working on, and for users to swap in and out of the game based on there preferences.

I'm still working on the FP 7 and FP 9, and I am considering making two sets of Canadian stuff, on for CP rail and the other for CN.

I'm also thinking of adjusting the years on the eras slightly.

Something else I want to try is to name the passenger skins with 1, 2, etc, and see of the game randomizes, or allows you to change the skin. Not sure if it will work, but I'm going to try it out this weekend.
Itsa Timmy
Hobo
Posts: 28
Joined: Sun Feb 08, 2009 3:53 pm

Re: Diesel Reskins Unread post

I got the trucks and lights fixed but now I'm having problems converting the X,Y coordinates for the skin file. I tried using both tiny hexer's calculator and this conversion page. What I'm trying to do is use the highlight values plugin to help me find the correct points. For example, one of the coordinate I need is 0.325, which converts to 3EA66666 using that conversion page. Then having hexer highlight every instance of 3E and A6, along with A5 and A7 just to be thorough, and look for 3EA5xxxx, 3EA6xxxx, ect. In theory this should work, but in practice, it doesn't.
Any help would be greatly appreciated.

As for the superliners, It seems to me as a natural progression for the passenger cars as many American railroads began using bi levels. Plus the added weight would make engine selection more important if speed is needed.
User avatar
WPandP
Engineer
Posts: 762
Joined: Tue Sep 11, 2007 5:16 pm
Location: Cincinnati, Ohio
Contact:

Re: Diesel Reskins Unread post

A value such as 0.325 may actually be 0.32489674 or something like that. Unfortunately, what this means is that we need to really map out which points correspond to which locations in the model. Some things are fairly easy - you can guess from the X, Y, and Z values in the points description. But when you're hunting for one single specific corner of a face, that is where a bunch of graph paper and patience comes in.

When I first start on a 3DP edit, I start by listing all the points and drawing a separator line every 4 points. The reason for grouping into 4's like that is because most faces on the model will be rectangles with 4 corners. There is a declaration right after the first "INST" that says how many points there are, and the numbering of points begins with point 00. Write them down in hex, so it goes 00, 01, 02 ... 0D, 0E, 0F, 10, 11 ... etc. Next, start erring-out the first point, load in game, and check; I usually just make the X value ridiculous by adding 10 or 20 to it. When loaded in game, you'll see that, for instance, the Cab Front Left Top corner is what got warped. Do the same for every 4th point, until you get to the feature you want to edit; then you may want to get more specific and check every point.

The result of all this tedium is a list that verbally tells you what each cluster of points represents. So you can see that the smokestack occurs around points 6A to 74, for instance. Now, you can go scan down through the triangle descriptions until you find triangles composed of points in that range. When you look at the skin mapping corresponding to those points, that's where you'll probably find that not-exactly-0.325 value.

Incidentally, I rarely use the "Replace all" function because it will in fact replace every instance within the file, and you might not want that. What if the Y-value of one of the points is 0.325, but all you mean to change are the X-values of skin coordinates? I do use the Find and Replace function, but I do them one at a time so I can confirm that I'm not changing something I don't intend to. This is something that one can learn the hard way (*ahem*), or you can just take my advice!
=Winchester, Paston & Portsmouth=
====== We Provide Pride! ======
nezo
Hobo
Posts: 13
Joined: Sat Feb 28, 2009 5:05 am

Re: Diesel Reskins Unread post

how do i get these new reskins are they going to be put on the web for download i thenk they look great uve done a fantastic job with them.
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: Diesel Reskins Unread post

The CNR F series diesel electric is available for download here: http://hawkdawg.com/cgi-bin/counter/dow ... l?file=077

This has all three locomotives.

I'm almost done the express cars that go with the above locomotives.

And thanks, I hope you enjoy the locomotives.
Post Reply