Texture Files

General discussion about RailWorks, your thoughts, questions, news and views!

Moderator: Moderators

Locked
pspvoyager220
Well Established Forum Member
Posts: 565
Joined: Fri Nov 28, 2008 6:08 pm
Contact:

Texture Files

Post by pspvoyager220 »

Hi,
I have decided to try my hand at a bit of reskinning.
However, after cloning my .bin file of a loco using RW_Tools into a new folder, why is it that when I open the desired texture file it is semi transparent, like this?

Image

Yet, viewing the Tgpcdx file in RW_tools, the texture is fine?
User avatar
Traveller54
Very Active Forum Member
Posts: 2877
Joined: Mon May 15, 2006 11:13 am
Location: Once of Derby, now in Warrington, UK
Contact:

Re: Texture Files

Post by Traveller54 »

Did you make a dds file from the original TgpCdx file first and then open that in your paint program?
[Intel i5-8600K+3.60GHz/16Gb DDR4/NVidia GeForce GTX 550ti 4Mb/1 x SATA3 120Gb SSD, 3xSATA3 2Tb/Win10 Ultimate 64bit]
Trav ..... :-)
http://www.oakwood-shed.co.uk/sww5/sww_route5.html
User avatar
gypbrc
Very Active Forum Member
Posts: 1813
Joined: Thu Feb 11, 2010 8:09 pm

Re: Texture Files

Post by gypbrc »

It's semi-transparent because the alpha layer is set to be semi-transparent. The alpha layer gives the object the 'shine' of metal (for example). The alpha layer is shown explicitly in paint.net, whereas the viewer shows the image without the transparency.
pspvoyager220
Well Established Forum Member
Posts: 565
Joined: Fri Nov 28, 2008 6:08 pm
Contact:

Re: Texture Files

Post by pspvoyager220 »

Traveller54 wrote:Did you make a dds file from the original TgpCdx file first and then open that in your paint program?
Yep, converted using RW_tools.
gypbrc wrote:It's semi-transparent because the alpha layer is set to be semi-transparent. The alpha layer gives the object the 'shine' of metal (for example). The alpha layer is shown explicitly in paint.net, whereas the viewer shows the image without the transparency.
Thanks for that Rich; so how can I edit the alpha layer to not show as semi transparent?
User avatar
Traveller54
Very Active Forum Member
Posts: 2877
Joined: Mon May 15, 2006 11:13 am
Location: Once of Derby, now in Warrington, UK
Contact:

Re: Texture Files

Post by Traveller54 »

pspvoyager220 wrote:
Traveller54 wrote:Did you make a dds file from the original TgpCdx file first and then open that in your paint program?
Yep, converted using RW_tools.
Rather than RW_Tools try DXTBmp from here http://www.mnwright.btinternet.co.uk/ - much better control IMHO?
[Intel i5-8600K+3.60GHz/16Gb DDR4/NVidia GeForce GTX 550ti 4Mb/1 x SATA3 120Gb SSD, 3xSATA3 2Tb/Win10 Ultimate 64bit]
Trav ..... :-)
http://www.oakwood-shed.co.uk/sww5/sww_route5.html
User avatar
karma99
Very Active Forum Member
Posts: 2329
Joined: Wed Oct 17, 2007 8:21 pm
Location: Portsmouth, UK

Re: Texture Files

Post by karma99 »

Paint.NET handles alpha channels differently to most other packages.
It's a nice WYSIWYG appearance to them, however due to the way RW shaders often use the alpha channel for things other than translucency (gloss level for example) Paint.NET is not ideal for this thing.
I would recommend GIMP for getting the main image and alpha channels seperately. Personally I then put them into Paint.NET as I find this by far the friendliest art package available.
Image
Links: Shop <> Blog <> Facebook
User avatar
gypbrc
Very Active Forum Member
Posts: 1813
Joined: Thu Feb 11, 2010 8:09 pm

Re: Texture Files

Post by gypbrc »

Paint.NET is not the best at handling the alpha layers. The easiest way to 'remove' the alpha layer is to create a new layer, colour it white, move it to the bottom of the layer stack and then merge the reskin layer onto it. Of course, then you'll have the problem of you more than likely want to original alpha layer back to put over the top of your reskin. There are ways of doing it, and there are plug-ins which let you work with .psd files (photoshop files) as imports, which split the layers explicitly. Or, like Pete said, use another program to complement Paint.NET.
styckx
Very Active Forum Member
Posts: 3989
Joined: Mon Jul 27, 2009 8:33 pm

Re: Texture Files

Post by styckx »

Add a all black layer under the texture layer. The gimp works the same way.

Edit: whoops saw that was already said. I blame my phone for not seeng it. :)
User avatar
gypbrc
Very Active Forum Member
Posts: 1813
Joined: Thu Feb 11, 2010 8:09 pm

Re: Texture Files

