#1 2023-07-01 09:21:57

Baker
Member

DarkPlaces Questions

How do rtlights work?

I have some theories, I think it is some origins and some light colors with intensity.  But I don't know.

Yes, I could google it or dig into the engine code but I'd rather ask.

I watched Quake Done Quick Epsilon Edition

https://www.youtube.com/watch?v=U6iihdUkFY8

I also watched a Tenebrae Vs. DarkPlaces vid.

https://www.youtube.com/watch?v=8iRDkFFZ8oc

I wish I had asked 10 years ago when Inside3D was still active or when LadyHavoc was easily accessible how Tenebrae did the fog?

DarkPlaces people had a hate for Tenebrae and knew tons about it.  I tried it once in ancient times and thought Tenebrae was neat to try once, but in my head the 8 fps made it a novelty.

Part of me wonders if it is possible to get fog like Tenebrae seen on E1M1 and Start easy hall window.

#2 2023-07-01 09:27:38

Baker
Member

Re: DarkPlaces Questions

1. Does anyone know a good procedure to make normal maps (_norm) textures for a texture without one.

Ironically, making a _gloss texture is easy (I think it is a trace edges filter a number of image editors have and it looks great in-game).

A normal map texture is like a bump map texture except it has more information.  Like _bump just has the height.  A _norm contains angles too, if I recall.

2. Does anyone know the difference between _gloss and _reflect textures?

#3 2023-07-01 20:15:58

jakub1
Member

Re: DarkPlaces Questions

DP supports _reflect textures? I thought DP only reads following textures:

_norm.tga
_bump.tga
_gloss.tga
_glow.tga
_luma.tga

_glow and _luma have IMHO identical result. Reflection is done via shader and cubemap.

As for the normal textures - I tried to make some with the help of several YouTube tutorials but in-game presentation was just horrible. I was probably missing something important, some DP quirk. Moondrunk would be the best person to ask. In the end, he is the creator of QRP textures.

#4 2023-07-01 22:59:06

Baker
Member

Re: DarkPlaces Questions

"DP supports _reflect textures?" 

Yes.  I think they are equivalent to _metallic that you see for material textures like ...(Yeah _luma and _glow are the same thing)

https://ambientcg.com/list?q=metal

MetalPlates006_PREVIEW.jpg

Apparently normal maps are often made with specialized image editor functions in Gimp or Photoshop.

It seems there are also online tools to make one:

https://cpetry.github.io/NormalMap-Online/

Last edited by Baker (2023-07-01 23:03:15)

#5 2023-07-02 02:19:28

Baker
Member

Re: DarkPlaces Questions

I tried the RTlights editor.  That csqc is sophisticated as hell.  Some serious, serious effort went into making that.

At first glance, there are 2 things about it that I'm interested in checking out in the source.  Like how the client is aware of the light positions in the map (I guess I'll find out), because this tool is csqc only which is nice so it does not need mod support.

Link: https://quakeone.com/forum/quake-mod-re … -edit-tool

http://www.mediafire.com/download/3tzac … _Smith.zip

What is the cube map for?

Format:

origin[0] origin[1] origin[2] radius color[0] color[1] color[2] style "cubemapname" corona angles[0] angles[1] angles[2] coronasizescale ambientscale diffusescale specularscale flags)

style is the lightstyle, like 1 for flickering light, 2 slow pulse, 3 candle, 4 fast strobe, etc.

// flags for rtlight rendering
#define LIGHTFLAG_NORMALMODE 1
#define LIGHTFLAG_REALTIMEMODE 2

LIGHTFLAG_REALTIMEMODE is default
corona scale defaults to 0.25

first 8 args are required, others optional

Last edited by Baker (2023-07-02 04:03:51)

#6 2023-07-02 06:34:02

Baker
Member

Re: DarkPlaces Questions

Holy fuck!

DarkPlaces supports dynamic lights for the Quake 3 map format via a .rtlights without using real time lighting!!!!!!!!

I have a flickering light on a map without using real time lighting!

I use 18 parameters for a light and set the last parameter to 1 instead of 2.

Dynamic lighting is said to be impossible for the Quake 3 map format.

#7 2023-07-02 09:24:42

jakub1
Member

