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!)
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
I normally use bjp's compilers. 
Yeah, these are less forgiving than bjp's. Raising the -epsilon parameter to qbsp can help, default is -epsilon 0.0001, try 0.001, 0.01 
seems to crash for me in this build. No idea what's causing it. 
Shit, Sorry 
Here's another try...

I notice extra/extra4 + soft crashes this one. Sorry about all the buggy builds but it'll take a bit to get all of this stuff stabilized and merged. I gotta go map first! 
This one appears to compile but I'm getting some black bars across surfaces even worse than the first build.
It's very likely this is due what I am testing it on (bsp pipe work) and is caused by micro-leaks and things along those lines. I suspect there might not be an easy fix for this other than to reduce detail for smoothed light maps, have smoothed textures use whole number values instead of decimals when doing its calculations? (I'm pretending I know what I'm talking about by this point, from my tests it appears that the closer to a whole number you get the better the smoothing appears to be across a surface). 
In some cases, the position where two vertices of two different brushes meet can become different for either brush due to differences in precision between them during the compiling. This will make the hidden orthogonal face of one of them to pop out, and this will mess up with the smoothing algorithm indeed.

It's one of the extreme cases I had predicted, but it shouldn't happen too often. 
QBSP Error 
ERROR: Too many vertices ( 65541 > 65535 )

Map also leaks in some mysterious way I haven't deduced yet because there is no .bsp generated due to the error... not sure if they are related...

Map only has 7901 brushes, so it shouldn't be hitting vertex limits I would think?

Any reason why this limit couldn't be raised? 
nm found the leak, and is what causes the vertex overflow... 
Cool - if you need >65k verts, I think you just have to switch to bsp2 with the -bsp2 flag. I will add that to the error message. 
Which is actually a good working philosophy even if you don't want to ship a BSP2. It allows you to work on an unsealed map for much longer. 
Bad working practice IMO. The longer you leave something unsealed the bigger the final task of sealing it.

I prefer keeping everything sealed as I go along, even if it's with giant bricks I'll eventually delete. At least then I know that everything else is without b0rken3ss. 
Well, this only leaked because I'm working on this map with Lun and I merged in some of his stuff, and one of the brushes was apparently corrupt after import. Think even with some more to do, we'll still be well under and won't need to bsp2. 
Depends on the map. I've had times when it would have been a fuckton of work to seal the map and it just wasn't time ... 
The longer you leave something unsealed the bigger the final task of sealing it.  
^^that Needs To Be Framed 
and whatnot. 
Hey EricW 
I've confirmed that the problem with not all water surfaces being lit is a tools bug.

The light tool will only generate lightmaps for the liquid surfaces that gets hit by a light entity's beam. If no beams hit a liquid surface, no lightmaps will be generated for it. I couldn't figure out a simple way to fix this yet.

I'm compiling the maps with qbsp -splitspecial enabled. 
I see, normally face->lightofs == -1 means the lightmap is black, but for liquids you need to treat -1 as "not compiled with lightmapped water, so render fullbright", is that right?

It should be easy enough to always save lightmaps for liquid faces, even if solid black. But I don't think I added lightmapped liquids support to tyrutils-ericw, do you have the code for it already? I am happy to add a command line flag for it, just don't want to waste time reimplementing it if you already coded it. 
that would be my fault. I added -lightwater etc args in that smoothnstuff branch, but didn't actually get around to testing it at all.
(release early, release often, right?)
it should be simple enough to tweak WriteLightmaps to just write a lightofs of 0 instead of -1 when texinfo->flags&TEX_SPECIAL, with all styles still set to 255, I guess.
I assume engines will be able to cope with that, but I've not checked. 
Wasn't there a concern due to the way that most engines render water by using a deforming mesh? 
@Spike ah, cool. Still meaning to merge in your smoothnstuff branch, just lazy right now :)
@Fifth hm good point, this will need to be tested. Also thanks for the idea about using "smooth" prefix on texture names to enable phong shading, that could be good. 
re: unmerged branch
I wouldn't worry too much, I've been too lazy to fix any niggles since I uploaded it. :s

re: smooth prefix
I disagree in the long term on account of that making multiple smoothing groups too awkward to use effectively.
supporting q2 .map files for their surface flags would be good. tyr's qbsp can already parse them, so we just need editors that support q2 .map with wad files, and to actually implement smoothing groups with it.

re: lit water
yes, lit water would generally imply that the lit water surfaces should also be subdivided by the qbsp in the same way that regular walls are (this means the qbsp needs to be aware of it too, and not just the light tool).
engine-based turb subdivision isn't really a concern, as it doesn't affect the lightmap. there are already occasions where surfaces are overly pointy. if anything, having the qbsp subdivide turb surfaces too would reduce this
the 'real' concern is that very few engines actually support lit turb surfaces

re: nstuff
I kinda want to build func_illusionaries and brushes with alpha-masked textures into the world too. conceptually this would be easy (assuming it doesn't have any fields set), they can just be treated like some water contents with water vising stuff, and be converted to the appropriate contents type just before qbsp outputs the unvised bsp.
this should improve engine batching and stuff (and be consistent with what hlbsp support already requires from engines).
there's some other things that need tweeking, but I forgot much of it. :s 
Yes, I've fixed something else in the light tool for the lights to display properly on liquids, but by default you just need to compile the BSP with qbsp -splitspecial. This will make water surfaces be subdivided, and with the TEX_SPECIAL flag not set. In theory, this should have made them be treated exactly like regular surfaces by the light compiler, so this bug with fully dark liquids is puzzling me� 
Here's The Code 
I've managed to fix it tonight. It should be bug-free, but it would be better to attribute a dummy lightstyle for fully dark liquids, to avoid potential "too many light styles on face" warnings.

Posted at InsideQC: 
That wasn't your fault. I've implemented this code way before you released your smooth shading code.

My code still uses an old version of TyrUtils, by the way. I haven't ported it to the current releases. 
Lit fluids and smooth shaded surfaces... come on guys XMAS is over already and yet your still making these lovely gifts for the mapping community? :) Please continue. I do look forward to a final version with all these new toys included.

BTW the Website showing showing all the various options has been a great help getting the concepts across when it came to the dirt and sunlight options. 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2020 John Fitzgibbons. All posts are copyright their respective authors.