Problem Reskinning the FR U30B

Post your problems and installation issues here!

Problem Reskinning the FR U30B

Unread postby harryadkins » Tue Feb 12, 2019 11:01 pm

Hi Guys. I'm trying to make the logo on the Feather River WP U30B transparent. Usually editing the alpha channel to 0-0-0 will render the image transparent, but doesn't work in this instance. In fact, the default file has a 32-32-32 alpha channel. Any suggestions? I only found one U30B reskin in the file library and that user edited the image that appears but didn't make it transparent. I want to make the logo transparent so I can place static locomotive numbers in that spot.

Harry
You do not have the required permissions to view the files attached to this post.
User avatar
harryadkins
 
Posts: 3096
Joined: Sun Aug 23, 2009 8:01 am
Location: South Carolina, USA

Re: Problem Reskinning the FR U30B

Unread postby buzz456 » Wed Feb 13, 2019 9:45 am

Make the top layer gray like your body and the alpha black and see if that works.
Buzz
39 and holding.
"Some people find fault like there's a reward for it."- Zig Ziglar
"If you can dream it you can do it."- Walt Disney
Image
User avatar
buzz456
Site Admin
 
Posts: 20908
Joined: Sun Mar 21, 2010 8:30 am
Location: SW Florida

Re: Problem Reskinning the FR U30B

Unread postby JM1261 » Wed Feb 13, 2019 12:15 pm

You can’t alpha out the logo, I’m afraid. You’ll have to either paint it to match the rest of the engine, or use decals on top of it.
JM1261
 

Re: Problem Reskinning the FR U30B

Unread postby buzz456 » Wed Feb 13, 2019 12:46 pm

You are right. I don't know why they do this. I ran into this a couple of years ago on the nose on the BSB F7 where they did this so you couldn't just alpha it out and move on.
Buzz
39 and holding.
"Some people find fault like there's a reward for it."- Zig Ziglar
"If you can dream it you can do it."- Walt Disney
Image
User avatar
buzz456
Site Admin
 
Posts: 20908
Joined: Sun Mar 21, 2010 8:30 am
Location: SW Florida

Re: Problem Reskinning the FR U30B

Unread postby harryadkins » Wed Feb 13, 2019 10:29 pm

Thanks for your help.

Harry
User avatar
harryadkins
 
Posts: 3096
Joined: Sun Aug 23, 2009 8:01 am
Location: South Carolina, USA

Re: Problem Reskinning the FR U30B

Unread postby Alpenfreight » Wed Feb 13, 2019 10:51 pm

It might be possible to see how cleartracks did their green repaints of it here:

Image

https://cleartrackstrainsim.wixsite.com ... ives-packs
https://alpenfreight.wordpress.com/

I hear the train a comin'
It's rollin' 'round the bend
User avatar
Alpenfreight
 
Posts: 397
Joined: Fri Jan 09, 2015 8:32 am
Location: Boston

Re: Problem Reskinning the FR U30B

Unread postby ZekTheKid » Wed Feb 13, 2019 11:42 pm

Could the "node" trick possibly do something? I'm not very good in that area, but I do remember Martin Ashwill doing something along the same lines for the GN E7.
Image
Anthony Nguyen
Youtube: https://www.youtube.com/fastfreightstudios
GeForce RTX 3050Ti Mobile, AMD Ryzen 7 5800H, 16GB RAM, 3TB Storage

It's January. So long...
User avatar
ZekTheKid
 
Posts: 2430
Joined: Mon Dec 29, 2014 6:05 pm
Location: Cumberland, MD

Re: Problem Reskinning the FR U30B

Unread postby buzz456 » Thu Feb 14, 2019 9:03 am

ZekTheKid wrote:Could the "node" trick possibly do something? I'm not very good in that area, but I do remember Martin Ashwill doing something along the same lines for the GN E7.


Node trick? What's that?
Buzz
39 and holding.
"Some people find fault like there's a reward for it."- Zig Ziglar
"If you can dream it you can do it."- Walt Disney
Image
User avatar
buzz456
Site Admin
 
