Fix to allow for absolute directories in case of VT's

The place to discuss creating, porting and modifying Celestia's source code.
Avatar
Topic author
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 6 months
Location: Hamburg, Germany

Fix to allow for absolute directories in case of VT's

Post #1by t00fri » 08.04.2008, 19:34

Celestia did not recognize absolute directory notation in case of virtual texture .ctx files (VT's). Notably, VT image data located on different partitions/drives than the main program were ignored. In view of large storage demands in case of monster VT's, this was a real deficiency.

Since lately Linux supports NTFS in reading AND writing, I have
successfully /shared/ many large data chunks between identical Windows and Linux applications on my dual boot desktop machine in the past! Multi GB Celestia VT's are a prominent example!

I have just committed a patch to SVN that fixes the problem. Now the
'ImageDirectory' entry in .ctx files can be in /absolute/ directory notation, both for Windows and for Linux. Like so

Windows:
--------
ImageDirectory "E:/foo/bar"

Linux:
-----
ImageDirectory "/graphics/foo/bar"

F.

Revision: 4245
Image

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: Fix to allow for absolute directories in case of VT's

Post #2by cartrite » 08.04.2008, 21:16

I just rebuilt svn and will include this on my web site shortly.
But.......
I was not aware of this as a deficiency.
For years I have had all my large VT's on a different partition but they were all in an extras folder. For years I've been sharing partitions between linux and windows via symbolic links. Although linux partitions are invisible to window xp. So it is a one way street. Linux KDE versions can use windows partitions but Windows can't see anything on my linux partitions. My Image Directories were always in the same folder as the ctx file though.
I guess now I can explore different directory structures.
Revision 4245 files uploaded.
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

Avatar
Topic author
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 6 months
Location: Hamburg, Germany

Re: Fix to allow for absolute directories in case of VT's

Post #3by t00fri » 08.04.2008, 22:29

cartrite,

sure, FAT32 filesystems were already available for R&W under Linux, but writing on NTFS under Linux was still a gamble... Now the handling of NTFS under Linux is completely stable, and sharing on a R&W basis is fast and not risky anymore.

But independently of that aspect, before my patch was incorporated, it was not possible, to have

Celestia installed on drive C: say, while the VT data were stored on drive E: under Windows. It was possible, though to have Celestia AND the VT data in different directories of the SAME drive and a typical directory entry might have looked like so

ImageDirectory "../../../foo/bar"

Similarly under Linux with different absolute directory notation.

F.
Image

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: Fix to allow for absolute directories in case of VT's

Post #4by cartrite » 08.04.2008, 23:17

t00fri wrote:cartrite,

sure, FAT32 filesystems were already available for R&W under Linux, but writing on NTFS under Linux was still a gamble... Now the handling of NTFS under Linux is completely stable, and sharing on a R&W basis is fast and not risky anymore
.
I only read these files. I really don't have a need to write to them. Even if it is stable it is not worth the possible problems.

t00fri wrote:But independently of that aspect, before my patch was incorporated, it was not possible, to have

Celestia installed on drive C: say, while the VT data were stored on drive E: under Windows.
When you say drive you mean 2 different disks. I do have 2 disks. An IDE and a sata. The sata drive only has linux partitions so windows can't even see it.
But Celestia running on linux can access the VT data stored on NTFS partitions although I never write to them. I did it by creating a folder with the ssc files and ctx with symbolic links to the actual data. Celestia runs on /home. The extras folder is on srv/disk5/extras/bmng/textures/hires/symbolic-link-to-VTdata-folder-on-(IDE)ntfs. The bmng folder also had a ssc file I could write to and the hires folder has the ctx file I could write to but the image dir is a symbolic link to a folder on another drive.
t00fri wrote:It was possible, though to have Celestia AND the VT data in different directories of the SAME drive and a typical directory entry might have looked like so

ImageDirectory "../../../foo/bar"

Similarly under Linux with different absolute directory notation.

F.
This will be interesting to explore because I'll be making some directory changes soon. I was planning on adding another sata drive. The 500 gb drive I bought last year is almost full. Too full to work with large files. Maybe I'll add a NTFS partition on the future drive and store all the addons on it so Windows and Linux can access them.
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

Avatar
Topic author
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 6 months
Location: Hamburg, Germany

Re: Fix to allow for absolute directories in case of VT's

Post #5by t00fri » 09.04.2008, 00:43

cartrite wrote:
t00fri wrote:cartrite,

sure, FAT32 filesystems were already available for R&W under Linux, but writing on NTFS under Linux was still a gamble... Now the handling of NTFS under Linux is completely stable, and sharing on a R&W basis is fast and not risky anymore
.
I only read these files. I really don't have a need to write to them. Even if it is stable it is not worth the possible problems.

I have NTFS running in R&W mode under Linux since ~ 1 year, without any problems whatsoever. This agrees with the numerous evaluations in the net and elsewhere.

t00fri wrote:But independently of that aspect, before my patch was incorporated, it was not possible, to have

Celestia installed on drive C: say, while the VT data were stored on drive E: under Windows.
When you say drive you mean 2 different disks. I do have 2 disks. An IDE and a sata. The sata drive only has linux partitions so windows can't even see it.
No, when I say drive I mean drive ;-) . I suppose drive is the correct expression in Windows. Drives can be associated with all sorts of devices. They are all addressed with a letter followed by :. Typically it would be different partitions on the same harddisk. But drives can also refer to physically different disks.
But Celestia running on linux can access the VT data stored on NTFS partitions although I never write to them. I did it by creating a folder with the ssc files and ctx with symbolic links to the actual data.