Post by gypbrc »

Yeah, listen to Bill; black works better than white :lol:
Kariban
Very Active Forum Member
Posts: 4478
Joined: Sun Nov 07, 2010 4:10 am

Re: Texture Files

Post by Kariban »

Traveller54 wrote: Rather than RW_Tools try DXTBmp from here http://www.mnwright.btinternet.co.uk/ - much better control IMHO?
Even better, find RSBinTool imo. Save DDS from paint prog ->import DDS to RSB -> File | save, it's a very fast process when you're exporting your texture to the game a lot.
My posts are my opinion, and should be read as such.
User avatar
Acorncomputer
Very Active Forum Member
Posts: 10699
Joined: Wed Oct 17, 2007 5:37 pm
Location: Horley, Surrey, (in a cupboard under the stairs)

Re: Texture Files

Post by Acorncomputer »

Hi

In GIMP I found I could select 'new from visible' in the layer menu and keep on doing this on each new layer and eventually you will arrive at a layer that has transparency where it is supposed to be and solid colour where it is supposed to be. You will have to discard all the layers you created to get to the one you wanted.

You can add a new mask layer when you export to bring back the original properties of the file.
Geoff Potter
Now working on my Bluebell Railway route for TS2022
RISC OS - Now Open Source
User avatar
yerkes
Very Active Forum Member
Posts: 2545
Joined: Thu Oct 09, 2003 6:18 am
Location: Kidlington, Oxfordshire

Re: Texture Files

Post by yerkes »

Acorncomputer wrote:You can add a new mask layer when you export to bring back the original properties of the file.
Hi Geoff,

Your instructions are very useful for Gimp. I've been able to add new layers from visible to get the correct layer showing. I've deleted my non-required visible layers - do I also need to delete the original layer that I loaded into Gimp, thereby using only my new 'add from visible' layer?

And what option do I select when adding a new layer mask - is it layer's alpha channel?

Thanks so much for your help. I was very happy reskinning in MSTS - it was much simpler! But I'm slowly getting the hang of RW's differences.
Michael
User avatar
Acorncomputer
Very Active Forum Member
Posts: 10699
Joined: Wed Oct 17, 2007 5:37 pm
Location: Horley, Surrey, (in a cupboard under the stairs)

Re: Texture Files

Post by Acorncomputer »

Hi

I think you can delete the original layer as that is no longer being referenced.

With regard to the Alpha Layer .. this is where I show my ignorance in using graphics programs .. I have created many texture sheets now with GIMP that include transparency but I have never once used an Alpha layer. I always use a Mask Layer which seems to have complete control over transparency of the layers that it is applied to.

If you merge down all layers (for whatever reason you have), the transparency is maintained and then you can add a further Mask Layer to make more transparent areas or fill in some of the areas that were transparent before.

The Alpha Layer must be used for more advanced work but it does not seem to be necessary for any work that requires transparency or translucency of any degree.

Basically I find creating transparent areas dead easy in GIMP. Create a full opaque mask layer (all white) and then use a full black brush to brush away the transparent bits. Ensure you have selected the mask layer of the layer you are working on first and use the opacity slider to produce a translucent instead of transparent area or a grey brush.
Geoff Potter
Now working on my Bluebell Railway route for TS2022
RISC OS - Now Open Source
User avatar
yerkes
Very Active Forum Member
Posts: 2545
Joined: Thu Oct 09, 2003 6:18 am
Location: Kidlington, Oxfordshire

Re: Texture Files

Post by yerkes »

Thanks for this, Geoff. I shall persevere and see how I get on.
Michael
User avatar
yerkes
Very Active Forum Member
Posts: 2545
Joined: Thu Oct 09, 2003 6:18 am
Location: Kidlington, Oxfordshire

Re: Texture Files

Post by yerkes »

Right - texture file seems to work ok. At least, it looks correct in RW_Tools - Graphics Tools > TgPcDx Viewer. What I've done is edit /class86_main_01.TgPcDx to include a name and number - a very basic experiment.

However I can't see the model in-game. Apparently this is usually because the Geo file is missing from the folder, but I can vouch for the fact that it's there. The hierarchy I have is as follows (this is under keithmross/../Class86):

86434
- Cabview
- Driver
- Engine (which includes the Geo file)
- Textures (which includes the edited texture file, class86_main_01.TgPcDx)
- Simulation

What might I have done wrong? Incidentally I followed Mike Simpson's very helpful step-by-step tutorial on his site.


** EDIT: Despite my confident assertion that the Geo file was in the folder, it turns out that I'd somehow mangled the path in the engine .bin file, so it was pointing to the wrong location/folder level. Problem correctly diagnosed thanks to RW_Tools's in-built rolling stock checker, and easily solved also with RW_Tools. Now to work on the texture :)
Michael
Locked

Return to “[RW] General RW Discussion”