#179 posted by JneeraZ on 2015/01/27 11:18:37
You COULD do something like that to create sort of a lighting prefab system tho ...
Like in the worldspawn set up a
"light_hot" "light:450,wait:4.0,blahblah"
And then in your light entities use:
"prefab" "light_hot"
to refer to that setting ... might be interesting.
Or not.
Whatever.
#180 posted by czg on 2015/01/27 14:20:31
When I was making honey I had already written a converter from my editor's native format to .map, so for a moment I toyed around with adding functionality for a light stylesheet of sorts, where you'd place a light, give it a "class" and it would grab the correct values from a file. What was nice was that it could also generate secondary lights, so you could place a single spotlight in the map, and the tool would create fill lights and bounce lights in the right places.
In the end it wasn't really worth it and I refactored it out because copy/paste is so simple in the editor anyway, and mass-changing values was also quick because there were some advanced search tools that let you find similar entities in an instant.
#181 posted by JneeraZ on 2015/01/27 16:40:39
"and mass-changing values was also quick because there were some advanced search tools that let you find similar entities in an instant. "
Hmm? I don't think I know about this ... how and in which editor?
Ogier
#182 posted by czg on 2015/01/27 18:07:24
It was our in-house editor at Starbreeze. There was a really old version released to the public, but it's kinda shit tbh.
The map format was fairly similar to Quake, so writing a converter wasn't too much work.
#183 posted by JneeraZ on 2015/01/27 18:21:12
Ahh nice. Yeah, Ogier always looked interesting to me from the screenshots.
Fun Fact For Czg
"ogier" is Polish for "stallion"
You Know That Worldcraft Has 'advanced Search Tools'
#185 posted by RickyT33 on 2015/01/27 21:52:37
for entities. Map->Entity Report
You can bulk-edit keys n stuff.
Dirty And Lights In Alcoves
#186 posted by Geoffrey Darcy on 2015/01/28 18:35:48
Hello chaps, long time lurker etc. Very impressed with what you've done to this dear old game, so much that I thought I'd have a bit of a play around, which led me to this little issue (unless I'm missing something obvious, which is quite possible).
Dirtmapping happens after the usual lights have lit the map, which makes sense otherwise there would be no lit surfaces to make "dirty". This usually looks really good, but I noticed a situation where it is problematic.
Imagine a light inside a small alcove. The dirtmapping makes the alcove very dark, despite the bright light, because the inside surfaces are all very occluded.
Here is an image showing what I mean (I have used -dirtscale 2.0)
http://i.imgur.com/XKHEGrf.jpg
I can't think of a nice simple general solution to fix this.
One option I thought of could be to create a property you could add to light entities - e.g. "postdirt" "1" - this flag would tell the light compiler to actually process this particular light after the the dirtmapping pass. What this would mean is you could create small, bright, but low radius lights in places like the alcove pictured, in addition to the main alcove light, which would then just brighten the insides of the alcove up again after the dirtmapping has done its thing.
I'm sure there are other ways to slice this particular sausage though.
The AO Approach In Q3Map2 2.5.16
#187 posted by rebb on 2015/01/28 18:52:43
.. isn't ideal.
Back when i implemented it with ydnar, AO was a bit of a "novelty".
The main inspiration for this particular one came from "dirtmapping" shaders for Mental-Ray, where it was applied as a dirt mask and not really used for lighting, although it could be made to work with that too.
I believe someone later added a new Q3Map2 switch that only applies it on map-wide ambient light, which would be more correct.
That would be an option, on top of making lights able to opt-in for the AO ( "_useAO" key ? ).
That way you can make low fill-lights that act as localized ambients, while main lights are not subscribed to the AO and will act more physically correct.
Very Interesting
#188 posted by Geoffrey Darcy on 2015/01/28 19:13:45
That sounds like a good way to go. Having an AO opt-in/out flag on individual lights would give us total control over the look.
#189 posted by ericw on 2015/01/29 03:07:50
Cool, didn't realize you did the original dirt code rebb :)
Yeah, some sort of key to opt-in on a per-light basis sounds like a good idea (or opt out?) I don't know if would be overkill to have flags for enabling dirt on the minlight and dirt on the sunlight, too.
#190 posted by Geoffrey Darcy on 2015/01/29 21:38:01
I'd probably go for opt-in as the default behaviour (if none is specified) on all lights, as I think it looks good most of the time - it's really just the light-in-an-alcove sort of situations where it looks bad.
Working On This Now
#191 posted by ericw on 2015/01/29 22:17:36
it's coming along nicely, and also looks like it's straightforward to have adjustable dirtscale/dirtgain per-light, so you can have bigger AO shadows in outdoor areas, etc. Only the dirtmode and dirtdepth settings need to be constant across the map.
#192 posted by rebb on 2015/01/29 22:25:51
I guess it depends what type of lights the mapper places more often, low fill lights or main lights. AO is mainly an effect meant for ambient lighting and can look strange when applied on main lights or sunlight.
#193 posted by gb on 2015/01/30 00:05:58
Did Tyrann disappear again? I ran into the same issue as digs just now when I was recompiling an RMQ map with these tools. At first I thought the litfile was all black, but then it occurred to me that the color parameter expects 0-255 now whereas Radiant and MHLightColored expect 0-1.
I have to search and replace all my light values now? Or can I use my old light tool with these? I really just want detail brush support.
Another Issue
#194 posted by mfx on 2015/01/30 00:10:25
after compile i get the message saying 0 switchable light styles along with the time elapsed and the light data amount.
In fact, i have several of them in the map, and they all work as intended.
Only the compiler tells me otherwise.
Hey Gb
#195 posted by ericw on 2015/01/30 00:14:19
I've been in touch with him lately and forwarded him some patches, he's just really busy at the moment.
For now I'd suggest the version of tyrutils I posted in #129 of this thread: http://www.celephais.net/board/view_thread.php?id=60967&start=129
That one will automatically handle 0-1 and 0-255 color values. It also fixes a pretty critical bug Lunaran noticed that was creating cracks in sunlight shadows, and probably other lighting glitches. It also has a first attempt at ambient occlusion if you want to play with that! (still WIP though)
#196 posted by gb on 2015/01/30 01:02:08
Thanks ericw, I will try that.
AO in my experience needs somewhat light-coloured textures to look good, Quake's are pretty dark though (probably in order to hide the horrible lightmap resolution.)
Ericw
#197 posted by Geoffrey Darcy on 2015/01/30 14:42:54
Working On This Now
Superb! What a great community this game has :)
#198 posted by gb on 2015/01/30 17:23:11
Messed around with detail brushes last night. As expected, all the fidgety detail that used to be func_wall now casts shadows. Nifty. Checking out dirtmapping now.
What I don't get is, why do you guys add all this stuff to Q1bsp instead of just switching to Q3bsp? You get shaders, mapmodels and patches for free with that one. Quite a few editors support it, too (although no worldcraft NOOOOO)
Gb
#199 posted by Kinn on 2015/01/30 17:28:02
The extremely simple answer is because only Darkplaces supports Q3bsp.
#200 posted by gb on 2015/01/30 18:31:32
ericw,
I tried the dirtmapping and I have to change my opinion. It works pretty nicely in Quake, really enhances the creepy shadows... I also have my coloured lights back.
https://runeofearthmagic.wordpress.com/2015/01/30/dirt/
Kinn,
well, OK. Few engines support it. FTEQW does, though, and it recently got a nice vanilla preset with square particles, netquake physics etc. FTE also supports most of the Q3 shader language (and custom GLSL) while DP only supports single-stage shaders. But I understand that you guys would rather die than give up Fitzquake (and FQ forks.) That's fine, everyone has their preferences. I shouldn't have brought it up again.
Correct
#201 posted by Spirit on 2015/01/30 18:38:32
Spirit
#202 posted by gb on 2015/01/30 19:04:02
You're as tactful as a rhino.
Ericw
#203 posted by gb on 2015/01/30 19:54:27
I second the thing about lights in alcoves + dirtmapping. I'd say opt-out is a lot more reasonable than opt-in since you'll want AO everywhere in your level if you use it at all.
|