Author Topic: -relight - two issues  (Read 1494 times)

wain

  • Hydlaa Resident
  • *
  • Posts: 50
    • View Profile
-relight - two issues
« on: September 27, 2005, 08:23:22 am »
I\'m experiencing two problems with relight. I\'ve searched, but found no reference to either of these issues, which surprises me. Do other people have these problems as well?

1. I can use the -relight arg to fix any area. It removes the black-object problem, and all the missing textures appear. So far, so good! However... it saves the new light maps for all areas EXCEPT the death realm. No matter how many times I make it recalculate the light maps for the death realm, the area is fixed only as long as I don\'t log out. Out of interest, I went to check out the files responsible, and noticed something: Planeshift3D/art/world/deathrealm.zip seems to be broken. I tried to unzip it both with Stuffit and with Darwin\'s command line unzip, and both said that it wasn\'t a proper archive. All the other world zip archives can uncompress fine. Thinking that maybe I was unlucky and got a bad copy, I removed the file and made the updater replace it with a new one. But that one seems to be broken too. According to ls -l, permissions seem to be set correctly. I assume it\'s more than a coincidence that the one area where new light mappings won\'t save is also the area with a zip file that seems to be distributed broken.

2. If I recalc. the light mappings of an area, then the next time I run the updater (either the Java one or the traditional one), it overwrites the world/ files for the areas that were relit, and the bad light mappings are put back in (after hours of downloads!). So relighting seems to be a really horrible waste of time if you plan on keeping your client up-to-date. Is that correct? Or am I doing something wrong?

Thanks for any feedback :)

Wayne

stfrn

  • Hydlaa Citizen
  • *
  • Posts: 324
  • the beaver ex-dev :B
    • View Profile
(No subject)
« Reply #1 on: September 27, 2005, 09:15:16 am »
Yes, those are known issues- in theory, users should never need to use relight. However, thre seems to be something wrong along the lines so that the correct lights are not being distrobuted, or atleast everyone cannot use them all. As far as I know, the solution for this is just waiting for the changes in lighting to be done, and new lighmaps will be made then.
As for the new ones being downloaded from the updater, yes, the updater likes to get everything it sees as changed. The normal solution is to manually mark the files you want as read only.
As for the zips, it seems that CS is using an unusal standard that most programs do not expect. wethere this means they are bad or not is uncertain.
player -> gm -> dev -> bum

Cha0s

  • Veteran
  • *
  • Posts: 1860
    • View Profile
(No subject)
« Reply #2 on: September 27, 2005, 06:11:00 pm »
For now, I suggest you just use -nolightmapping.
Cha0s
Mac OS X Forum Moderator
In-Game Roleplay Forum Moderator
Please search and skim existing threads before posting!

wain

  • Hydlaa Resident
  • *
  • Posts: 50
    • View Profile
(No subject)
« Reply #3 on: September 27, 2005, 07:55:14 pm »
Okay, thanks! As I said, I couldn\'t find reference to these specific issues, so I wanted to check.

Maybe the format of that deathrealm.zip is just unusual, but if so it\'s a big coincidence that it\'s the only one that won\'t unzip, and also the only realm where the light map won\'t save. But perhaps that\'s the case.

It\'s also good to have on record here that -relight isn\'t a good solution if you plan on keeping your client up to date. I think many people visiting the forums will think that it is, as I did until I was hit with many hours\' worth of updates (which wrecked my lighting completely when I tried to stop them ;) )

dfryer

  • Veteran
  • *
  • Posts: 1070
    • View Profile
(No subject)
« Reply #4 on: October 05, 2005, 12:32:59 am »
It\'s true - the non-matching hash values for lightmaps between macos and windows is known but still not understood.  Since there are workarounds, it\'s lower priority than crashers, but it\'s definitely annoying and really kinda strange (the code that does the calculuations takes care to be cross platform..)
Quidquid latine dictum sit, altum sonatur.

Wired_Crawler

  • Hydlaa Citizen
  • *
  • Posts: 429
    • View Profile
