virtualtex script help
virtualtex script help
If anyone can give me a hand, I am trying to run the virtualtex script on an Image i created in Photoshop. I have followed all the instructions in the dummies guide. But whenever i run the script on an image i get this error message in CYGWIN:
Ozark@home ~
$ cd ../..
Ozark@home /
$ virtualtex test2k.png 256 png
identify.exe: unable to open image `test2k.png': No such file or directory.
identify.exe: unable to open file `test2k.png'.
identify.exe: unable to open image `test2k.png': No such file or directory.
identify.exe: unable to open file `test2k.png'.
identify.exe: unable to open image `test2k.png': No such file or directory.
identify.exe: unable to open file `test2k.png'.
Texture size = x tilesize = 256
Number of tiles = 0
Image format of tiles: png
Tile:
convert.exe: unable to open image `test2k.png': No such file or directory.
convert.exe: unable to open file `test2k.png'.
convert.exe: missing an image filename `out%d.png'.
Ozark@home /
$
any help would be very very welcome.
Ozark@home ~
$ cd ../..
Ozark@home /
$ virtualtex test2k.png 256 png
identify.exe: unable to open image `test2k.png': No such file or directory.
identify.exe: unable to open file `test2k.png'.
identify.exe: unable to open image `test2k.png': No such file or directory.
identify.exe: unable to open file `test2k.png'.
identify.exe: unable to open image `test2k.png': No such file or directory.
identify.exe: unable to open file `test2k.png'.
Texture size = x tilesize = 256
Number of tiles = 0
Image format of tiles: png
Tile:
convert.exe: unable to open image `test2k.png': No such file or directory.
convert.exe: unable to open file `test2k.png'.
convert.exe: missing an image filename `out%d.png'.
Ozark@home /
$
any help would be very very welcome.
OZARK
Celestia 1.5.0
Windows XP Home Edition
Pentium 3.4 ghz E.E
2GB ddr Ram
Radeon 9550 AGP 256 mb
Celestia 1.5.0
Windows XP Home Edition
Pentium 3.4 ghz E.E
2GB ddr Ram
Radeon 9550 AGP 256 mb
Seldon,
Thanks for responding so quickly!
According to "dummies pdf" the directory for images to be split is :
C/Cygwin/home/Ozark. The directory for the virtualtex script is in C:/Cygwin/usr/local/bin. Is this correct or am i mistaken?
Ozark
Thanks for responding so quickly!
According to "dummies pdf" the directory for images to be split is :
C/Cygwin/home/Ozark. The directory for the virtualtex script is in C:/Cygwin/usr/local/bin. Is this correct or am i mistaken?
Ozark
OZARK
Celestia 1.5.0
Windows XP Home Edition
Pentium 3.4 ghz E.E
2GB ddr Ram
Radeon 9550 AGP 256 mb
Celestia 1.5.0
Windows XP Home Edition
Pentium 3.4 ghz E.E
2GB ddr Ram
Radeon 9550 AGP 256 mb
That sounds right. C/Cygwin/home/Ozark is your "home" directory: the default directory when you start bash. The shorthand for that is ~
Your Cygwin bash startup script sets its prompt to display your current default directory. Your current default directory needs to be the directory where the images are. What you show above is that you started out in ~ (where you needed to be) but then you did a ../.. for some reason, which put you in (= changed your current default directory to be) Cygwin's root directory (/). The script can't work after you do that.
Your Cygwin bash startup script sets its prompt to display your current default directory. Your current default directory needs to be the directory where the images are. What you show above is that you started out in ~ (where you needed to be) but then you did a ../.. for some reason, which put you in (= changed your current default directory to be) Cygwin's root directory (/). The script can't work after you do that.
Selden
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 8 months
- Location: Hamburg, Germany
Ozark,
the rule is simple. After virtualtex is located correctly in /usr/local/bin of your CYGWIN installation, you just change to the directory, where your texture is located. In your case, it's your home directory, hence just type 'cd'. Then you call virtualtex IN THAT directory like you did before
$ virtualtex test2k.png 256 png
Bye Fridger
PS: Note in UNIX/LINUX the following commands are all equivalent:
$ cd /home/Ozark
$ cd
$ cd ~
$ cd ~Ozark
Try it out...
Homework: where do you go with the two successive commands
$ cd
$ cd ..
Check it by typing
$ pwd
which always prints out the name of the directory you are in.
Then do
$ cd -
$ pwd
AHA!
Next try
$ cd /
$ pwd
then again
$ cd -
$ pwd
AHA!
the rule is simple. After virtualtex is located correctly in /usr/local/bin of your CYGWIN installation, you just change to the directory, where your texture is located. In your case, it's your home directory, hence just type 'cd'. Then you call virtualtex IN THAT directory like you did before
$ virtualtex test2k.png 256 png
Bye Fridger
PS: Note in UNIX/LINUX the following commands are all equivalent:
$ cd /home/Ozark
$ cd
$ cd ~
$ cd ~Ozark
Try it out...
Homework: where do you go with the two successive commands
$ cd
$ cd ..
Check it by typing
$ pwd
which always prints out the name of the directory you are in.
Then do
$ cd -
$ pwd
AHA!
Next try
$ cd /
$ pwd
then again
$ cd -
$ pwd
AHA!
Good Afternoon Gentlemen,
Okay so here is where i'm at :
Ozark@home ~
$ virtualtex
Usage: virtualtex [--help | <texture name> <tile size> <tile format>] [e|E|w|W]
The shell script 'virtualtex' is a tool for Celestia > 1.3.0
that supports 'virtual textures'.
The script generates the required tiles tx_i_j of desired (square) size,
<tile size>, in a specified format, <tile format> = png, tga, jpg,...,
from an input texture, <texture name>, in any popular graphics format.
The optional 4th argument e|E|w|W is for the case of tiling
square /e/astern | /w/estern halfes of the full texture separately!
Besides Linux/Unix, the script also runs in a current Cygwin installation
under Windows, ( http://www.cygwin.com ). If the z-shell ('zsh') is unavailable,
it also may be executed with the 'bash' shell, by replacing #! /usr/bin/zsh by
#! /bin/bash in the first line.
The script assumes that a recent version (>= 6.1. of the ImageMagick package
( http://www.ImageMagick.org ) is installed (either under Unix/Linux or Windows)
.
The utilities 'convert' and 'identify' of that package are used.
You may increase the pixel cache size $maxmem from the 80 MB default
value to e.g. 80% of your RAM size within the script with an editor.
This will speed up the performance of 'virtualtex' considerably.
On a PIII/512MB RAM the tiling of a 16k x 8k texture into
32 (2k x 2k) tiles now only takes 15 minutes with a Linux OS!
Author: Dr. Fridger Schrempp, fridger.schrempp@desy.de
Version: 1.04, 02/15/05
Ozark@home ~
$ virtualtex test2k.png 256 png
tilesize = 2562048
/usr/local/bin/virtualtex:51: bad math expression: illegal character: ^M
Ozark@home ~
$
I ran it without changing the prompt this time and got the above message.
the reason i did change the prompt the first time was because i'm not familiar with Cygwin. When i installed image magik, to test the display it had me change the prompt to "/" also according to "dummies" when installing netpbm it also had me change the prompt to " /" : then type a line of code (i'm guessing to activate, register or just see if the install went right for netpbm.)so i assumed that was what i was supposed to do . (my mistake)
Now i understand that those instuctions were givin long ago and may be a bit out of date, so my question is givin that new versions of all the programs are out perhaps i did not install them correctly, although imagemagik, cygwin, and the virtuatex script seemed to be installed correctly, But netpbm I'm not so sure there were so many downloads and packages to to choose from. I chose the one I thought most relevant. netpbm-10.27.exe a self intalling windows version. But when i ran the bit of code from "dummies"
[color=blue]:5) Type ?€?cd ../..?€
Okay so here is where i'm at :
Ozark@home ~
$ virtualtex
Usage: virtualtex [--help | <texture name> <tile size> <tile format>] [e|E|w|W]
The shell script 'virtualtex' is a tool for Celestia > 1.3.0
that supports 'virtual textures'.
The script generates the required tiles tx_i_j of desired (square) size,
<tile size>, in a specified format, <tile format> = png, tga, jpg,...,
from an input texture, <texture name>, in any popular graphics format.
The optional 4th argument e|E|w|W is for the case of tiling
square /e/astern | /w/estern halfes of the full texture separately!
Besides Linux/Unix, the script also runs in a current Cygwin installation
under Windows, ( http://www.cygwin.com ). If the z-shell ('zsh') is unavailable,
it also may be executed with the 'bash' shell, by replacing #! /usr/bin/zsh by
#! /bin/bash in the first line.
The script assumes that a recent version (>= 6.1. of the ImageMagick package
( http://www.ImageMagick.org ) is installed (either under Unix/Linux or Windows)
.
The utilities 'convert' and 'identify' of that package are used.
You may increase the pixel cache size $maxmem from the 80 MB default
value to e.g. 80% of your RAM size within the script with an editor.
This will speed up the performance of 'virtualtex' considerably.
On a PIII/512MB RAM the tiling of a 16k x 8k texture into
32 (2k x 2k) tiles now only takes 15 minutes with a Linux OS!
Author: Dr. Fridger Schrempp, fridger.schrempp@desy.de
Version: 1.04, 02/15/05
Ozark@home ~
$ virtualtex test2k.png 256 png
tilesize = 2562048
/usr/local/bin/virtualtex:51: bad math expression: illegal character: ^M
Ozark@home ~
$
I ran it without changing the prompt this time and got the above message.
the reason i did change the prompt the first time was because i'm not familiar with Cygwin. When i installed image magik, to test the display it had me change the prompt to "/" also according to "dummies" when installing netpbm it also had me change the prompt to " /" : then type a line of code (i'm guessing to activate, register or just see if the install went right for netpbm.)so i assumed that was what i was supposed to do . (my mistake)
Now i understand that those instuctions were givin long ago and may be a bit out of date, so my question is givin that new versions of all the programs are out perhaps i did not install them correctly, although imagemagik, cygwin, and the virtuatex script seemed to be installed correctly, But netpbm I'm not so sure there were so many downloads and packages to to choose from. I chose the one I thought most relevant. netpbm-10.27.exe a self intalling windows version. But when i ran the bit of code from "dummies"
[color=blue]:5) Type ?€?cd ../..?€
OZARK
Celestia 1.5.0
Windows XP Home Edition
Pentium 3.4 ghz E.E
2GB ddr Ram
Radeon 9550 AGP 256 mb
Celestia 1.5.0
Windows XP Home Edition
Pentium 3.4 ghz E.E
2GB ddr Ram
Radeon 9550 AGP 256 mb
"tar" is a program to extract files from an "archive" (sort of like a .zip file). The tar archive file contains files in specific directories.
You need to 'be in' the root directory (that is, Cygwin's directory which is named "/") so that when tar needs to recreate some of the directories which it contains, they're created in the correct places relative to the other Cygwin directories that already are on your system.
(For example, some netpbm distributions will need to create the directory /usr/local/bin/netpbm. /usr/local/bin usually already exists, so just the subdirectory netpbm will need to be created. If you tried to run tar while you were in your home directory, it would create /home/Ozark/usr/local/bin/netpbm, which is not what you want.)
However, you can put the tar archive file anywhere (so long as you remember to move it someplace more appropriate after you've finished the installation). If you want to type just the name of the file and not have to type the name of the directory that it is in, then the tar archive file has to be in Cygwin's root directory (/), too.
The error message
is saying that the tar archive file is not in your current default directory, which is the root directory (/).That means either you should move the tar archive file to / or you should type the name of the directory where you put the tar archive file. If you put it in your home directory, for example, then you could use the command
(Recall that ~ is shorthand for your home directory)
You need to 'be in' the root directory (that is, Cygwin's directory which is named "/") so that when tar needs to recreate some of the directories which it contains, they're created in the correct places relative to the other Cygwin directories that already are on your system.
(For example, some netpbm distributions will need to create the directory /usr/local/bin/netpbm. /usr/local/bin usually already exists, so just the subdirectory netpbm will need to be created. If you tried to run tar while you were in your home directory, it would create /home/Ozark/usr/local/bin/netpbm, which is not what you want.)
However, you can put the tar archive file anywhere (so long as you remember to move it someplace more appropriate after you've finished the installation). If you want to type just the name of the file and not have to type the name of the directory that it is in, then the tar archive file has to be in Cygwin's root directory (/), too.
The error message
tar (child): netpbm-10.18-cygwin-1.3-bin.tar.gz: Cannot open: No such file or directory
is saying that the tar archive file is not in your current default directory, which is the root directory (/).That means either you should move the tar archive file to / or you should type the name of the directory where you put the tar archive file. If you put it in your home directory, for example, then you could use the command
Code: Select all
tar xzf ~/netpbm-10.27-cygwin-1.3-bin.tar.gz
(Recall that ~ is shorthand for your home directory)
Selden
Now you've confused me.
In your earlier post you said you were trying to install netpbm by using the command
"netpbm-10.27-cygwin-1.3-bin.tar.gz" is a tar archive file. That is indicated by the ".tar" in its name.
In your earlier post you said you were trying to install netpbm by using the command
Code: Select all
$ tar xzf netpbm-10.27-cygwin-1.3-bin.tar.gz
"netpbm-10.27-cygwin-1.3-bin.tar.gz" is a tar archive file. That is indicated by the ".tar" in its name.
Selden
He He sorry for the confusion. Your not the only one.
I thought once netpbm was installed THEN you run the "dummies" Tar xzf command (in cygwin) to get cygwin to recognize netpbm. At the time i did not know a "tar" file was an archive file and I did not know the tar xzf command for dummies was an installation command.
So then with the self installing Netpbm file i shouldn't even have to run the "tar xzf" command from "Dummies" is that correct?
Now i understand that those instuctions were givin long ago and may be a bit out of date, so my question is givin that new versions of all the programs are out perhaps i did not install them correctly, although imagemagik, cygwin, and the virtuatex script seemed to be installed correctly, But netpbm I'm not so sure there were so many downloads and packages to to choose from. I chose the one I thought most relevant. netpbm-10.27.exe a self intalling windows version. But when i ran the bit of code from "dummies"
I thought once netpbm was installed THEN you run the "dummies" Tar xzf command (in cygwin) to get cygwin to recognize netpbm. At the time i did not know a "tar" file was an archive file and I did not know the tar xzf command for dummies was an installation command.
So then with the self installing Netpbm file i shouldn't even have to run the "tar xzf" command from "Dummies" is that correct?
OZARK
Celestia 1.5.0
Windows XP Home Edition
Pentium 3.4 ghz E.E
2GB ddr Ram
Radeon 9550 AGP 256 mb
Celestia 1.5.0
Windows XP Home Edition
Pentium 3.4 ghz E.E
2GB ddr Ram
Radeon 9550 AGP 256 mb
If you want to use netpbm in conjunction with Cygwin, you shouldn't be installing the Windows version of netpbm, nor should you be using tar. As the netpbm home page points out, netpbm is one of the many sets of programs which are installed by using Cygwin's package selection program. (currently netpbm 10.33-1)
You can use either the Windows or tar versions of netpbm with Cygwin, but making either of them work properly in Cygwin's environment is not a project for the novice. You need to be very familiar with both Windows and the Unix command-line environment.
You can use either the Windows or tar versions of netpbm with Cygwin, but making either of them work properly in Cygwin's environment is not a project for the novice. You need to be very familiar with both Windows and the Unix command-line environment.
Selden
All i am trying to do is to get the virtualtex script to work. I have tried to follow the directions spelled out in the Dummies pdf guide. If there is a current method for getting the script to work I would love to hear about it. However the guide is all i can go by and the Netpbm is the only portion of the instructions that i am having a hard time with. I would really like for it to be as simple as the guide suggests. Do i even need Netpbm to run the script?
OZARK
Celestia 1.5.0
Windows XP Home Edition
Pentium 3.4 ghz E.E
2GB ddr Ram
Radeon 9550 AGP 256 mb
Celestia 1.5.0
Windows XP Home Edition
Pentium 3.4 ghz E.E
2GB ddr Ram
Radeon 9550 AGP 256 mb
Hopefully Fridger will correct me if I'm wrong, but as best I can tell, virtualtex doesn't make use of any of the netpbm utilities. It uses ImageMagick utilities instead. Bob mentions this in the "Addendum" at the end of the Dummies text.
I'm not sure why Bob recommended installing netpbm, although I personally find it convenient to use both ImageMagick and netpbm utilities when I'm doing various image manipulations. I find the netpbm commands somewhat more natural than IM's, but that's probably just me.
I'm not sure why Bob recommended installing netpbm, although I personally find it convenient to use both ImageMagick and netpbm utilities when I'm doing various image manipulations. I find the netpbm commands somewhat more natural than IM's, but that's probably just me.
Selden
Well i tried the script without netpbm.
the directory for the images to be split is c\cygwin\home\ozark
the directory for virtualtex script is c\cygwin\usr\local\bin
and this is the result:
Ozark@home ~
$ virtualtex test2k.png 256 png
tilesize = 2562048
/usr/local/bin/virtualtex:51: bad math expression: illegal character: ^M
Ozark@home ~
$
Im not sure what that error message means so i don't know what to change.
the directory for the images to be split is c\cygwin\home\ozark
the directory for virtualtex script is c\cygwin\usr\local\bin
and this is the result:
Ozark@home ~
$ virtualtex test2k.png 256 png
tilesize = 2562048
/usr/local/bin/virtualtex:51: bad math expression: illegal character: ^M
Ozark@home ~
$
Im not sure what that error message means so i don't know what to change.
OZARK
Celestia 1.5.0
Windows XP Home Edition
Pentium 3.4 ghz E.E
2GB ddr Ram
Radeon 9550 AGP 256 mb
Celestia 1.5.0
Windows XP Home Edition
Pentium 3.4 ghz E.E
2GB ddr Ram
Radeon 9550 AGP 256 mb
Hello BDM,
I was searching the net earlier and came across a post by Fridger,
and he had mentioned the same thing when someone else was getting
a similar(though not the same) error. He suggested editing the file with a non windows based editor such as Nano, which i have to no avail. When
i went to look at the script, nowhere did i find a line ending with ^m. Just a note: in order to get the script it has to be saved as a text file and then remove the .txt extension.
Thoroughly confused
Ozark
I was searching the net earlier and came across a post by Fridger,
and he had mentioned the same thing when someone else was getting
a similar(though not the same) error. He suggested editing the file with a non windows based editor such as Nano, which i have to no avail. When
i went to look at the script, nowhere did i find a line ending with ^m. Just a note: in order to get the script it has to be saved as a text file and then remove the .txt extension.
Thoroughly confused
Ozark
OZARK
Celestia 1.5.0
Windows XP Home Edition
Pentium 3.4 ghz E.E
2GB ddr Ram
Radeon 9550 AGP 256 mb
Celestia 1.5.0
Windows XP Home Edition
Pentium 3.4 ghz E.E
2GB ddr Ram
Radeon 9550 AGP 256 mb
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 8 months
- Location: Hamburg, Germany
With my latest version (1.04) there might be a problem in some cases as to its collaboration with ImageMagick that is needed. Unfortunately, ImageMagick frequently has bugs in their releases. They should test more thoroughly before releasing new ones...
Try version 1.03 which has been successfully used by many and even works with the default bash shell instead of zsh.
http://www.celestiaproject.net/~t00fri/virtualtex_1.03
Which version of ImageMagick did you install??
Did you install the 'zsh'?
Good luck,
Bye Fridger
Try version 1.03 which has been successfully used by many and even works with the default bash shell instead of zsh.
http://www.celestiaproject.net/~t00fri/virtualtex_1.03
Which version of ImageMagick did you install??
Did you install the 'zsh'?
Good luck,
Bye Fridger
- cartrite
- Posts: 1978
- Joined: 15.09.2005
- With us: 19 years 2 months
- Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine
I was dealing with a similar problem about a year ago.
http://www.celestiaproject.net/forum/viewtopic ... 9789#79789
Hope this helps.
cartrite
http://www.celestiaproject.net/forum/viewtopic ... 9789#79789
Hope this helps.
cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4