Page 1 of 1

Including Terrain Textures from other routes?

Posted: Mon Oct 25, 2010 5:26 pm
by DazDood
Hey all

I've done a bit of looking around and can't seem to find an easy way of doing this...

Anyway the thing I want to know is how I can add a couple of textures e.g. the Track Bed Terrain from GARL to my route template along with the normal default textures...

Anyone got an easy way of doing this?

Regards

Daz

Re: Including Terrain Textures from other routes?

Posted: Mon Oct 25, 2010 5:30 pm
by gypbrc
Hi.

Terrain textures have to be defined in the Route Blueprint and cannot be changed after the route has been created.

Take a looksie here:
http://forums.uktrainsim.com/viewtopic. ... 4&t=108891

Re: Including Terrain Textures from other routes?

Posted: Mon Oct 25, 2010 9:09 pm
by DazDood
gypbrc wrote:Hi.

Terrain textures have to be defined in the Route Blueprint and cannot be changed after the route has been created.

Take a looksie here:
http://forums.uktrainsim.com/viewtopic. ... 4&t=108891
Having looked at that I can't find what references what I need to do...

For note I've made the route blueprint but not the route itself, and I want to know how to use a texture.xml that references both the default textures and few GARL ones as I can't find anything in the above link that explains how to do this. I've even tried to reference a texturing.xml file in my routes blueprint but it justs brings up a Unable to load child blueprint : LCML\LongCoast\Environment\Terrain\Texturing.xml etc

Any help would be appreciated.

Regards

Daz

Re: Including Terrain Textures from other routes?

Posted: Mon Oct 25, 2010 10:03 pm
by longbow
Carry on reading that thread - it seems all terrain textures must be in the same folder so you won't be able to mix and match in the way you have in mind.

Re: Including Terrain Textures from other routes?

Posted: Mon Oct 25, 2010 10:13 pm
by Acorncomputer
Hi

You will not be able to use any textures from payware routes at all in your own routes (unless you are never going to distribute your route) and only some of the default ones from RailWorks can be recreated from the .tga files supplied and distributed.

It would be nice to be able to mix and match terrain textures from anywhere as you please as you work on your route but it does not work like that. If you can put your mind to reading through my tutorial you will be able to create a set of textures that are specific to your route but it does take time and perseverance to do this.

Re: Including Terrain Textures from other routes?

Posted: Mon Oct 25, 2010 11:13 pm
by DazDood
OK I think I've managed to work around this with a bit of jiggery pokery. (Moreso out of pure frustration wanting this to work :crazyeyes: )

For those wishing to do the same here is how I did it.

Before any of this I created my route's blueprint

1 ) I've used RW_Tools to view the texturing.bin from GARL so in this case Assets\TotalizeMedia\GARL\Environment\Terrain\Texturing.bin
2 ) I then located the texture I wished to use, In this case 'Track Bed Old' and then copied the relevant lines into a text file.
3 ) Next I located the texturing.bin in \Assets\Kuju\RailSimulator\Environment\Terrain and copied all of the text from this into a separate text file
4 ) I then copied the reference to the Track Bed Old from my other text file I created earlier into a relevant part of my new text file (in this case after 'Gravel Track Bed')
5 ) With that done I saved as a xml file and placed into my routes product folder, e.g. Assets\ProductName\Route\Environment\Terrain\
6 ) I then opened up RW_Tools again and this time loaded my route's xml file and simply edited the Terrain Blueprint part to reference to my newly created xml file.
7 ) Cleared my blueprints.pak and fired up railworks selecting my route blueprint and creating a new route.
8 ) As you can see my newly referenced texture appears in the list along with the default ones
Image

I Don't see there being a problem if/when I release my route as I am merely referencing to the GARL folder should anyone have it (If not my educated guess is that it will not work)

I hope this helps people should they wish to do the same.

Regards

Daz

Re: Including Terrain Textures from other routes?

Posted: Mon Oct 25, 2010 11:29 pm
by Acorncomputer
Hi Daz

As you say, if you distribute your route then the missing textures will not show if the user does not have the terrain textures you are referring to. It may even crash whilst looking for them.

When creating a texture file from the blueprint, the blueprint expects all the texture .ace files to be in the same folder. There is no opportunity to specify the full path of the location of the textures in the blueprint as the first part of the path is already taken to be the same as the blueprint. If you try to specify a location elsewhere the blueprint will not even load up to edit further.

You seem to have come up with a work around by editing the .xml files but this is not the way the terrain texturing files are intended to work and it cannot be a long term solution, certainly not when used in routes that you intend to distribute.