Correct, under Linux one can play tricks with symbolic links. Under Windows, short cuts <=> symbolic links do not work in the context of "outsourcing" VT storage.

F.
Image

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: Fix to allow for absolute directories in case of VT's

Post #6by cartrite » 09.04.2008, 01:38

That's what I first thought. I mean I thought drives were partitions. My 200 gb IDE disk has 4 ntfs, 2 fat32, 2 reisers, and 1ext3 partitions.
I run Celestia from my C and H drives. I build on the H drive. All my Windows VT's are on my E drive in an extras folder.
Anyhow with this patch I should be able to have all the image directories on one drive and the ctx files could access them from different areas. Correct?
I remember I used to have different copies of my normalmaps with Windows. On for each VT. That's one of the reasons I liked Linux so much because all my earth VT's shared one normalmap. I was not even aware that the ImageDirectory string could contain a path. Live and learn. Now I'm starting to see the advantages.
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

steffens
Posts: 162
Joined: 06.11.2003
With us: 20 years 10 months
Location: RP Germany

Re: Fix to allow for absolute directories in case of VT's

Post #7by steffens » 09.04.2008, 06:56

cartrite wrote:Although linux partitions are invisible to window xp. So it is a one way street. Linux KDE versions can use windows partitions but Windows can't see anything on my linux partitions.

I'm using Ext2 IFS for Windows for accessing ext2 / ext3 partitions from Windows. This is working very well and stable!

steffens

Avatar
Topic author
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 6 months
Location: Hamburg, Germany

Re: Fix to allow for absolute directories in case of VT's

Post #8by t00fri » 09.04.2008, 08:15

cartrite wrote:That's what I first thought. I mean I thought drives were partitions. My 200 gb IDE disk has 4 ntfs, 2 fat32, 2 reisers, and 1ext3 partitions.

Again, a drive is a well-defined wording in /Windows/. It does not have to denote a partition, but often does.

I run Celestia from my C and H drives. I build on the H drive. All my Windows VT's are on my E drive in an extras folder.
Anyhow with this patch I should be able to have all the image directories on one drive and the ctx files could access them from different areas. Correct?

Correct. For me the following works now:

My development directory under Windows is R&W-shared between Windows and Linux. It is on a Windows drive F: (primary partition) with NTFS. From Linux, it's mounted as /xpdat2. That's where the Windows SVN stuff and a working copy of Celestia is located, as well as my tools and lots of other stuff.

All VT data (20 GB) are on E: which is a NTFS partition on another harddisk, accessed also by Celestia@Linux under /xpdat.

In earth.ctx located in 'extras/textures/hires' of F:/Develop/celestia, I now have this line:

ImageDirectory "E:/Celestia-tiles/extras/textures/tiles/BMNG_SWBD_Earth_flat_200406_64k_RGBA_VT.1k"

From Linux the SAME data are accessed via a symbolic link involving the entire extras subdirectory in the line above.
The link involves

extras -> /xpdat/Celestia-tiles/extras

F.
Last edited by t00fri on 09.04.2008, 08:29, edited 1 time in total.
Image

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: Fix to allow for absolute directories in case of VT's

Post #9by cartrite » 09.04.2008, 08:24

t00fri wrote:Again, a drive is a well-defined wording in /Windows/. It does not have to denote a partition, but often does.
Yes. Hidden in the corner of my brain somewhere I realize this. My D drive is a DVD RW. :wink:
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

Avatar
Topic author
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 6 months
Location: Hamburg, Germany

Re: Fix to allow for absolute directories in case of VT's

Post #10by t00fri » 09.04.2008, 08:26

steffens wrote:
cartrite wrote:Although linux partitions are invisible to window xp. So it is a one way street. Linux KDE versions can use windows partitions but Windows can't see anything on my linux partitions.

I'm using Ext2 IFS for Windows for accessing ext2 / ext3 partitions from Windows. This is working very well and stable!

steffens

Yes I know that software, but so far I did not risk R&W access of ext3 partitions from Windows. It's a one-man development project (Stephan Schreiber) rather than a mainsteam community effort. It's good to hear that it is safe.

I chose instead certain NTFS partitions that are accessed both ways with R&W from Linux and Windows.

F.
Last edited by t00fri on 09.04.2008, 15:04, edited 1 time in total.
Image

ajtribick
Developer
Posts: 1855
Joined: 11.08.2003
With us: 21 years 1 month

Re: Fix to allow for absolute directories in case of VT's

Post #11by ajtribick » 09.04.2008, 14:03

steffens wrote:I'm using Ext2 IFS for Windows for accessing ext2 / ext3 partitions from Windows. This is working very well and stable!
I found the opposite when I tried it a few months back: certain installers, including VC++.Net 2008 failed while the IFS was active, so I stopped using it.


Return to “Development”