Posts: 20908
Joined: Sun Mar 21, 2010 8:30 am
Location: SW Florida

Re: Problem Reskinning the FR U30B

Unread postby thegevo5k » Thu Feb 14, 2019 10:17 am

buzz456 wrote:
ZekTheKid wrote:Could the "node" trick possibly do something? I'm not very good in that area, but I do remember Martin Ashwill doing something along the same lines for the GN E7.


Node trick? What's that?


Basically, it's where a script deletes a certain part of the model. In this case, it would be the numbers. I've had a look at the geo file, and it appears to be using TrainSpecEnvMask.fx on the logo, which means Clear Tracks used a child object and covered it up on his repaints of the U30B. If the shader was TrainDecal.fx, ARGB 0-0-0-0 would work just fine. This is however, not the case. I'll compile a script later today that gets rid of it. Shouldn't be hard at all.
thegevo5k
 

Re: Problem Reskinning the FR U30B

Unread postby ChrisOnline » Thu Feb 14, 2019 12:00 pm

I think you will find that the child object node (within the .Geo file) is named "logos". Making the texture file transparent actually *is* working, but you can't tell, because the node continues to display the child object.

It is 36th in the TransformName list, making it number 35 (as the first starts at 0). If you use RW_Tools to open the .Geo file, and then Find . . <TransformID d:type="sInt32">35</TransformID>, you will find the relevant child object block of code. You could just delete this block of code, but of course you would not be able to distribute the changes in a reskin pack.

So the following script will do the job

Code: Select all
require("Assets/DTG/FeatherRiver/RailVehicles/Diesel/U30B/WesternPacific/Engine/U30BEngineScript.out")

old_Initialise = Initialise;
old_Update = Update;

function Initialise()
   old_Initialise();
   Call("BeginUpdate")
end

function Update( p_nInterval )
   old_Update( p_nInterval);
   Call("*:ActivateNode", "logos", 0 )
        --don't do Call("EndUpdate") as it will stop the Update function, which will also stop the old Update function

end


I should say, credit for this goes to Chris Barnes who used to do a lot of scripting work to improve particles on UK locos, and who originally posted this on TrainSimDev.com several years ago.

Call("*:ActivateNode", "logos", 0) is the fairly well known code to disable the node, but the rest is important to prevent this script from interfering with the original DTG script

I suggest calling this script NewU30BEngineScript.lua, and of course the loco's .bin file will need the scripting line at the bottom of the file edited to call this new script name:

Code: Select all
<ScriptComponent>
   <cScriptComponentBlueprint>
      <Name d:type="cDeltaString">DTG\FeatherRiver\RailVehicles\Diesel\U30B\WesternPacific\Engine\NewU30BEngineScript</Name>
   </cScriptComponentBlueprint>
</ScriptComponent>


EDIT: By the way, you don't need to edit the logo's texture file (as it is associated with the disabled node), but you do still need to extract the original .out file from the .ap file even though you haven't edited it.

Hope this helps

Chris
ChrisOnline
 
Posts: 331
Joined: Tue Oct 02, 2012 11:47 am

Re: Problem Reskinning the FR U30B

Unread postby harryadkins » Thu Feb 14, 2019 2:21 pm

Thanks for the info, Chris. How do I create a Lua file?

Harry
User avatar
harryadkins
 
Posts: 3096
Joined: Sun Aug 23, 2009 8:01 am
Location: South Carolina, USA

Re: Problem Reskinning the FR U30B

Unread postby ChrisOnline » Thu Feb 14, 2019 3:41 pm

Just a basic unformatted text file. Create new text document, change the .txt to .lua, copy the code into the file, and save.

Chris
ChrisOnline
 
Posts: 331
Joined: Tue Oct 02, 2012 11:47 am

Re: Problem Reskinning the FR U30B

Unread postby harryadkins » Fri Feb 15, 2019 1:59 pm

Thanks
User avatar
harryadkins
 
Posts: 3096
Joined: Sun Aug 23, 2009 8:01 am
Location: South Carolina, USA


Return to Problems and Peculiarities

Who is online

Users browsing this forum: No registered users and 1 guest

cron