Re: Including Terrain Textures from other routes?

Posted: Mon Oct 25, 2010 11:57 pm
by longbow
Interesting, my attempt to do that failed. Geoff's caveats are valid re payware textures but it would be much more efficient if a custom texturing.bin can directly alias terrain textures from existing default or freeware routes, especially as RSC has not released source files for the US terrain textures.

Re: Including Terrain Textures from other routes?

Posted: Tue Oct 26, 2010 8:06 am
by Acorncomputer
Hi

I am not sure about the procedural flora either. The way the blueprint is set up there is no specific entry for the paths to the three seasonal procedural flora images as they are deemed to automatically be in the same folder as the terrain images. If it is possible to amend an .xml file to refer to another terrain texture set, does that also mean the procedural flora images for that texture set are referenced instead of the base one. You could end up with corn growing out of tarmac if the main procedural flora is referenced.

It is an interesting concept, however. If the blueprint was created in such a way that you could reference terrain and procedural flora images for elsewhere then that could be very useful. If the blueprint has been designed in the way that it has because the program simply will not work any other way then OK. If it has been designed like this for convenience and could be altered to reference images from elsewhere, then perhaps that will happen one day.

The bottom line is that without creating the terrain texture .xml file by using the blueprint then the process basically involves altering .xml files which is frowned upon by RS.com and could well be a recipe for disaster later on if RS.com change the program and it affects such 'hacked' files adversely. It is fine for routes confined to your own computer but a bit risky for routes that are to be distributed.

Re: Including Terrain Textures from other routes?

Posted: Tue Oct 26, 2010 10:34 am
by longbow
Just to confirm that Dazdood's cut and paste technique works; it seems you need to change more than just the file location. Presumably this means I could now have both US and EU terrain textures in a freeware route. I'll experiment.

Re: Including Terrain Textures from other routes?

Posted: Wed Oct 27, 2010 10:34 pm
by longbow
OK, it works. By cutting and pasting MixTex entries from the relevant texturing.bin files, I now have a combination of US, EU and Acorn terrain textures available in my route. So it seems we can have custom terrain texture palettes without the need for default source files or duplicated texture folders.

There may of course be a reason why the blueprint won't let you do this, other than Kuju not thinking that far ahead. If so I'll let you know.

Re: Including Terrain Textures from other routes?

Posted: Wed Oct 27, 2010 11:24 pm
by Acorncomputer
longbow wrote:OK, it works. By cutting and pasting MixTex entries from the relevant texturing.bin files, I now have a combination of US, EU and Acorn terrain textures available in my route. So it seems we can have custom terrain texture palettes without the need for default source files or duplicated texture folders.

There may of course be a reason why the blueprint won't let you do this, other than Kuju not thinking that far ahead. If so I'll let you know.
Can you check to see which procedural flora is used. Does this come from just one of the terrain sets for all textures or is the procedural flora matched to the terrain set that the texture comes from?

Re: Including Terrain Textures from other routes?

Posted: Thu Oct 28, 2010 12:36 am
by longbow
Good point - I missed that as I usually have procedural textures off. The imported textures appear to reference the procedural texture in the base folder (US in my case), thus I get US scrub flora on my EU rape field texture. There is no procedural texture folder reference in the MixTex entry, just a position reference on the texture itself, so I guess that's hard wired. There's no obvious line in the texturing.bin file that specifies where it looks for the procedural texture; maybe this is determined simply by the location of the first MixTex entry.

However one should be able to get round that either by 1) altering the flora texture number to reference something more suitable, 2) setting Flora Density=0, 3) referencing a different base folder or 4) creating a custom procedural texture file (which would require a custom base folder).

Re: Including Terrain Textures from other routes?

Posted: Thu Oct 28, 2010 8:03 am
by Acorncomputer
Hi Longbow

There are up to 16 different procedural flora images that can be referenced but in the default texture sheets there are only 8 or 9 slots that have been used. For textures that are not from the base set the procedural flora index could be set to say 12 which should mean that no flora shows.

As always, however, this is not the way the terrain files were meant to be used and if, for example, RS.com filled in the gaps in the default procedural flora textures sheets with something other than a space, then that might not be compatible with other terrain sets that reference it.

For personal use amending the .xml files is OK but there could be problems later if this sort of amended file was used in a route to be distributed.

It has been demonstrated that it is possible to mix terrain sets in one route, however, so perhaps RS.com will eventually devise an official way to do this, which would be very popular.