Page 1 of 1

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

Posted: 08.04.2008, 19:34
by t00fri
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

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

Posted: 08.04.2008, 21:16
by cartrite
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

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

Posted: 08.04.2008, 22:29
by t00fri
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.

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

Posted: 08.04.2008, 23:17
by cartrite
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

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

Posted: 09.04.2008, 00:43
by t00fri
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.

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

Posted: 09.04.2008, 01:38
by cartrite
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

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

Posted: 09.04.2008, 06:56
by steffens
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

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

Posted: 09.04.2008, 08:15
by t00fri
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.

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

Posted: 09.04.2008, 08:24
by cartrite
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

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

Posted: 09.04.2008, 08:26
by t00fri
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.

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

Posted: 09.04.2008, 14:03
by ajtribick
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.