Loading textures
+4
LabRatAndy
graymac
mrknowitall
Dexter
8 posters
Page 1 of 1
Loading textures
Well, I never thought I would come up with such a basic question, but what is the exact formulation when I want to assign a texture from the parent directory?
And is there any possibility to assign a texture from another directoy? Thanks.
And is there any possibility to assign a texture from another directoy? Thanks.
Re: Loading textures
LoadTexture,Destination/Front Destination_Maybank.png
this will then open the texture from a folder called "destination" inside the ext_view folder where my .csv item is.
i hope that helped?
this will then open the texture from a folder called "destination" inside the ext_view folder where my .csv item is.
i hope that helped?
mrknowitall- Posts : 824
Join date : 2011-07-09
Age : 32
Location : W. Yorkshire
Re: Loading textures
I think you can insert ..\ in front of the path which will move you back throuh the folder structure by one step every time used. I only use it within my specific route folder though. I've never linked to files in other peoples routes or external pic folders, it's too easy to lose links otherwise.
Re: Loading textures
you need to use the "../" notation for parent directory for example
loadtexture, ../texture/object_texture.png
will look in the parent directory of the current one, for the directory called texture containing the file object_texture.png. You can also go up more than one directory level by using "../../"
graymac beat me to it.
loadtexture, ../texture/object_texture.png
will look in the parent directory of the current one, for the directory called texture containing the file object_texture.png. You can also go up more than one directory level by using "../../"
graymac beat me to it.
LabRatAndy- Posts : 101
Join date : 2011-08-29
Re: Loading textures
I beat you both :O
mrknowitall- Posts : 824
Join date : 2011-07-09
Age : 32
Location : W. Yorkshire
Re: Loading textures
mrknowitall wrote:LoadTexture,Destination/Front Destination_Maybank.png
this will then open the texture from a folder called "destination" inside the ext_view folder where my .csv item is.
i hope that helped?
Yep, that one I know, I was talking rather about looking into a different folder within the same parent directory. But thanks anyway.
graymac wrote:I think you can insert ..\ in front of the path which will move you back throuh the folder structure by one step every time used. I only use it within my specific route folder though. I've never linked to files in other peoples routes or external pic folders, it's too easy to lose links otherwise.
LabRatAndy wrote:you need to use the "../" notation for parent directory for example
loadtexture, ../texture/object_texture.png
will look in the parent directory of the current one, for the directory called texture containing the file object_texture.png. You can also go up more than one directory level by using "../../"
graymac beat me to it.
Thank you both. So if I get it correctly, having folders "...whatever\object\FirstBrnoTrack\Station" and "...whatever\object\FirstBrnoTrack\Scenery", I can create a *.csv within Scenery folder and use "LoadTexture, .../Station/picture.png"?
And one more question - one of you uses reverted slash, one normal. So which one?
Re: Loading textures
I always use backslash \, and it works, don't know if slash / works. Further, I think you are right. Just try!
busheyheath- Posts : 297
Join date : 2012-01-05
Location : Netherlands
Re: Loading textures
Thank you both. So if I get it correctly, having folders "...whatever\object\FirstBrnoTrack\Station" and "...whatever\object\FirstBrnoTrack\Scenery", I can create a *.csv within Scenery folder and use "LoadTexture, .../Station/picture.png"?
And one more question - one of you uses reverted slash, one normal. So which one? Very Happy
Firstly, yes that would work.
Secondly, technically were both correct depends on the operating system. Windows can use both actually and unix flavour oses tend to use slash see here for more detail. I guess openBVE or .net/mono worry about sorting it out for the correct os.
LabRatAndy- Posts : 101
Join date : 2011-08-29
Re: Loading textures
And one more question - one of you uses reverted slash, one normal. So which one?
I seem to remember reading somewhere that you have to use the \ with windows but Linux can take it either way \ or / If you try it you will probably find out soon enough
Re: Loading textures
Also, be aware that while Windows can't tell the difference between "Directory" and "directory", Unix can... and will!
Egg- Posts : 81
Join date : 2011-07-25
Location : Tasmania
Re: Loading textures
Egg wrote:Also, be aware that while Windows can't tell the difference between "Directory" and "directory", Unix can... and will!
OK, that is an important note, thanks!
Re: Loading textures
Egg wrote:Also, be aware that while Windows can't tell the difference between "Directory" and "directory", Unix can... and will!
OpenBVE isn't actually case sensitive.
I forget why, but this came up in the official forums, and Michelle confirmed that it isn't- I *think* this decision was made for backwards compatibility with Windows built routes. Of course, it's a bad habit to do this anyways, but still (Can be very confusing)
Cheers
Chris Lees
http://www.bvecornwall.co.uk
Re: Loading textures
Well, some simple notation on paths:
*nix:
../ : Parent directory
/ : Root [s]directory[/s]
./ : Current directory (usually omitted)
Windows:
..\ : Parent directory
\ : Root directory of the current drive
.\ : Current directory (usually omitted)
X:\ : Reference another drive
Note that openBVE actually converts any '\' and '/' into
Although openBVE doesn't actually sense case, I think it's the best to be case-sensitive when building. You know in *nix you can have case-sensitive directories and files and if you split into different archives they can get mixed up.
P.S. there aren't any path notations using three dots...
*nix:
../ : Parent directory
/ : Root [s]directory[/s]
./ : Current directory (usually omitted)
Windows:
..\ : Parent directory
\ : Root directory of the current drive
.\ : Current directory (usually omitted)
X:\ : Reference another drive
Note that openBVE actually converts any '\' and '/' into
- Code:
System.IO.Path.DirectorySeparatorChar
Although openBVE doesn't actually sense case, I think it's the best to be case-sensitive when building. You know in *nix you can have case-sensitive directories and files and if you split into different archives they can get mixed up.
P.S. there aren't any path notations using three dots...
alvinhochun- Posts : 88
Join date : 2012-05-08
Location : Hong Kong
Similar topics
» .gif Textures - a question
» Overlay Textures
» Textures on a .b3d cube object?
» Landscape are gray and no textures
» [Questions] Large Texture Atlas with Unload unused textures
» Overlay Textures
» Textures on a .b3d cube object?
» Landscape are gray and no textures
» [Questions] Large Texture Atlas with Unload unused textures
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum