#279 posted by Spike on 2015/03/04 13:36:54
faces do not define leafs, thus in theory, it should be possible to just omit the splits entirely (maybe revert to the original surface if it got split in too many ways without being disjointed, but still clip it to any outer-edge planes of the fragments).
this would result in more overdraw (without randomly spewing into walls too much), but software rendering is supposed to be zero-overdraw anyway, while hardware renderers should be fast enough to not care.
the catch is that it would take more edges, but at least you wouldn't feel like you had to spend all your time building the bsp tree by hand only for it to mess up again when you change something.
#280 posted by arkngt on 2015/03/04 21:22:30
Sorry for another noob question, but how do I actually run TyrLite? I've used PAK Explorer to extract a bsp, but then I'm stumped. Well, I guess I must run a command line, telling it to execute light.exe and then adding lines pointing to the bsp and detailing what to do, but I don't find any info in the readmes on how to do it. And it didn't help much to google command line utilities either. In short, is there "run a command line utility for dummies" or some such guide?
#281 posted by ericw on 2015/03/04 21:46:20
Sure, just put light.exe and the map you want to light (say e1m1.bsp) in a folder like c:\\mapping.
Launch the windows command prompt, cmd. (iirc, start->run, then enter cmd.exe, or search for "cmd" at the windows 8 start screen)
Type:
cd c:\\mapping
light.exe -dirt e1m1.bsp
Argh
#282 posted by ericw on 2015/03/04 21:46:37
those double slashes should just be one slash
cd:\\\\\\\\\mapping\\\\\light.exe \\\\\
To Expand On Ericw's Post
#284 posted by necros on 2015/03/05 18:49:32
to relight all maps this way:
- make a folder: c:/maps
- extract all the maps into this folder
- put light.exe into this folder
- open notepad and paste this into it:
for %%A in (*.bsp) do light -threads 4 -extra4 -dirty -dirtmode 1 -dirtdepth 160 -dirtscale 2.1 -dirtgain 0.7 %%A
- save text file as run.bat
double click run.bat
also try fiddling with the numbers like -dirtdepth and -dirtscale. i think they are set really high because I was testing stuff. now my maps are really dark and I'm too lazy to try to fix it.
#285 posted by necros on 2015/03/05 18:55:42
uh, put run.bat in the same folder, btw
woooooooo.... made a folder called "dirty" with all the dirty stuff added.
Minor Update
#287 posted by ericw on 2015/03/06 04:34:35
osx win src
Only one change, key/value "_dirt" "-1" is supported on brush model entities (func_door, etc), this disables dirtmapping on that bmodel. Useful in combination with bmodel-specific "_minlight" if you have a door that touches or sticks into the world, and you want to prevent those parts from turning black from the AO.
Nice
I think I will end up using this a lot
#289 posted by arkngt on 2015/03/06 20:47:04
Thanks, guys. When running the run.bat as described in necros' post, light.log says:
Unknown option "-dirty"
I tried with -dirt as well but then I get:
Unknown option "-dirt"
Otherwise, it seems to run and the .bsp's get resaved. I'll check it out ingame.
Arkngt
#290 posted by mfx on 2015/03/06 21:14:02
#291 posted by arkngt on 2015/03/06 23:25:19
Thanks, mfx, I misunderstood the post previously. Yes, now it works and it's a noticeable difference as well. And I agree with necros - it's a bit too dark IMO. But it will be fun experiment around with the settings now that I got it running.
#292 posted by arkngt on 2015/03/06 23:26:03
fun to experiment around rather (I must learn that you can't edit posts here...).
Ooh Cool!
#293 posted by Qmaster on 2015/03/09 00:07:06
About That Bug
#294 posted by Qmaster on 2015/03/09 00:13:03
"It also fixes a pretty critical bug Lunaran noticed"
Is it possible that has anythi g to do with shadows forming along face splits in the floor, e.g. along diagonals? I've been getting wierd lighting ever since I started to have to use bsp2. (map got too big)
Spike
#295 posted by Kinn on 2015/03/09 01:45:57
re: #279
Ok, I am officially intrigued.
I am also not entirely sure now what the real downsides are with the current ugly splitting, other than it just looking nasty to someone used to nice clean meshes. Would we see potential performance benefits to changing the procedure so it splits less or avoids splits entirely, as you describe?
Qmaster
#296 posted by ericw on 2015/03/09 01:52:17
do you still get those artifacts with my builds, e.g. the one in #287?
There shouldn't be artifacts from using bsp2, but you never know. If it's still happening with the last build I can take a look at the map if you want.
Ahh...nope
#297 posted by Qmaster on 2015/03/09 04:15:22
It's not a bug with light, it's a bug with tyrann's bsp.exe Here's 3 pictures showing the difference between tyrann's latest qbsp and good ol txqbsp:
https://dl.dropboxusercontent.com/u/20160676/tyrann_lightingerror1.jpg
Lines drawn to highlight ugly areas:
https://dl.dropboxusercontent.com/u/20160676/tyrann_lightingerror2.jpg
https://dl.dropboxusercontent.com/u/20160676/txqbsp_beautiful.jpg
Please note that tyrann's looks the same regardless of whether I use bsp2 (all vis groups visible) or normal bsp (a couple visgroups turned off).
The txqbsp has to have the visgroups turned off since it doesn't compile for bsp2.
Any idea what's going on?
Oh, Sorry
#298 posted by Qmaster on 2015/03/09 04:20:17
I guess this isn't really the right thread for it. ericw's light works ok btw.
Qbsp Subdividing Wierdness
#299 posted by Qmaster on 2015/03/09 05:18:21
Okay, it appears to have something to do with subdivide face. In tyrann's qbsp I'm fiddling with adjusting the -subdivide ## parameter and getting different results, usually crashes such as Alloc fails or Failed to Subdivide Face. Hopefully I can figure out what is going on and why it would differ from txqbsp's implementation. FYI, the textures in my scene are scaled at 0.50 on every wall, floor and ceiling. I wonder if that has something to do with it?
GOT IT!!!
#300 posted by Qmaster on 2015/03/09 06:06:57
Figured it out. Jackhammer editor breaks world texture alignment when flipping brushes with Texture Lock turned on. I found that more than half of the textures in the room in the screenshots above had their World check box unticked. Ticked them (which caused them to flip negatively on the x-axis), flipped their X-axis so they were aligned correctly again, and BAM - - perfect lighting!
Editor problem.
User problem (not understanding my editor).
Tyrann's Qbsp
#301 posted by Qmaster on 2015/03/09 06:15:29
So...in conclusion, Tyrann's qbsp for some reason doesn't handle undefined face alignment (neither World nor Face checked) very well and causes poor lighting along the edges on those faces that aren't World or Face aligned when created in Jackhammer. Txqbsp handles these okay so there must be some fundamental difference in handling of Subdivide Face between the two.
Just a heads up to anyone else who has this issue when they are using Jackhammer.
Cool
#302 posted by ericw on 2015/03/09 09:31:13
glad you narrowed it down Qmaster.
Could you post part of the .map file (or even just that one brush that gets the black stripe) just for reference? I might be able to fix qbsp if it's an each change.
Btw, rebb's modifed txqbsp is worth checking out, it's probably the best qbsp right now (handles bsp2, detail brushes): http://www.voidspark.net/projects/bjptools_xt/
Test Map.
#303 posted by Qmaster on 2015/03/10 04:27:51
Here you go, I copied and pasted out a small portion of my main map to create a small test map. It's pretty ugly, I retextured it with all the same texture to save time and so that you could open it in standard quake (I'm using a different palette for my game).
.MAP File:
https://dl.dropboxusercontent.com/u/20160676/lighttest.map
.BSP File (Looks awful! and I don't mean just the texturing):
https://dl.dropboxusercontent.com/u/20160676/lighttest.bsp
Compile Log:
https://dl.dropboxusercontent.com/u/20160676/lighttest_log.txt
P.S. The percentages have a newline for every % or something, FYI.
|