Jump to content
The Dark Mod Forums

Screenshots of the XYZ window with desktop-independent resolution


Recommended Posts

I have been brainstorming better ways to setup lighting on the level, and remembered the method used in Quake 4 map Strombine. With that method, one would have to take screenshots on XYZ window in order to paint light images. Some people work on laptops, some have regular HD screens, and taking top down screenshot of a big level will result is loss of details. Would it be possible to add internal screen shot taking capacity (a la Blender) with ability to set virtual resolution that is larger than the screen resolution?

Edited by motorsep
Link to comment
Share on other sites

I'm pretty sure it's possible, as this is something many people are doing in their programs. Never done this myself (apart from fiddling with TDM's render shot stuff a bit), so I don't know if this is something easy or something hard to do to DarkRadiant.

Link to comment
Share on other sites

The Strombine method is pretty cool so I agree it would be nice to make that easier with an editor feature. If I'm not mistaken, this technique was also

extensively used in Prey as well.

Edited by nbohr1more

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

The Strombine method is pretty cool so I agree it would be nice to make that easier with an editor feature. If I'm not mistaken, this technique was also

extensively used in Prey as well.

 

Is there a link available with description of the process or just showing how it was done in Prey ? I've read the tutorials on TDM wiki, and Strombine's author write up, but all of them are confusing. A video tutorial or easier to wrap head around written document would be very welcome :)

Link to comment
Share on other sites

Rich_is_Bored's demo map is about as simplified an example as I can find:

 

http://forums.thedarkmod.com/index.php?app=core&module=attach&section=attach&attach_id=5520

 

but it also shows some of the main weaknesses of this technique... or should I say that it improperly demonstrates

the benefits. The lights in the map are all simulated by brightness variations in the same projection image

and do not properly shade dynamic objects (AI) that move through them. You would generally use this

to make ambient variations such as bounced light approximation or even some AO. The big challenge of this technique

is wrapping your head around the way the projections intersect with map geometry. The best way I can describe

this is to think of the light projection as a Lathe . The falloff image is what controls the where the along the length of the spindle

the cutter is while the projection image controls how deep to cut into the spindle and what pattern to make. Since you are

dealing with ramp gradiants, you can almost think of the brightness of the falloff image as an extra dimensional parameter

since if will make large ramped circles (or other ramped images) smaller as it gets darker. Indeed you can make a sphere

by using a simple ramped circle image with a ramped falloff image and some Doom 3 developers played with that if you

look at the some of the material definitions. I always hoped that someone would make a tool that could chop-up a 3d texture

bake of some ambient radiance into the least number of 1D+2D projections to represent it with parameters that allow for

some data loss (tweaking).

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

That doesn't make things clear, sorry :/ I guess with art related stuff it has to be visual (video or screenshots).

 

EDIT:

 

So I finally deconstructed this setup. It's not the same method Strombine map uses. Here we have standard projection in the shape of the rooms, and standard fall off. The only thing I don't get is why Rich added 100% transparency to the projection image. I decomposed it in GIMP, removed alpha and recomposed it into RGB image. Still get same results in the game.

 

Strombine guy was writing about rotating the light entity (or swapping falloff image with projection image). What what exactly he meant by that, I don't understand, because not only it makes no sense, but also the light can not be sized properly on DR after it's rotated around X or Y axis.

 

Rich's method is quote interesting, because I could make entire level get lit with only a few big lights, textures for which have all the ambient/bounced lighting painted. Hell, can probably just render it Cycles in Blender (all indirect lighting), and the place direct lights in DR.

 

I wonder if TDM already tried such approach.

Edited by motorsep
Link to comment
Share on other sites

OK, I'll try to make a few more images.

 

This one covers more of a binary look at how it works and doesn't address the nuance of it:

 

EnvShot_Projection_LT.JPG

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

That looks absolutely wrong for the example mod you posted. That image looks like projected light shining onto the wall. And the sample test you gave us is about ambient light.

 

Here is how it works. Falloff image is stretched vertically, covering vertical spaces (walls) and the light image is "projected" onto floors/ceilings:

 

T4RVc9G.png

 

It would be nice to have floor and ceiling projection separated.

Link to comment
Share on other sites

The wall projection (falloff image) in your image controls whether the floor projection is shown elsewhere.

If you made the top half of that wall image black it would prevent the floor image from showing on the ceiling (but would also cutoff half of the wall illumination).

To have two different images you need two different lights normally because the floor image (z projection image) is one

of two textures you can apply to a light. The loophole (again) is that a single floor image (z projection) can change appearance based on brightness

so two dark gray circles and one white circle becomes one white circle when the wall projection (falloff) is darkened.

 

The complex thing is taking advantage of that extra dimensionality. And it can get really complicated if you have two or more of these strombine style

lights overlapping such that one light completes the others' lightscape. Developing an algorithm to factor a number of overlapping lights that work

this way and boiling it down to the least number of images, and smallest radius needed to approximate a volumetric lightscape would be a holy grail.

I kinda think the perfect algorithm would be NP hard so you'd probably need to do it via a monte carlo approach.

Edited by nbohr1more

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

That's what I meant about falloff image (I didn't mean the wall is white). Here is modified gradient showing what happens exactly:

 

4g6i56L.png

 

Don't make your ambient lights with this approach overlapping. I'd use one big light for each block of the level (one floor).

 

Again, this is not Strombine's approach. Lights' Z projection image goes horizontally on Strombine. This technique we are discussing now is standard Doom 3 vertical projection.

 

I don't know is Quake 4 editor allows easier way for resizing of rotated lights, but DR definitely makes it impossible.

Link to comment
Share on other sites

There is no standard z-projection direction. You can even set the lights to project at angles. So, yes, these are the same technique to a large degree other

than the fact that Lunaran has a far better grasp of spacial projection than either myself or Rich_is_Bored.

 

Yes, ideally the engine would be designed to allow one light to accept multiple pairs of projection images so that you could do all this with one light.

The closest we have to that is Sikkpin's cubemap projection method.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

You either rotate the whole light volume in vert mode or you rotate the light_center verts (which is better) as I recall.

 

Apparently not in DR, because in DR you only have 1 vertex to work with. In DOOMEdit, light has vertices indeed (I recall I saw vertices in Vertex mode), but I haven't tried rotating them. I dare you to try that, nbohr1more, and post screenshots of the results ;)

Edited by motorsep
Link to comment
Share on other sites

Time to do some testing then... This probably means (at most) that you can only change the light_center position relative to the volume

but not it's angle. This is not such a problem since ambient lights pass through geometry but it may introduce some strange stretching artifacts.

I'll bet a parallel light (with noShadows obviously) would fare better for the intended workflow.

Edited by nbohr1more

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Time to do some testing then... This probably means (at most) that you can only change the light_center position relative to the volume

but not it's angle. This is not such a problem since ambient lights pass through geometry but it may introduce some strange stretching artifacts.

I'll bet a parallel light (with noShadows obviously) would fare better for the intended workflow.

 

So, what happened to testing?

 

I tried parallel light and it doesn't work the same way as rotating light volume.

Link to comment
Share on other sites

Didn't have much time this evening, and then I had to rebuild the demo map to be compatible with TDM 2.02.

 

Here is a link:

 

https://dl.dropboxusercontent.com/u/17706561/strombine_ambient.pk4

 

Changes: made the ambient light an "ambient_world" entity, replaced the missing concrete texture with a TDM version, packed mission in TDM format

 

I'll get to tinkering tomorrow if I get a chance.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Yeah, I just did that so I would have background research for the wiki and so other interested parties could follow along.

Hopefully, I'll have time tonight to finish the testing.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...