Jump to content
The Dark Mod Forums

Removing Glare


Gildoran

Recommended Posts

I was wondering if anybody had some tips on removing glare...

 

I've taken some pictures of roof beams in my house, but they're not well lit, so I've had to use the flash from my camera. Unfortunately, wood is shiny, so the wood at the center of the image is brighter and less saturated than the wood at the edges. Does anybody have any suggestions on how to even out the brightness?

 

My current strategy is to desaturate, blur and invert the image, then mix it back with "soft light" blending, adjusting things like brightness/contrast. Unfortunately, it hasn't worked too well yet. :(

Link to comment
Share on other sites

The best thing to do would be to find some way of softening the flash, I have heard that wrapping some kind of thin paper around it can help. As with shadow removal, attempting to correct the glare after the fact using Photoshop is never going to give you more than "adequate" results, and will probably make the texture look strange when you try to tile it.

Link to comment
Share on other sites

The place to focus on is the lighting when you're taking the photo, not photoshop. In photoshop, no matter what corrections you try to make, you'll end up with half a photo, in terms of quality.

 

Yeah you need some sort of even lighting. Orbweaver's suggestion sounds cool. Since it's your own house though, you could afford to put some other lights in that room. Aim some bright light at some white surface to diffuse the light more evenly across the room.

Link to comment
Share on other sites

The place to focus on is the lighting when you're taking the photo, not photoshop. In photoshop, no matter what corrections you try to make, you'll end up with half a photo, in terms of quality.

That's right for sure, but if Gildoran is still going to play with this photo in Photoshop I would recommend making mask. Press Q for Quick Mask Mode, then select Gradient Tool with Radial Gradient Shape, select white and black colours for Foreground and Background, draw the radius from the center to the edge of picture, press Q to come back to normal mode (you might need invert selection here) and then adjust Brightness/Contrast (or Shadow/Highligt if you have CS version) in Image/Adjustment menu. You probably might try several times changing the radius of gradient filling before the result is satisfactory.

Link to comment
Share on other sites

Good news! I finally managed to remove the glare from the photos reasonably well, and tacking 3 photos together into a single long beam allowed for me to even out the shading. I've uploaded the texture as wood/trim/beam_002.

 

It may be a little too hires for a wooden beam (it uses the same amount of memory as a floor), but I always figure it's much easier to downsample than to upsample, so I like to work with the largest resolutions possible. Towards the edges, the normalmap curves to a 45 degree angle... This way, carefully textured wooden-beams appear to have soft corners. :D

 

post-244-1156243545_thumb.jpg

Link to comment
Share on other sites

Not bad! The specular may need tweaking though, since it looks a bit plasticky.

 

I love the idea of softening the corners with a normal map, but it seems to have an unfortunate side-effect. Check out the edges - the beam has a black outline. Doesn't really fit. :mellow: It'd probably be fine if it was against a dark/black background like a roof, but that restricts its usage a lot.

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

Ah, good point. I neglected to take into account the position of the light source. :blush:

 

I'm still curious as to how well the illusion of roundness holds though. What would happen if you moved the light so that it's shining directly onto the upper-left corner of the beam (the "upper edge" as seen from the screenshot's view)?

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

The light more or less is shining on that upper edge. The illusion of roundness is almost perfect until you see the profile - check out the "round" bannisters and handrails in vanilla Doom 3, they look round but are in fact square.

Link to comment
Share on other sites

The light more or less is shining on that upper edge. The illusion of roundness is almost perfect until you see the profile - check out the "round" bannisters and handrails in vanilla Doom 3, they look round but are in fact square.

Looks like the light is coming from the upper-right to me, not the upper-left; the light is above and slightly to the right of the beam.

 

But okay, my question is answered now. :)

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

Agreed about being a tiny bit too shiny (maybe make a second material without the specular at all?), and I guess the outline from the normalmap could 'take it out of the scene' a bit, but overall I like it. I briefly tried something like that rounded edge on the dice I made, but it looked like crap.. maybe I'll give it another go. Are those lateral grooves in the diffuse or normalmap, from manufacturing?

Link to comment
Share on other sites

Thanks for the input!

 

About the black at edges of the beam, what I usually do is fit the texture to the beam, then scale it vertically by 0.95 or so, to stretch it so that the extreme edges don't quite show up, but the angle where the sides meet still matches. It could still end up with an "outline", but I'm wether or not sure it would be a problem in actual practice.

 

I've decreased the specular some, but I don't intend to remove it all together; in my experience even unpolished wood is shiny.

 

By "lateral grooves", I assume you mean the vertical markings. The original wood has those too, so I assume it's from manufacturing.

 

BTW, here's what it looks like with the light from the other side:

post-244-1156269131_thumb.jpg

Link to comment
Share on other sites