(No subject)
« Reply #5 on: October 05, 2005, 01:51:56 am »
Quote
Originally posted by wain
However... it saves the new light maps for all areas EXCEPT the death realm. No matter how many times I make it recalculate the light maps for the death realm, the area is fixed only as long as I don\'t log out.

I have reported it at bugtracker, bug #1127. deathrealm.zip is corrupt. It misses zip central directory. On linux it is easily fixable by runnig \"zip -F deathrealm.zip\". It is easy to fix. IMO the only reason, why wasn\'t it repaired until now, is saving of server bandwidth by preventing users from downloading fixed version.

And about relighting - I get best results by using \"walktest -relight map.zip\" (available as CS application).
"Close the world, txEn eht nepO."

chump

  • Traveller
  • *
  • Posts: 14
    • View Profile
(No subject)
« Reply #6 on: October 13, 2005, 08:04:04 pm »
I have reported it at bugtracker, bug #1127. deathrealm.zip is corrupt. It misses zip central directory. On linux it is easily fixable by runnig \"zip -F deathrealm.zip\". It is easy to fix. IMO the only reason, why wasn\'t it repaired until now, is saving of server bandwidth by preventing users from downloading fixed version.

And about relighting - I get best results by using \"walktest -relight map.zip\" (available as CS application).
[/QUOTE]

Ok, I just started playing the game appx 1.5 hours ago and keep getting stuck in DR where textures are either missing or black.  I can only see to the 1rst door and make it to the 2nd before I fall to the ground without mysteriously dying.  Doesn\'t make the game much fun, esp for a noob (thanks to the friendly advisors for getting me this far!).

In plain english using OS X, how can I fix this?  I\'m off to get that Java app that lets the game run with arguements and try some of the stuff from previous posts, but what about fixing that corrupt file?

wain

  • Hydlaa Resident
  • *
  • Posts: 50
    • View Profile
(No subject)
« Reply #7 on: October 13, 2005, 08:28:13 pm »
I\'m not sure why the zip file is still corrupted. Of all the really useful fixes that the developers could make to the game, you\'d think that would be one of the fastest and easiest. But I\'m not a dev, so what do I know? :)

Running the game with that -nolightmapping flag is, unfortunately, the only practical option for now.

The \"zip -F deathrealm.zip\" trick mentioned by Wired_Crawler will fix the zip file, but of course that\'ll only last until you run the updater again. For the same reason, the -relight option isn\'t a practical solution, either.

Hopefully it\'ll be fixed soon :)

chump

  • Traveller
  • *
  • Posts: 14
    • View Profile
graphical settings 101
« Reply #8 on: October 14, 2005, 08:29:01 am »
Just out of curiosity, in layman\'s terms what is the difference between -relight and -nolightmapping?  Obviously relight modifies the maps in some way.  And nolight is a true/false toggle that does what?

For that matter, I haven\'t found documention on it yet, can somebody please breifly explain (what the visual result is) or point me to an explantion of the Zbuffer, Anti-Aliasing, Multitexturing checkbox, Stencil, Anisotropy, and Downsampling settings in the setup app?

Thanks for any help

wain

  • Hydlaa Resident
  • *
  • Posts: 50
    • View Profile
(No subject)
« Reply #9 on: October 14, 2005, 08:58:13 am »
Quote
Originally posted by chump
Just out of curiosity, in layman\'s terms what is the difference between -relight and -nolightmapping?  Obviously relight modifies the maps in some way.  And nolight is a true/false toggle that does what?


Okay, I\'m not an expert at this, so someone may correct me... but from what I\'ve come to understand, the light mappings are what define brightness, shadows, etc. around the world. The corruption in the maps is setting some things to be entirely without lighting, and hence appear black.

-relight recalculates the light maps to ensure they\'re correct (until the updater wrecks them again)

-nolightmapping switches them off entirely. So everything looks more like a uniform, washed-out light intensity, but at least you can see :)

Quote

For that matter, I haven\'t found documention on it yet, can somebody please breifly explain (what the visual result is) or point me to an explantion of the Zbuffer, Anti-Aliasing, Multitexturing checkbox, Stencil, Anisotropy, and Downsampling settings in the setup app?