Re: DarkPlaces Questions

Cubemaps are used for spotlights. RTlights are by default omnidirectional so whatever you do with them creates quite uninteresting and bland environment. The real lighting magic comes with cubemaps. By linking a specific light to the cubemap you effectively close light source inside said cubemap and the light shines only through non-black areas of the cubemap. Another great feature of above mentioned RTlights editor is that it allows you rotate cubemap along x/y/z axis in realtime. But the best thing about RTlights editor is that you can copy a complete definition of any light and apply it to a new light source. That greatly improve workflow.

You can look inside my Nehahra RTlighs pack to see examples how cubemaps work. They follow the same naming convention as skyboxes.  I used them for almost all lights.

Link is inside the first post in my thread here

And yes - one of the parms defining light source is whether that light works in normal (non-realtime) lighting mode. I set all lights to YES so Nehahra RTlights works even without turning RT lighting world ON. RTlights look slightly different in normal mode, but there is almost no FPS drop. However, the FPS drop with RT lighting world ON is not the problem of the RT lighting feature itself. It just has to work with what is available and by that I mean that it turns all lights sources into realtime light sources casting shadows. And there are usually hundreds, sometimes thousands of lights everywhere. Great part of them is totally useless and can be deleted. In Nehahra, I usually ended up with less than half the RT light sources in comparison with the initial count of lights presented in bsp. Realtime lighting world feature is pretty much useless without custom tailored RTlights.

Last edited by jakub1 (2023-07-02 09:27:37)

#8 2023-07-03 02:04:14

Spoike
Guest

Re: DarkPlaces Questions

> Part of me wonders if it is possible to get fog like Tenebrae seen on E1M1 and Start easy hall window.
FTE (ignore the disco colours, that's more to demonstrate which lights are lighting what): fte-20141003052828-0.png
(should be possible to replicate with the -tenebrae arg which should also load the tenebrae gamecode and its endedit map too of course, if you installed that stuff)
It should be noted that tenebrae has a setting to override the lightmap intensity via the worldspawn .ent fields, allowing for them to be retained for fill lights.
Anyway, regarding your question, that fog is 'just' sprites. Simultaneously additive and lit sprites, shadowless ones. The lit part lets them accept the light+shadows+cubefilters of nearby lights, while the additive part stops multiple-layer transparencies from bugging out (ALL of tenebrae's sprites are additive, which solves that particular problem). Them never casting shadows prevents their billboarded nature from being obvious on the sprites behind them. With a forward renderer, all lit surfaces are basically additive beyond whatever initial/ambient depth-writing pass so they're basically just lit naturally without needing any special rules. The down side is that all those sprites result in excessive overdraw and can oversaturate rather easily too.
Asaki still complains at me for following tenebrae's definition of lit sprites. :(

> DP supports _reflect textures?
Those textures are a greyscale mask of the parts that are meant to reflect the relevant cubemap, which iirc need to be specified in the specific material, which allows localised performant baked reflections, and is thus rather awkward to use properly. I believe xonotic also uses it on its weapon models to make the polished parts a bit more shiny without making the rough bits reflective too.
Obviously it'd be better to have hl2-like env_cubemap stuff to define which areas should reflect what, but that sort of thing requires effort so it tends to be ignored (FTE has a bspx lump for the resulting per-surface cubemap index).

> Dynamic lighting is said to be impossible for the Quake 3 map format.
Yup, the q3bsp format does NOT support anything more than one lightstyle.
That's not to say there are not other ways around it, like:
a) Upgrading to rbsp(like rtcw) or fbsp(like warsow). DP doesn't support either of these though.
b) Using shader tricks - q3map2 can generate per-surface shaders that provide lightstyle-like animations using external lightmaps layered on top of each other in order to fake various animated lightstyles. Not usable for switchable lights (although q3 does allow remapping shaders so it *might* be possible in q3, but still messy. DP doesn't support any real multi-pass shaders though.
c) (ab)using realtime lights. Has the downside that it breaks as soon as the user tweaks their settings to something more performant - extra such rtlights(in detailed areas) making this an even more likely occurrence. They'll blame the map if it leaves them crippled because of it. Note that DP already has a few performance issues. I'm not really sure why you seem so surprised that you can do it this way... No support for lightstyles would make it impossible to relight most q1bsp maps in any remotely faithful way, any reasonable person would expect it to be usable with other bsp formats too.

