Page 1 of 1

Problem Reskinning the FR U30B

Unread postPosted: Tue Feb 12, 2019 11:01 pm
by harryadkins
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

Re: Problem Reskinning the FR U30B

Unread postPosted: Wed Feb 13, 2019 9:45 am
by buzz456
Make the top layer gray like your body and the alpha black and see if that works.

Re: Problem Reskinning the FR U30B

Unread postPosted: Wed Feb 13, 2019 12:15 pm
by JM1261
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.

Re: Problem Reskinning the FR U30B

Unread postPosted: Wed Feb 13, 2019 12:46 pm
by buzz456
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.

Re: Problem Reskinning the FR U30B

Unread postPosted: Wed Feb 13, 2019 10:29 pm
by harryadkins
Thanks for your help.

Harry

Re: Problem Reskinning the FR U30B

Unread postPosted: Wed Feb 13, 2019 10:51 pm
by Alpenfreight
It might be possible to see how cleartracks did their green repaints of it here:

Image

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

Re: Problem Reskinning the FR U30B

Unread postPosted: Wed Feb 13, 2019 11:42 pm
by ZekTheKid
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.

Re: Problem Reskinning the FR U30B

Unread postPosted: Thu Feb 14, 2019 9:03 am
by buzz456
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?

Re: Problem Reskinning the FR U30B

Unread postPosted: Thu Feb 14, 2019 10:17 am
by thegevo5k
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.

Re: Problem Reskinning the FR U30B

Unread postPosted: Thu Feb 14, 2019 12:00 pm
by ChrisOnline
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

Re: Problem Reskinning the FR U30B

Unread postPosted: Thu Feb 14, 2019 2:21 pm
by harryadkins
Thanks for the info, Chris. How do I create a Lua file?

Harry

Re: Problem Reskinning the FR U30B

Unread postPosted: Thu Feb 14, 2019 3:41 pm
by ChrisOnline
Just a basic unformatted text file. Create new text document, change the .txt to .lua, copy the code into the file, and save.

Chris

Re: Problem Reskinning the FR U30B

Unread postPosted: Fri Feb 15, 2019 1:59 pm
by harryadkins
Thanks