DarkPlaces Rtlight Query / Info + WiP Images

Discuss the construction of maps and the tools to create maps for 3D games.
Post Reply
Qrv
Posts: 45
Joined: Thu Oct 20, 2011 7:43 am
Location: Stuck in a Slipgate.

DarkPlaces Rtlight Query / Info + WiP Images

Post by Qrv »

Hello all,

I recall reading somewhere, I think it was a Nexuiz based forum, that DP supports spotlights for RTlights. However, if you set up a spotlight in your map editor,
the normal light + info_null way, the rtlight is still an Omni directional light when in the engine. I've played with a bunch of the RTLight settings, but I seem unable to get the spotlight effect you would expect from doing it this way.

A search around the interwebs didn't really turn up much on this, so I'm looking really for anyone that's made spotlights work as RTLights.
From what I can gather, the *only* way to make a spotlight as an RTLight, is to put up with the engine making the spotlight RTlight as an omni-directional, but use a Cubemap attached to the light, drawn to resemble a spotlight. Although this method of creating cubemaps works, is there no easier / better option for making a spotlight?

I'm not fond of the idea of having to make a bunch of spotlight cubemaps, either in a "generic" form for use anywhere in levels, or specially created ones for specific lights. I also believe that using the cubemaps for spotlighting, wont give a very good realistic look, although the look might well be acceptable considering you dont often spend time admiring the visuals in Quake related projects. ;)


My other query, DP doesn't seem to like "over-lapping" light/shadow area's, which makes sense for rendering speeds. Now, I'm not 100% sure how Quake4 actually does it, but in alot of the muliplayer maps, there quite often is alot of light's here and there, but only a couple appear to actually cast RT Shadows,
thinking this is a great optimization idea, I created a test map, simple 1 room job, 3 lights. ( 2 of the lights happened to be light+info_null spotlights, but meh, that didnt work properly anyway ), with 1 light being specifically set to cast shadows, the others having it turned off for their RTLights.

Now, so far all works as expected, you get one set of shadows cast from 1 light. But, how to make the light NOT cast light itself? Just Shadows?

The closest I could get was by setting the RTLight to have Ambient 0.0, Diffuse 0.1, Specular 0.0 and Color 0.2 0.2 0.2 with a radius of 9000.
This indeed gives me the shadow, but as you can probably already work out, the light is still giving out light, although very dim. ( The shadow is also quite dim, which isnt ideal for what I wanted, I was looking for a strong crisp dark shadow, but no light emission. )

So, does anyone know a way to make a light just cast shadows, with out any light emission, and are cubemaps really the only way to make spotlights using RTLights?

The reason I'm looking for such things, is my "complex" test map, based upon id's original Start map, could have alot more detail, and importantly, optimization if I could use proper spotlights and shadow casting only lights. Some screenshots of how it looks now:

Image

Image
Notice here how the window02_1 has semi-transparent glass, but a solid frame, showing the sky behind, and also using a cubemap kinda the same as how I forsee the useage of spotlights, casts the window02_1 image down as a light.

Image

Image

( Sorry to those that find the images 'too dark', but my project relies heavily on lighting and shadows for atmosphere, and the whole thing is very dark. )



EDIT:

Also, is there a way to use normal maps, specular maps on particles? Not tried it, but as an example, just adding particlefont_normal.tga, particlefont_gloss.tga to the particles folder? I'd like to ideally have particles that can be effected by lights, as certain alpha blended effects look horrid as fullbrights in dark area's. I'd also like to use the refraction shader which can be used on water/transparent stuff (like glass for example) in particle effects also, if anyone has an idea how to go about this.
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: DarkPlaces Rtlight Query / Info + WiP Images

Post by Spike »

lights emit light, they don't emit shadows!
mh
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: DarkPlaces Rtlight Query / Info + WiP Images

Post by mh »

Spike wrote:lights emit light, they don't emit shadows!
A shadow by definition is a place where light has been blocked, so you can't have shadow without light.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
Qrv
Posts: 45
Joined: Thu Oct 20, 2011 7:43 am
Location: Stuck in a Slipgate.

Re: DarkPlaces Rtlight Query / Info + WiP Images

Post by Qrv »

Yes, I understand how lights work, in the real-world...

... But instead of having multiple lights in an area set to cast RT Shadows, surely you can all see how it'd be faster for rendering speed if only 1 light casts shadows? I appreciate this will lose some realism, but it's something that's easily worked with.

Imagine 3 lights, low down to the floor, small radius. All lights are kinda close together, having all 3 cast shadows is gonna be quite expensive, having 1 cast shadows, say the middle light of the 3, instantly saves a few FPS, but the other lights will interfere with the shadows obviously, and as they dont cast shadows themselves, this is gonna look weird. Now, if all 3 lights didnt cast shadows, but an 'invisible' light positioned near the middle light, maybe a little higher up, casts really dark strong shadows, but no light, you could mangle it visually so it looks right, with only 1 shadow casting light compared to 3.

But my main query here, is about spotlights. Do I really have to put up with building a thousand and one cubemaps for spotlights?
I'm looking for a Mapper, Modeller/Animator and a Sound effect/Music person, to work on an exciting project. PM Me here, or catch me on IRC for further info.
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: DarkPlaces Rtlight Query / Info + WiP Images

Post by Spike »

you should be able to create many spotlights on multiple maps using a single cubemap - you can change the direction the light faces. The only reason you might want different cubemaps is if you want different apertures/falloff.
Qrv
Posts: 45
Joined: Thu Oct 20, 2011 7:43 am
Location: Stuck in a Slipgate.

Re: DarkPlaces Rtlight Query / Info + WiP Images

Post by Qrv »

So, thats a yes to having to create thousands of cubemaps. Obviously re-using accpetable cubemaps is a given, but with such a wide range of spotlighting possibilities for atmosphere within DarkPlaces, it's still going to be alot of cubemap spotlight types to create.
I'm looking for a Mapper, Modeller/Animator and a Sound effect/Music person, to work on an exciting project. PM Me here, or catch me on IRC for further info.
Post Reply