> Cubemaps are used for spotlights
cubemaps on rtlights are used to project textures... eg to filter the light around to whatever covers or filters that may be placed around the represented lightsource.
Using them for spotlights will sadly not stop them from being omnilights, which has a tendancy to result in weird shadows cast on the nearside of said filters... which is just weird. But yeah, useful for fancy effects like windows or lanterns or other covered light sources or w/e.
note how tenebrae attached a cubemap to the lavaball trails to simulate its uneven lightsource.

#9 2023-07-03 04:48:26

Baker
Member

Re: DarkPlaces Questions

Thanks for the info, Spike!  Much appreciated since you are possible the sole surviving primordial other than mh, no one else except you would know that Tenebrae information.

When I got into engine coding, Tenebrae was old news and it just never came up as a conversation topic.

So it is just sprites as Tenebrae fog, eh?  I suppose that is a little undramatic.

I am grateful for the detailed information on the fog ... the mix of sprites and blend modes.  May help if I decide to see if I can replicate that kind of effect.

I am aware of the shader tricks for Q3, DarkPlaces seemed to have no support for them and you definitively confirmed that.

When I started my Q3 quest, Xonotic/nexuiz had a long history existing code and maps and is still active so I went with their bsp version and stuff largely compatible with their work.

Last edited by Baker (2023-07-03 05:01:21)

#10 2023-07-03 08:07:30

Baker
Member

Re: DarkPlaces Questions

Ah Seven, that guy was quite the DarkPlaces content production machine.

And I was trying to figure out how to not (not!) light sprites in DarkPlaces, and I run into a YouTube video by him.

I guess to light sprites you put a "!" in the sprite name (don't feel like looking thru engine code to see if another way.)

#11 2023-07-04 02:04:00

hemebond
Member

Re: DarkPlaces Questions

These two repositories might help you understand how to work with texture variants and rtlights:

- Textures: https://github.com/hemebond/quake-textures
- RTLights: https://github.com/hemebond/quake-rtlights

#12 2023-07-04 04:18:01

Baker
Member

Re: DarkPlaces Questions

@hemebond

Thank you for the links to that detailed information.  That E1M! secret area screenshot is the best I've seen.

#13 2023-07-04 21:58:26

Mopey bloke
Member

Re: DarkPlaces Questions

There is a Discord server dedicated to Darkplaces development. Lady Havock was posting back when I was there.

https://discord.com/invite/ZHT9QeW

Last edited by Mopey bloke (2023-07-04 21:59:22)

#14 2023-07-04 23:58:21

Baker
Member

Re: DarkPlaces Questions

Nice to see that it is likely possible to contact LadyHavoc via that method should the need arise.

#15 2023-07-05 05:13:55

triple_agent
Member

Re: DarkPlaces Questions

Mopey bloke wrote:

Lady Havock was posting back when I was there.https://discord.com/invite/ZHT9QeW

I remember 'Lord Havoc' - but 'Lady Havoc'?

#16 2023-07-05 12:16:17

Baker
Member

Re: DarkPlaces Questions

Live and let live.  I was part of the Columbus Ohio LGBTQ community.  My best friend was gay (I didn't know) and I was straight (his friends all insisted I was actually gay).  I had the time of my life with awesome male friends (plus alcohol was awesome, me being too young and such).

But yeah, I wasn't gay and eventually my inability to have reciprocal feelings caused friction and I decided to cease contact.

I have kids and of all the fucked things, my exwife worked with my best gay friend for years and I didn't know.

Today, I tell my kids stories of how downtown Columbus was a shithole, but the gay community perpetually bought properties and fixed them up and transformed downtown Columbus into great place.

We all have something to contribute to this world.

And besides no one would believe you if you told them Baker was from the Horsehead Nebulae and part of an advance group to infiltrate and assimilate into your kind before invasion.  Why would he care what pronoun you prefer when you kneel before your overlords?  Yes, it matters not.

#17 2023-07-05 16:27:24

triple_agent
Member

Re: DarkPlaces Questions

I see, I am sorry.

Board footer