Ok... using another image of the same beams, I've started work on making a window frame for use in some window texture testmaps I'm going to be making. Here's a shot of the detail:

post-244-1156319429_thumb.jpg

I don't think it looks quite as realistic as the beams, but I'm still pretty happy with it. :)

 

Any suggestions for how to do glass/dirt? Do I need to look for source images of dirt or is there a way of generating it?

Link to comment
Share on other sites

I don't think I've ever seen glass looking quite like that... maybe if it was slightly less saturated (i.e. more grey), and perhaps a bit darker? I dunno, not quite sure what would improve it.

 

Reminds me of TDS level transition fog. It's that same cloudy-looking blue. :)

 

The wood is looking good though! I don't think I've ever seen a wood join like that (between the vertical and horizontal pieces of wood within the frame) but it's very plausible and I'm nitpicking in the extreme here. Probably not worth tweaking.

 

... Bleh, I should stop criticising your textures so much, I really can't talk. :P

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

I think it's probably the richness of the textures. The wood's got a manufactured feel, which might be translating as gamey. Maybe some desaturation for both, and a rougher normalmap for the wood? Even DG's hand-painted (and thus quite fake looking) Blade of Darkness textures begin looking photoreal with a gritty normalmap.

 

That said, they do look good. :)

Link to comment
Share on other sites

The way I'm intending to do lights is to have a couple of different source textures: one of the frame and glass (the part due to glare from indoor lighting), and one just of the glass (to simulate light coming through from the other side) From those, you could construct different textures to meet differing needs:

  • A nice looking glass using specular to simulate light from the other side. (about as expensive as a blendable texture)
  • A cheap glass using additive blending whose color is controlled by vertex parms, or has a couple of preset colors. (useful for when you don't have extra fill-rate to spare, or you don't want to place light entities to color it.

I'm not sure wether or not I'll do the whole ambients shining through the glass thing; it has the disadvantage that I can't do specular, which causes the glass to not look as good. In any case, before I make that decission, I'll set up a testmap on CVS.

Link to comment
Share on other sites

Ok, I've been trying out a few different ways of doing specular-based windows, and each has advantages/disadvantages... The basic idea is to have at least two textures that work together: a texture that receives normal light, acting as the frame and window, and a texture that receives a second spectrum of light, acting as the light that shines through the window.

 

Note that these experiments are for the kind of glass that the player would be nearby... I'd also make a kind of glass that's easy to place and cheap to render, but it's not covered here.

 

Method 1: Separate frame and window textures.

This method uses 3 textures all placed in the same spot. (depth-fighting isn't an issue because their brushes are the exact same size/position)

  1. A texture showing only the wood frame.
  2. A texture showing only the glass, in a normal spectrum. (so if a player shines a light at it, it shines back)
  3. A texture showing only the glass, in a special specturm. (so the mapper can control how the window is lit)

This method has a couple of advantages: the glass and frame are kept separate, allowing the mapper to easily mix-and-match glass and window frames, and the transition between frame and window has an anti-aliased appearance. The disadvantage is that the window is twice as expensive to render (with regard to fill-rate) so it would be very important to keep the number of lights hitting the window very low. (the reason I don't consider it 3-times as expensive to render is because I assume the third texture will only be hit by one light)

 

I should mention that as a convenience to mappers, I believe it would be possible to set things up so that a single material contains render passes for textures 1 and 2, allowing the mapper to only place two brushes per window, instead of 3.

 

In an attempt to decrease fill-rate usage, I tried to resize things so that the frame and window were kept somewhat separate, with overlap only at the boundary between frame and window. Unfortunately, since the brushes were merely coplanar, rather than having the exact same size/position, z-fighting occured.

 

Method 2: Combined frame and window textures.

This method uses 2 textures placed at the same spot. (depth-fighting isn't an issue because their brushes are the exact same size/position)

  1. A texture showing the wood frame and the normal-spectrum glass.
  2. A texture showing only the glass, in a special spectrum. (so the mapper can control how the window is lit)

This method has the advantage that it's not much more expensive than a normal texture, but it has a severe disadvantage: Since the normalmap for the frame and window are combined onto a single texture, they interfere with eachother in all but the first mip-map level. Thus as the player gets farther away from the window, ugly graphical glitches start showing up on the glass near the frame.

 

Method 3: Using an alphatest frame

This method is similar to Method 1, except the frame is alphatested and its brush is placed slightly in front of the glass. This allows the engine to avoid rendering the frame's lighting in places that contain only glass and vice versa; in other words, this method isn't much more expensive than a normal texture. Unfortunately the boundary between glass and frame is aliased. For thick wooden frames, the aliasing isn't noticable, but for thin wire frames it can be severe.

Link to comment
Share on other sites

  • 3 months later...

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

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 5 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...