|
Posted by ericw on 2015/07/14 00:34:45 |
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. |
|
|
#265
#270 posted by mankrip on 2015/12/13 00:02:46
Editor support could get messy. It would probably require messing around with FGD files to convert Quake entities to Q2 entities� or convert the Quake FGD to the Q2 specs.
I know about the differences between Q1 and Q2 BSPs, but never thought about looking into the differences between their .map formats.
Implementation
is certainly not perfect and I would want to be able to have _smooth work with other brush types like func_group etc.
I'm Sorry For My Sins!
#272 posted by Spike on 2015/12/13 03:44:59
@mankrip
afaik .map format doesn't have that many differences, just 3 extra args. brush contents, face flags, and face light level.
tyrlight already parses q2 maps and generates q1 bsps, however it completely discards the extra 3 args (also, no value texture alignment tweaks).
I don't see why you'd need q2 fgd changes at all, you'd still be targetting q1 mods and tools, and editors that support both would likely continue to support both without really caring.
the real issue is 1) editors that do not support quake2. 2) editors that insist on using wal files instead of wads. 3) editors that assume the palette is that of quake2 instead of quake.
for the editors that are mainitained tbh all it requires is for someone to be vocal enough - its amazing how much of a motivator harasment can be.
@ericw
I didn't change anything to do with sunlight that I remember, so yeah, no support there.
sorry about any other issues with it too. I was going to sit on it while someone else found the kinks for me, before making it public.
but, well, open source matra: release early, release often. I'm too lazy for the second part though.
by releasing I hoped to at least save some time for mankrip.
in theory it should be possible to switch the barrycentric coords part to use the entire polygon instead of a triangle (giving a less-triangular/higher-quality apearance), but I just went with what I understand.
@Fifth, there's nothing specific about classnames, it ought to work with any classname (at parse-time, on account of the way it flags texinfos). certainly there's nothing specific to func_detail.
all I can really suggest is to make sure that there's no tiny cracks between faces, because it calculates normals at each vertex and then just interpolates those over the various triangles that form the surface in a similar way to how a gl engine would interpolate normals.
remember that it'll happily smooth around any angle, 20 degrees, 90 degrees, 170... this means you'll likely want to use some other texture for the top/bottom of your mid-pipe cylinders so that they don't cause it to try to curve around those rings. secondly, sunlight isn't supported right now.
if you're looking at the map in fte or dp, make sure you disable any specular first. the texinfos are flagged to say that normals should be interpolated, but engines don't understand that yet, and yeah, I forgot sunlight, and there can still be harsh (often mid-surface) boundaries due to the maths behind the anglescale thing (at one point I was toying with the idea of these surfaces just always using a value of 1).
Update
#273 posted by ericw on 2015/12/13 05:22:37
I fixed a few bugs that were causing black fringes in my phong test map, and added support for phong+sunlight.
Here is a build: http://quakespasm.ericwa.com/job/tyrutils-ericw-spike/3/artifact/dist/tyrutils-ericw-v0.15.3-7-g05de1ad-win32.zip
and the source code:
https://github.com/ericwa/tyrutils-ericw/commits/smoothnstuff
Hopefully this works on your map, Fifth!
Note, this is based on the previous release of tyrutils-ericw (0.15.3), I'll need to do some merging later on.
Editor Support
I'd add support for Quake 2 map in Quake games in a jiffy. Would be really easy too.
Eric
That seems to work actually. Very cool. Have you altered the code at all? It seems slightly less smooth than before (but still a lot better than ordinary lighting).
Seems like whole number integers on vertices or on texture alignment place a huge role in getting the lightmap to look right. Otherwise you get huge black bars or just errors in the lightmap.
Fifth
#277 posted by ericw on 2015/12/13 20:15:37
I see what you mean about less smooth / more banding, I messed up something with that last build; trying to fix it..
#278 posted by ericw on 2015/12/14 00:13:48
@Fifth here's another build to try, I think it fixes the things I broke in the last one: http://quakespasm.ericwa.com/job/tyrutils-ericw-spike/9/artifact/dist/tyrutils-ericw-v0.15.3-10-g896b821-win32.zip
There is still room for improvement; I still get a few fringe artifacts on some terrain that was rotated 15 degrees, but it's pretty minor and way better than the last build.
@Spike: I switched this build to use SSE; for some reason x87 vs SSE was making a difference in the barycentric coordinates code, with SSE having less artifacts when interpolating points outside the triangles. I will investigate it better at some point :-)
I will give it a whirl after work. These compilers give me leaks compared to the ones I normally use
I normally use bjp's compilers.
#281 posted by ericw on 2015/12/14 19:03:59
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
Light.exe
seems to crash for me in this build. No idea what's causing it.
Shit, Sorry
#283 posted by ericw on 2015/12/14 23:18:44
Here's another try...
http://quakespasm.ericwa.com/job/tyrutils-ericw-spike/10/artifact/dist/tyrutils-ericw-v0.15.3-11-g78ca193-win32.zip
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!
Hmm
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).
#284
#285 posted by mankrip on 2015/12/15 02:35:37
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
#286 posted by - on 2015/12/16 12:45:59
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?
Oh
#287 posted by - on 2015/12/16 12:49:16
nm found the leak, and is what causes the vertex overflow...
#288 posted by ericw on 2015/12/16 19:54:15
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.
#289 posted by JneeraZ on 2015/12/16 20:05:33
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.
But
#290 posted by ijed on 2015/12/16 20:28:09
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.
#291 posted by - on 2015/12/16 21:46:21
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.
#292 posted by JneeraZ on 2015/12/16 21:46:34
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 ...
#293 posted by anonymous user on 2015/12/16 22:44:05
The longer you leave something unsealed the bigger the final task of sealing it.
^^that Needs To Be Framed
#294 posted by mfx on 2015/12/16 22:45:08
and whatnot.
|
|
You must be logged in to post in this thread.
|
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.
|
|