News | Forum | People | FAQ | Links | Search | Register | Log in
Tyrutils-ericw V0.15.1
Hey, I got around to setting up a website for my branch of tyrutils: (complete with lots of screenshots of different settings of AO, sunlight, etc!)
http://ericwa.github.io/tyrutils-ericw
and making an "official" release of it.

Nothing major changed compared with the last snapshot (may 1st), but a couple new things:

* .lux file support from Spike, for deluxemapping
* gamma control with -gamma flag and "_gamma" key
* rename -dirty flag to -dirt for consistency
* fence texture tracing is now opt-in only with the "-fence" flag.
* light should run a bit faster


This doesn't have lit2. Not sure what to do with that, tbh.

If there's a demand for it, I was thinking I could make a tool that upscales all textures in a wad by 2x or 4x, and adds a "-2x"/"-4x" suffix to the names. You could then manually get the higher-res lightmap on certain faces by applying the upscaled texture, and lowering the texture scale to 0.5 or 0.25 in your editor.

The only real disadvantage of this hacky method over lit2 is more face subdivision by qbsp. This isn't great, but it shouldn't be an issue if the hack is used sparingly (and bsp2 can be used if needed for higher face/vert limits.)

Anyway, enjoy, I hope this is pretty bug-free.
First | Previous | Next | Last
Crazy Idea 
All this talk of lightstyles in the AD thread got me thinking...

Say you had a moving object with start and end positions in radically different lighting conditions.

Imagine you could tell the light tool to light this object in position 1, assigning all light on it to lightstyle "x", and then light it again in position 2, assigning the light to style "y".

Then in the QuakeC you could fade lightstyles x and y in and out as the object moved.

Just an idea, but it struck me as interesting that this sort of cheap dynamic light effect boils down to being a compiler thing + a bit of QC.

You could even go nuts and leverage the fact you can have up to 4 lightstyles on the object, so can specify up to 4 different positions to light it in, allowing much more accuracy in the blending as the object moves around.

I may be missing a few "gotchas" but, does the theory sound basically correct? 
 
there are only 64 lightstyles total, and 32 of them are used by light.exe for switchable lights, the other 32 for "styled" lights (flickering/pulsing) -- of which about 11 are actually used in id1 progs. So I think this would work if you were willing to dedicate 2-4 styles just for that one moving object, and write a quakec modification as necessary to do the proper fading. 
It Is Intriguing 
I guess it would be something that could become an attractive idea when you have situations like in Hrimfaxi's rrp map, where there is a large section of a big room that moves up through several floors.

Wouldn't be worth it for run-of-the-mill platforms and what not, but for big setpiece movers I can see it having the potential to look quite sexy. 
 
There are 64 lightstyles, but Quake's BSP format only supports 4 different styles per surface.

IMHO, a more practical solution would be to use the "Lit BSP models" feature from the Makaqu engine 1.6 (used to adjust the brightness of the ammo boxes to the ambient lighting) and add an option to make it also work on internal BSP submodels. 
#637 
I only suggest the idea because it struck me as interesting that it doesn't need a custom engine.

I'd be happy to use up a handful of lightstyles on a moving room setpiece.

