View Full Version : transfer a shading doonee 08-23-2005, 01:19 PM hi all
well, this thread is somewhat related to the forest2city thread, but i didnt want to jam it even more with yet another issue ....
Say i have two images, A and B. (see attachment).
A is is a piece of a satellite pic, showing some shaded hillsides.
(from straight up, and from far)
B is a pic of another sat pic, a flat area, and has a much higher resolution
(like 10x better, but not closer)
Id like to assume for a second that B shows the the same area.
And id like to steal the **hillshading** from A and get it into B.
I tried to simply blend the two layers, but i wasnt too happy with that.
What other options, besides layer transparency, do i have to 'transfer' the shading-structure of A, (and anything else that can help to suggest elevation etc.) to B ?
If you think thats a lke a crazy idea and should just forget about it, im open for that as well, actually ... :)
Thanks
doonee Kraellin 08-23-2005, 01:29 PM doonee,
small pics and B is very hard to see anything in.
however, regardless of that, you can 'set' your clone tool on A and then click on B and clone directly from A to B. or, you could do cut and pastes from A to B. or, you could put A on as a layer in B and simply erase out the parts of B that you want to have the parts of A show up.
Craig goose443 08-23-2005, 01:36 PM If you just want the shading you could try a luminosity selection and then invert. You could then cut and paste the selection to the other photo. Of course there are also blend modes (overlay, darken, multiply...) doonee 08-23-2005, 03:14 PM craig :)
a more practical example in a single screenshot ....
A has been blown up to suite the resolution of B, and serves as a guide for pasting.
Top right corner is already covered wth B textures.
What is lost, however, is the hillshading of A in the overpasted area, which originally had a shading pattern very similar to the neighboring area in the upper left.
The idea:
Hopefully, the manipulated pic, beeing about 10x the size of the original will allow me to zoom in much closer in 3D visualization of that landscape, besides of opening possibilities for landscape reconstruction.
regards
d doonee 08-23-2005, 03:33 PM @goose
thanks g, ill check this out ...
:)
d Racc Iria 08-23-2005, 03:50 PM I gave this a try use the blending modes that goose mentioned.
What I did was take your last example and duplicated the layer. Desaturated it to make it grayscale and then applied a levels adjustment to brighten it up a little.
Than I brought in image B and positioned it at the top left next to your example for comparison. I changed the layer blending mode to Hard Light and made it part of a clipping mask by ALT+clicking on the line between the layers. By making it part of a clipping group, image B will only appear where pixels below it are not transparent.
I applied a layer mask to the grayscale layer and using black, painted out the rivers. Since image B is part of a clipping group, the rivers were automatically cut away there, as well.
As the result was a little dark, I applied an adjustment layer to brighten it up a bit and get it close to image B's original color. I also made the adjustment layer part of the clipping group, so it only affected the visible pixels of image B.
The results are not too bad, I think. But, here's the thing... I don't think you'll have much luck using this method to increase the overall resolution of the image. The new shading on image B is still based on the resolution of the original image, which will still deteriorate in quality when the image is resampled.
--Racc doonee 08-24-2005, 07:01 AM ok, i tried to follow what you guys were suggesting. :)
@ racc
youre right when noticing that the hi-resolution material looses a bit too much of its structure in this process, which perhaps makes trading structure for shading seem like not such a good deal ....
the objective would be to find a compromise and find out how to smuggle *some* hillshading in, taking away only a minimum of Bs resolution.
so i tried tweaking around, combining the things I know how to do with your ideas.
@goose ....
as for a luminosity selection, i didnt manage to do that.
(perhaps thats due to the portuguese keyboard here,
where the ~ char works kinda differently.)
isnt Ctrl+Alt+~ the command for luminosity selection ?
so ...
to start, i loaded the example, selected a bit of the already overpasted
area in the top left, copied it and placed it over the top right.
Ill call this B2, ok ?
(This gave me better referenece of what happens to the hi-res material
in the process.)
1
I selected the area where i intended to steal the shading.
I made a copy of that and desaturated it
I made a selection of its dark colours.
I used that selection to copy parts of B2 onto a new layer.
I darkened the new layer a bit and placed it above B2.
2
I selected the area where i intended to steal the shading.
I made a copy of that.
I tweaked the copy's colorbalance and contrast into an extreme.
I placed it under B2, which i made slightly transparent (92% op.)
The results are attached.
Maybe you guys have some ideas how i can refine these doings ...
greets
d Racc Iria 08-24-2005, 07:41 AM I'm not quite sure I follow what you did. Can you post a screen shot of your layers palette?
Also, it comes to mind that this might be a good place to use some of those DEM images. Part of the loss of the high res detail is because the different lightness values of individual trees in the canopy of the shading source image is adding unwanted noise to the higher res target image. Thus, the details are getting lost. That's in addition to the fact that the shading information is coming from a lower resolution image. The grayscale DEM images (assuming the POV is from overhead) would be a much better source for the shading information.
--Racc doonee 08-24-2005, 08:31 AM racc ... :)
screenshots of the layers are attached.
Its nothing complicated really, its only that im not doing too well yet in explaining what im doing.
As for the DEMs, im afraid that the ones which are available for this particular area do not have a resolution which helps. Generally, they fail to pick up some of the hills, which is how this all started. (Resoltuion of the the USGS DEM in this case is 1 heightsample/90m)
I found that a slight hint of a shading in the overlay, combined with that of the DEM used in the representation, gives some nice results. Although the POV
is orthographic overhead, usually all sat-overlays come with some kind of a shading of their own, and it was that i was trying to 'fake'. Racc Iria 08-24-2005, 09:19 AM I see what you did now. It's kind of similar to what I did. In the example I posted, the effect could probably be reduced by lowering the opacity of the grayscale layer, or even better... by not doing as much of a levels adjustment on the grayscale layer so it doesn't get as bright. That way much less noise would make it into B.
--Racc doonee 08-24-2005, 04:59 PM racc
i guess its going to be a question of fine tuning.
the shading definitely does take something away from the texture.
a subtle hint of shading is most likely enough, because the elevation and shading of the DEM will add addtional depth and realism (hopefully).
anyhow, here is a quick model of A draped over the DEM.
the new B overlay, having 10x the detail, will hopefully enable me to 'come a bit closer'..
You can observe how, in A, the shading 'proper' of the overlay helps the picture as a whole, and i would not want to loose that.
i also tried to make a selection of the darker tones, fill that up with some black color and creat a shadow layer with that, but i did not like that very much. im sure that it can be done better ...
:)
regards
doonee doonee 08-24-2005, 05:04 PM btw ...
any of you guys knows hwo to make a luminosity selection ?
is it the option that appaers under
>select>color range ?
if so, is it normal that i cant define 'fuzziness' for this option ?
regards
doonee goose443 08-24-2005, 05:11 PM Donnee,
You can make a luminosity selection (on a mac) with apple option ~
You can then fune tune it (fuzziness) buy making the selection into a quick mask and writing curves or playing with levels. It takes a bit of getting used to but it's more precise that the color range fuzziness slider.
It's actually a really cool, really worthwhile option. doonee 08-24-2005, 05:37 PM @goose
i googled, and found ctrl+alt+~ for PC, but that creates and error here,
maybe due to the portuguese keyboard (~ in portuguese is a 2stroke char).
could you tell me the path to get there via the menu ?
regards
d goose443 08-24-2005, 05:39 PM Doonee,
Unfortunately I think it's one of those commands that's not mapped to the menu. I'm almost positive though I could be wrong. doonee 08-24-2005, 05:43 PM ah yes, racc ...
messing with the DEM itself also comes into play in this case, because the curse of the rivers is incorrect. Either the rivers changed course, which is possible, or the pointweighting of the DEM is too unprecise to guarantee an even depression of the riverbeds.
In any case, either I have to convert the DEM into RAW, load that into Photoshop and try to create some kind of mask form the rivers in the overlay to apply that to the DEM, or the whole thing has to go through a heightfield editor (Leveller etc.) somehow (shudder).
:)
d Racc Iria 08-24-2005, 08:54 PM Doonee...
I thought the DEM rendering with the new surface draped over it looked pretty good. The rivers didn't seem that out of place, either. But, you are more familiar with them than I am. You can also get a little more shading in Terragen by changing the sun angle and position so it will cast deeper shadows. Maybe then you wouldn't need the "extra" subtle shading.
doonee said:
i googled, and found ctrl+alt+~ for PC, but that creates and error here,
maybe due to the portuguese keyboard (~ in portuguese is a 2stroke char).
Another way to get the luminosity selection without using the ~... Go to the channels palette and Control+Click on the RGB channel. You'll see some marching ants in the image. From there, just save the selection and you'll have the luminosity information stored in an alpha channel that you can then cut and paste or edit in the normal ways.
--Racc doonee 08-24-2005, 09:58 PM racc
here are some quick detail renders ...
1 the rivers ... (i exagerated height a bit, to make the point clearer)
2 when you get too close (to a 15m/pixel picture)
3 getting closer after having exchanged the texture (to a 1m/pixel picture)
Terragen is pretty lousy for straight 100% overlays, because it streches the pixels in the foreground way too much. When you try to maintain distance in order to avoid that effect, you usually run out of sky or horizon. A way to avoid that is to create several bw mask-overlays, but somehow i find that very worksome (and a bit unprecise). Another way is to plan for HUGE renders with extra foreground and then crop some of that for the final. All in all my TG expert buddys have all recommended me to stay away from trying single overlays in TG. You just loose too much detail.
rgds
d
Photoshop
btw, i think i made a mistake earlier on:
i wrote that the first render above was B (new texture) draped over then DEM, but of course it was not.
It was A (old, original texture), of course :dizzy:
I went back and edited the post to save other readers from confusion. doonee 08-24-2005, 10:01 PM Another way to get the luminosity selection without using the ~...
cool !! :))
thanks racc! Racc Iria 08-25-2005, 08:22 AM You're quite welcome.
In your examples above... #3 looked pretty good to me.
--Racc doonee 08-25-2005, 10:03 AM racc
Yes.
Ideally, light and dark material is added here and there to 'enhance' the pic.
When trying to do this for a larger region, i figured it'd be handy to know how to steal the shading from an entire area.
rgds
d Racc Iria 08-25-2005, 05:24 PM Did lowering the sun closer to the horizon help any with the shading?
--Racc doonee 08-25-2005, 06:07 PM Ah, ok, thats what youre asking ... :)
These renders are not Terragen renders, theyre done with the 3D function of 'Globalmapper', a DEM translation and interpolation tool. Sorry for not mentioning that....
I dont think that Terragen is very usefull (sadly) for this particular kind of thing (see my other comments about TG above), although of course it has dozens of other virtues (one of which is rendering sunlight and sky).
Ive been playing around with Vue for 3D shaded overlays, and a bunch of other geographical apps as well, but I guess I yet have to find the app best suited for this.
I guess you have an opinion of how you`d tackle this with Max ? ...
Globalmapper with its 'box style' represents the easy route of ignoring the foreground area where pixels would appear as 'hypertstreched', as well the 'horizon-problem' which occurs at lower angles.
No sunlight, no sky, no horizon, no foreground, but 'it works'.
Then again, with Globalmapper, although there is hillshading of DEMS, there is no shading of overlays, which makes 'shadowstealing' a very important detail. Racc Iria 08-25-2005, 06:46 PM Okay, that clears up a lot for me.
Ive been playing around with Vue for 3D shaded overlays, and a bunch of other geographical apps as well, but I guess I yet have to find the app best suited for this.
I guess you have an opinion of how you`d tackle this with Max ? ...
Not much more than what we talked about early on.
I do recall a plugin for Max called Dreamscape that would create an environment. Land, sea, atmosphere, sun based lighting, etc. I think I remember it having an option to use your own images to create the land mesh or it would randomize it. But, I'm not certain. I only got to play with a demo of it for a few days a long while ago.
Just did a Google search for a link and found this:
http://www.afterworks.com/DreamScape.asp?ID=6
As it turns out, you can edit DEM or Terragen images directly inside this thing. I may have to get this myself.
--Racc Flora 08-26-2005, 02:11 AM Hi doonee,
i googled, and found ctrl+alt+~ for PC, but that creates and error here,
maybe due to the portuguese keyboard (~ in portuguese is a 2stroke char).I have an Italian Keyboard and had a similar problem... To select luminosity directly from the Layers the combinations that work with my keyboard are:
Ctrl+Alt+1
Ctrl+Alt+2
Ctrl+Alt+3
In alternative, in the Control Panel>Regional and Language Options>Languages, I added a few languages to my keyboard settings and checked the option to show an additional language bar icon in my taskbar ... This way, whenever I open Photoshop, I change my keyboard language to English (USA) and work with that ... mind you, it took me a bit to remember where all the keys were exactly, but, now, it is automatic ... :wink: doonee 08-26-2005, 05:24 AM you can edit DEM or Terragen images directly inside this thing. I may have to get this myself.
hmm, that looks quite promissing indeed.
an ocean of options ... :dizzy:
thanks racc
-EDIT-
i couldnt find examples for single drape-style overlays in their gallery ..
did you see any ? doonee 08-26-2005, 05:34 AM @flora
To select luminosity directly from the Layers ....
Great Flora, that works here too.
(Layers appear to have to be named Layer 1, Layer 2, etc. for it to work).
In alternative, in the Control Panel>Regional and Language Options>Languages,
Yep, i know, i have done that on my laptop. :) I guess youre right, it doesnt hurt to do that on this machine (which is bought here) as well ....
(Altho sometimes all this alt+shift back and forth stuff drives me nuts...)
thank you for the great tips !!
ciao ciao
d Racc Iria 08-26-2005, 09:53 AM i couldnt find examples for single drape-style overlays in their gallery ..
did you see any ?
From what I read on the site, they have a special material type so you can have the material automatically change with slope/height. However, there's no law saying you have to use their material. You could let the plugin create the mesh for the landscape, then apply your own material to it.
If you assign UVW planer mapping coordinates to the mesh, and then use your own image in the diffuse map slot of a material, that image will be projected straight down onto the surface of the mesh.
--Racc doonee 08-26-2005, 10:25 AM racc
yep, sure :)
what i tried to say was that the use of a single sat-image draped over the entire terrain isnt really the scope of apps like max, vue & Co. There, users go about texturing the terrain in more detailed ways, using max-UVW, distribution maps, vue-ecosystems etc. etc.
Using a single bmp fto texture the whole thing doesnt make use of all these features and gives very varying results, because thats not so much what they expect their users to do.
Thats why i was left curious whether they had an example somewhere using a terrain textured by a single big image. I guess i have to try myself to find out.
rgds :)
d doonee 08-26-2005, 01:04 PM (not so very related to this shading-thread ...)
another river test, showing that these riverbeds still need some editing.
rgds
d Racc Iria 08-26-2005, 01:15 PM what i tried to say was that the use of a single sat-image draped over the entire terrain isnt really the scope of apps like max, vue & Co. There, users go about texturing the terrain in more detailed ways, using max-UVW, distribution maps, vue-ecosystems etc. etc.
Using a single bmp fto texture the whole thing doesnt make use of all these features and gives very varying results, because thats not so much what they expect their users to do.
Thats why i was left curious whether they had an example somewhere using a terrain textured by a single big image. I guess i have to try myself to find out.
That's all true, but I don't see anything that would prevent you from doing what you want to do. Which is, if I understand correctly, to generate the landscape mesh from a grayscale DEM image and then cover the surface of that mesh with your own textures made from edited satellite imagery. Max is perfectly suited to do that. It's Max 101.
The Dreamscape people wouldn't have examples of this in their gallery because they want to show what their plugin can do so they can sell it.
--Racc doonee 09-01-2005, 10:30 PM yup all agreed
i was just curious to see an example.
ive played around a bit with a demo of VUE, and it looks pretty good.
thnks :)
d leuallen 09-02-2005, 12:59 AM Doonee, not sure what you are after but I tried this:
Copied B (green texture) into A (dark flat) on a new layer, just drug layer over.
With B above A, and B selected used Blend if in Blending Options - just double click the layer.
Messed with Blend if, first using green channel, then gray. On Green brought underlaying layer shadow up to 169, keeping left shadow marker at zero. You can split the marker by holding ctrl-alt and pick the right marker and move. This makes the blending gradual.
Still on top layer used Curves to lower contrast of the green texture and then to green channel to mess with the color of green I wanted. You may also try Hue/Saturation to desaturate the greens if you think they are too prominent.
Then to bottom layer, dark flat. Messed with contrast and brought its green up a little. Like salt and pepper - to taste.
Then tried Blend if again to fine tune and change things a bit.
So I suggest that if your other program options don't work out, that you spend some time with Blend if. If you don't understand it, there are some tutorials on RetouchPro that will get you started. Play with it some and you will get the hang of it.
Points to consider:
The lighting should be as similar as you can get for the two images, not intensity, but direction and hardness.
Texture layer above the base layer. This way you can work on them seperately without masking, cloning, etc. You can apply adjustment layers to each of the layers, place them in separate sets so that they only effect the one layer. Then you can go back if you change your mind and readjust, turn effects on and off to check progress and so on. This is probably critical as you will probably have much trial and error to get your effect.
You are trying to match things so it looks realistic. You have to consider:
Contrast of one to the other. Match using adj layer - curves, levels, what ever works.
Color. Again adj layer and what ever method works for you to change color.
Saturation. Does one of the layers seem "brighter" or more saturated than the other. Chang one layer or the others saturation may help bring the image in to more realistic balance.
The image I have attached is probably not what you want but I bet that somewhere in my process that image could or was achieved. The left image is the final image with the texture layer smaller than the base layer. I outlined the texture layer because the effect is subtle and you might miss it. The effect could be made much more pronounced - greener, brigher, etc. DaveS 09-02-2005, 09:21 AM Hi Doonee,
not sure if this is what you are after, In Photoshop CS under Image>Adjust>Match Colour you just define the source picture that you want to copy the colour of and that's how I got the sample posted. Hope that helps.
Dave doonee 09-02-2005, 07:34 PM guys ...
thnks 4 all your ideas ...
im a bit distracted by a virus attack ... :dizzy:
ill be back when its done ...
greets
d doonee 09-02-2005, 07:43 PM @leu
not sure what you are after
@dave
not sure if this is what you are after
ok ...
theres two areas in the picture:
A the one to the top left has 'more shading, as does the rest of the pic.
B the one to the top right has 'better texture'
id like to get the shading pattern from A onto B.
ill use the picture as an overlay over a landscape in a 3d app and id prefer a pic with 'better texture' which inherited 'native shading' ...
im off to face the trojans
cheers
d Klaatu Baradda 09-04-2005, 04:01 PM To select luminosity directly from the Layers the combinations that work with my keyboard are:
Ctrl+Alt+1
Ctrl+Alt+2
Ctrl+Alt+3Yes, these select the luminosity of the individual color channels (RGB). Number 1 is "RED", 2 is "GREEN" and 3 is "BLUE". The RGB channel is (as has been previously mentioned) cmd/cntrl+opt/alt+~ (tilde). Too bad these can't be reassigned new keypresses in the Keyboard Shortcut settings. It would be nice to be able to change them, although... you could, alternatively, create and Action that uses an FKey to load them.
To select the luminosity of ANY channel (including the RGB, LAB or CMYK channels) from the Channels Palette simply cmd/cntrl+click on the individual channel's thumbnail icon.
If you want to load the luminosity of the entire image as a selection, just go to the Channels Palette and cmd/cntrl+click the RGB image thumbnail. | |