Er. Hopefully someone else can explain those ;)

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
(No subject)
« Reply #10 on: October 14, 2005, 01:35:42 pm »
Z buffer: A buffer that stores for each pixel during the rendering phase, how far its current content is away from the camera. If the newly calculated content would be further away, it will be invisible, therefore the color does not need to be changed. A finer Z buffer requires more memory, but will reduce possible glitches in plane intersections.

Anti-Aliasing:
The image is rendered at a higher resolution, and before displaying, the resolution is calculated down with specific averaging calcilations. This can reduce tecture flickering in the distance, and \"aliasing\" (staircasing) of slight diagonal lines, at the cost of much graphic memory and longer rendering time (lower FPS).

Multitexturing:
If supported by hardware, overlaying several textures can be done quickly and enhance the visible quality remarkably (e.g. adding the color texture - sometimes more than one, the lighting, probably bump maps, ...). If the graphic chip doesn\'t support it well, multitexturing may reduce the speed.

This is a good context to describe \"-nolightmapping\": Usually, texturing and lighting is a required multitexturing part of game graphics. Mapping textures onto planes is one step, mapping lighting is another (all texels get multiplied by a factor between 0.0 and 1.0, darkening it depending on the lightness map; with \"-nolightmapping\", all texels will remain with full brightness.).

Multitexturing may speed up both steps into one rendering cycle, if the graphic card supports it (most current chips should). If multitexturing is not supported by the chip, both steps need to be calculated in distinct cycles.

But I guess that the \"Multitexturing for quality\" checkbox is there for a different reason, it may rather control multiple textures on the same plane, like basic and detail textures overlaying each others...


Stencil buffer:
used for transparency effects with sharp lines, for several different occasions. I don\'t know which kinds of effects are indeed used by CrystalSpace, though... -- Sorry, no idea about the threshold.

Anisotropy:
If you look over a slanted plane with texture at a flat angle, the graphic card may calculate a too rough mipmap texture which makes the texture too blurred. Anisotropic texture resampling makes it possible to downsample textures in different directions by different amounts, blurring the texture differently depending on the direction you look at it - along one coordinate, or across another. This way, the texture will not be either too blurred or too flickering.

Downsampling:
Uses textures with lower resolutions, reducing the time needed to reload texture images while changing a zone, reducing the required texture buffer in the graphic card, speeding up the movement through a world with many different textures.
« Last Edit: October 14, 2005, 04:37:36 pm by LigH »

Gag Harmond
Knight and Ambassador
The Royal House of Purrty

Bereror

  • Hydlaa Notable
  • *
  • Posts: 773
    • View Profile
    • Planeshift API
(No subject)
« Reply #11 on: October 14, 2005, 02:18:33 pm »
This is an excellent overview and should be part of a Configuration Guide or something similar 8).

I have only one small comment:
Quote
Originally posted by LigH
Multitexturing:
<...>
If the graphic chip does supprot it well, multitexturing may reduce the speed.


I guess you meant increase, and not reduce the speed?
PlaneShift Sources
PlaneShift API
"Words never spoken
Are the strongest resounding"

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
(No subject)
« Reply #12 on: October 14, 2005, 04:29:36 pm »
Well - forgot the \"not\"...

Gag Harmond
Knight and Ambassador
The Royal House of Purrty

Cha0s

  • Veteran
  • *
  • Posts: 1860
    • View Profile
(No subject)
« Reply #13 on: October 14, 2005, 04:40:48 pm »
*points to the edit button* :P

Excellent work, though. Very nice descriptions. From now on, if anyone asks, we\'ll point them here. :)
Cha0s
Mac OS X Forum Moderator
In-Game Roleplay Forum Moderator
Please search and skim existing threads before posting!

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
(No subject)
« Reply #14 on: October 14, 2005, 04:55:39 pm »
Quote
Originally posted by Cha0s
*points to the edit button* :P

 :rolleyes:

Did I already mention being an experienced super moderator in another board?! ...  :P
« Last Edit: October 14, 2005, 05:10:58 pm by LigH »

Gag Harmond
Knight and Ambassador
The Royal House of Purrty