How is the "ambient lighting" determined in Makaqu? 
Cool Idea! 
I think the challenge is working out a standard between the mapper, light.exe, and the QC. light needs to have a copy of the logic for the func_door/train or whatever is moving. Func_door would be pretty easy, func_train would be trickier (unless the mapper marks which path_corner's to calculate lighting at, up to 4 per train?).

Also, things like making sunlight/sunlight2 use a lightstyle other than the default of 0 are certainly possible without too much work in the light tool. Easiest way might be for the mapper to specify a lightstyle number with a worldpawn key like "_sunlight_style" - light would then use that for the sunlight, and know not to assign that style number for a switchable light. 
 
I guess one implementation could be...

I would suggest light.exe should not need to know how the object moves - it only needs to know the positions to light it at - these could be specified in the map with "info_lightmodel" entities - they would mark the various positions (mins?) of the brushmodel. The info_lightmodel would target the brushmodel (to let light.exe know what to light, obviously), and also specify the "style" number to use. 
Also 
your sunlight suggestion is cool.

Question: what happens with bounce light coming off a surface with styled lights? Is there a bounce for each style? 
 
Mmm - yes the info_lightmodel sounds good.

Currently styled lights don't bounce at all, this was something I limited to make the first version of the code simpler, but I want to support it eventually. 
 
Yeah I guess bouncing styles would have a similar problem to styles on lights with 1/x or 1/x^2 falloffs: you could propagate styles to tons of surfaces everywhere and it could get out of control.

I think for most styled lights, you won't really notice the lack of bounce, but if you start doing styled sunlight, then I think sunlight bounce would be noticeable and you'd expect it to change like the direct sunlight does. 
Kinn 
How is the "ambient lighting" determined in Makaqu?

Nearly the same as in MDL models, using R_LightPoint and the entity origin, offset by the relative model position.

As for a pure QC + assets workaround... How about this:

- Make one model on origin A (start), and another on origin B (end).

- Set the B model to non-solid, and enlarge it by 1 unit (not 1%) on each direction.

- In the QC code, make the B model follow the origin of the A model.

- Implement code to fade the .alpha of the B model according to how far it is from the end position.

Almost every custom engine supports .alpha, so this shouldn't be a problem unless someone really wants to target vanilla WinQuake/GLQuake. 
Bmodels With _shadow 1 Lighting Problem 
Does light do simplified calculations on bmodels with _shadow 1? I get weird squares of shadows on solids from complex bmodels (in places, not everywhere). Splitting a big bmodel into a few smaller ones doesn't change anything. Any suggessions? 
 
There have been problems with _shadow 1 bmodels intersecting/touching each other, or the world. The faces that are touching can have artifacts, either black fringes or solid black or other artifacts.

I forget what the current status is, because I've been swapping in and out hacks to try to combat that.. but I'm working on a more correct fix.

Other than that, there shouldn't be any problem with shadows from bmodels. Check your version is 0.15.9, or feel free to email me screenshot/map if it seems like a different bug. 
So 
If the bmodel doesn't touch another solid, the problem should be gone? 
 
Yeah, if they're not touching the problem should not occur (at least a 2 unit gap. The light sample points are 1 unit above the face, having these sample points blocked is what causes issues) 
Thanks 
that was very helpful 
Ericw 
does "-bounce 1" bounce lights with negative values? 
Nope 
Negative lights are ignored by bounce 
Hexen 2 Rotating Entities Broken 
The use of an origin brush for rotating entities doesn't work with -hexen2. The origin brush is visible ingame and the brush still rotates around the map origin 
 
Yeah, there is no origin brush support at the moment.

Current behaviour is (designed for Q1 hipnotic rotation):
If a brush entity classname starts with "rotate_", qbsp looks at the "target" key, and searches for the targetted (point) entity. That point entity's origin becomes the origin of the brush entity.

I'm not sure if that is compatible with Hexen 2 rotation? 
Probably Not 
Hexen 2's is more like half-life, though it uses the "flags" key for how many degrees it should rotate. I think you can manually enter the origin to specify where it should rotate but that doesn't seem to work right in trenchbroom 
Figured Out A Sort Of Workaround 
You can actually manually put the origin in, but you have to place the brush at the map origin or it ends up outside the map.

Kind of a pain to light it properly but it works otherwise. 
 
lmao that sounds like an editing nightmare 
 
Tried implementing it, download available on the github issue

It might be handy for Quake too.
Hope I did it right.. if there is a brush in a brush entity with the "origin" texture, the center of that brush is used as the model origin (qbsp translates the model so that point is at 0 0 0, and sets the "origin" key).

Also light no longer cares about the classname starting with "rotate_", if the brush entity has an "origin" key set to something other than "0 0 0", the faces will be translated to that position during lighting (hopefully doesn't break anything?) 
Im Wondering 
Is there a standard for final compile settings? I assume people leave BSP and VIS parameters alone, except maybe -bsp2 for BSP? Is that something everyone uses, or only if the map somehow doesn't compile as a regular BSP? Is there any reason not to use BSP2?

For light, judging by the doc page on Eric's site, I'd guess people use -extra4, -gate 1, -bounce 1, and maybe some -soft? 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.