Going from bitmap A to B (recovering transformation)

PW
Posted By
Patrick_Waugh
Dec 24, 2006
Views
535
Replies
25
Status
Closed
I am trying to replicate the simulation of night textures in order to match them.

Basically, an object has two textures, one day, and one night. For example:

Day Texture <http://photobucket.com/>

NIGHT <http://photobucket.com/>

Now, what I want to do is be able to get to the night version if given the day version.

I have found that if I invert the difference between them I get this:

~|D-N| <http://photobucket.com/>

Which if I layer over the Day texture with linear burn, gives me the night texture.

But how can I make this texture given only the Day? I thought perhaps maybe I could take the inverse of the Day and desaturate it to get the luminous info, and then layer over that with a color, but have not been able to find just the right color.

Other ideas?

Patrick

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

B
Bernie
Dec 24, 2006
Not sure what you mean by texture, both objects seem to have the same one, only the colour balance and density seem to be different (mind you I could not get to the images, I’m being asked for a password.

Based on the thumbnails, a curves adjustment layer brought me quite close.
PW
Patrick_Waugh
Dec 24, 2006
"Texture" is a game program term for the bitmap, as they are used to "texture" polys in the game engine.

To grab the bitmaps, I would suggest just right clicking and copying them to your desktop, as what you see is the full size.

I’m not looking for close, but exact, using blending options. It should be possible to use the existing images to "calculate" the needed images, but I thought maybe others had more experience with blending modes than I and might have ideas on how to do this.

Patrick
B
Bernie
Dec 24, 2006
"Texture" is a game program term fpr the bitmap, as they are used to "texture" polys in the game engine.

I know of the use of texture in that context, since there was not a single reference to 3D rendering in your post, that was a bit hard to deduce.

To grab the bitmaps, I would suggest just right clicking and copying them to your desktop, as what you see is the full size.

As I said, the links ask me for a username and password, so I used the thumbnails.

I’m not looking for close, but exact

If you want numerically exact, I’m afraid the best thing to do is to talk to whoever created the Night image in the first place.

< http://www.pixentral.com/show.php?picture=18csARsO7BHRAxeJDR g24fyTMWC2Tp0>
PW
Patrick_Waugh
Dec 25, 2006
Why is it that these boards always have a pompas know-it-all that knows nothing, but insists on trying to answer questions they don’t even understand?

Clearly, as your reified subjectivity (you’ll need to look this up) will tell you, this question is beneath you, so don’t bother trying to answer any of my questions, thanks.

If someone out there does understand the question, then feel free to throw your .02 cents in the ring.
B
Bernie
Dec 25, 2006
Hey,

Sorry for not divining your needs based on incomplete information.

I was trying to be helpful (and a search of my name on this forum will show that I often am) but I guess I’l put you on my list of people not to bother with.

Merry X-mas.
S
Stroker
Dec 25, 2006
:sigh:
I gave the solution to this quandry and it was pushed aside. Remind me again why I hide under a rock and don’t bother with nubs…?

Put both images in the same document, one over the other and lined up real nice. On the top layer, Invert and reduce Opacity down to 50%. Use your favorite method to copy merge and paste. Change the one layer back to Normal @ 100% and Invert it again.

There. You can now use the copy/merged layer, Linear Light, and Invert to convert Day into Night and Night into Day.

I’m outtie.
PW
Patrick_Waugh
Dec 25, 2006
Stoker,

"I gave the solution to this quandry and it was pushed aside."

You didn’t post a solution to the problem I posed, but rather someone else’s solution to a different problem entirely.

This is not about changing one pic from one to the other, but about using the night and day to derive what transformation was used to transform the day to night. That way, any pic can be transformed to "night", matching the original.

This problem is for someone that really understands blend modes at the bit level, not for someone that has read a few tutorials and thinks they are an expert.

"Remind me again why I hide under a rock and don’t bother with nubs…?"

If you hide under a rock, that is your own affair. Perhaps such ad hominem attacks as calling others noobs helps you to avoid a realization that you are a mere noob compared to those of us that have published software and artwork.

Any professional artist, who has a deep understanding of blend modes and has a suggestion, rather than useless self-agrandizement, feel free to post.
DM
dave_milbut
Dec 25, 2006
what an ———!
S
Stroker
Dec 25, 2006
The percent error in that image is about 7% from the two original photographs. That percent error is from B/M balance that I did’t want to bother with.

The solution is indeed in what I already posted. Maybe you’ll get lucky and somebody will finish spoon feeding you. But I will give you one last big hint: look at the lighting information.
JJ
John Joslin
Dec 25, 2006
What a charming person Mr Waaaaaaugh is!

He certainly needs help. 🙁
PW
Patrick_Waugh
Dec 25, 2006
You "solution" requires that you have both the Day (A) and Night (B) pictures, and does nothing to solve the problem of "recovering" the transformation required to get ANY day texture to night.

Once again, you have failed to understand the problem.

If I give you a different day texture, and want you to make it night, and did not give you a night version of it, but want you to make it match the same transformation made to create the night texture for the other one, you method can no do this.

So, I don’t need hints from you, as you once again proved that you don’t even understand the problem.

So, if you can’t do it, no point in trying to fool yourself, or us. Perhaps others here are impressed by you, but we are not. If you want to impress us with knowledge, then demonstrate a solution.

Anyway, I have a working solution that is good enough.
GD
glen_deman
Dec 25, 2006
Your Photoshop skills have clearly surpassed those of this forum; I don’t think anyone can help you here any more (we’re mostly a bunch of hacks who’ve read through a couple of online tutorials). You’re better off asking questions somewhere else.
S
Stroker
Dec 25, 2006
Well, I did post a random photograph that I turned into night with a little bit of a layer mask. Maybe I can do it, maybe I can’t. After all, the percent error is around 7%, which is unacceptable for exacting standards.

Well, shit.

And baby Kai wept.

Speaking of Kai, he’s got some of the best tutorials out there. As old as they are, they are chuck full of awesome. But it’s not his techniques that make them awesome, but the idea(s) of exploring, tearing apart, understanding, and putting back together. He is Uber.

Let’s borrow from Kai and break this down into some easy to manage pieces. I’ll get you started.

In Photoshop, but the day version over the night version in the same document. Something like this:

– Day
– Night

Now, change the blending mode of Day to Difference. Pretty easy so far, right?

On top of all that, start an Ad-Layer > Channel Mixer. Make sure Monochrome is checked. Use these settings: R=200%, G=0%, B=0%. We now have something like this:

– Channel Mixer
– Day
– Night

Still with me? I hope so, because things are about to get complicated.

Create an Ad-Layer > Curves. Now use the alt + click trick to clip it to the Day layer. This is so the Curves Ad-Layer will affect *only* the Day layer – very important!

We now have:

– Channel Mixer
— Curves
– Day
– Night

Once you have your Curves in place, time to tweak to bring the differences down to nothing.

In the Curves dialog, use the drop-down to go to just the R channel. Create some anchors and move them around until the composite shows only black. It will take some trial-n-error, but you can do it!

Once you have only black – you can do it! – go back to Channel Mixer and use: R=0%, G=200%, and B=0%. Go to the G channel in Curves and mess around until you have pure black again.

Repeat for B.

Once you have all black for all three channels, you can then recycle the Curves Ad-Layer to turn any photograph into its Night version! OGNOS!

There is a pattern to this to make it even easier. I already posted this particular short-cut. But apparently it wasn’t newbified enough. Oh, well. Hopefully this post has been newbed-down enough to get you there.

I have learned well from Jedi Master Kai.

Merry Christmas…

….or whatever.

I’m off to rotate some vectors.
BL
Bob Levine
Dec 25, 2006
Once again, you have failed to understand the problem.

Apparently not half as miserably as you have in explaining it.

You do seem to be an expert in trying to attract flies with vinegar, however. Good luck with that.

Bob
PW
Patrick_Waugh
Dec 25, 2006
Interesting.

This is very very similar to the solution I had already (which also is not exact, but I suspect that exact is impossible).

Noting that difference blending will give you pure RGB black if there is no difference (as you also note), I did the following:

First, I found the inverse of the difference between the Night and Day layers (~|N-D|):

-Inverse
-Night (diff mode)
-Day

which is picture 3 in the original post. This will turn Day to Night with linear burn, but only for this Day (not any other) for obvious reasons.

Then, I inverted Day (~Day) and then added a Levels adj. layer to get the levels the same.

Then with the ~|N-D| (pic 3) over it we have:

-~|N-D| (diff mode)
–Levels
-~Day

To whish, I added a Curves:

-~|N-D| (diff mode)
–Curves
–Levels
-~Day

both clipped, of course. Now with ~|N-D| in Diff Mode, I then adjusted the Curves on Master until I had as close to Black as I could get it.

Thus, I found the Curves and Levels required to create a very similar Night overlay. The insertion of the Levels made it easier for me to find the right Curves, as it limited the variables my eye had to deal with at once.

To me, this is nothig more than an interesting technical problem. In fact, we have developed symbology to put this stuff into mathmatical formulas such as:

x = D(White, ~x)

Which helps to be able to think things through on paper. The above, for example, states that Difference blending White (the Blend layer) with x (the base layer) will invert x. ~ being the inverse operator in C++.

Our hope was that it was likely the orignial art (that we wish to match) was created similar to this:

–Color Overlay
–Levels
-Base Art

and that using blending modes with some example art that in a method similar to cyptography using known cypher text, we could "decypher" the Color and Level used. However, as you have "hinted" it appears that perhaps a subtle light filter was also used.

Merry Christmas
Benchmark Avionics
PW
Patrick_Waugh
Dec 25, 2006
Should anyone have wished a deeper understanding they had but to ask, rather than attack and judge.

We tire of the many that post on these types of boards that have no clue what they are saying and don’t even take the time to read what was written.

If you don’t feel the question was clear, and it is too much trouble to ask about what you are not clear about, then by all means, don’t bother.

The question was intentionally concise, so as to be clear to those that have experience in this area, and have worked out a similar problem.

If you had never faced this issue of matching art work, then no doubt it would be cyptic. We neither wanted to waste the time of those that understand the problem, nor our time reading suggestions from those that really have no clue.

We look at it like sifting through resumes to fill positions. We only want to talk to those that actually have a chance of getting the job.
T
Talker
Dec 25, 2006
On Mon, 25 Dec 2006 06:19:14 -0800,
wrote:

Should anyone have wished a deeper understanding they had but to ask, rather than attack and judge.
We tire of the many that post on these types of boards that have no clue what they are saying and don’t even take the time to read what was written.

If you don’t feel the question was clear, and it is too much trouble to ask about what you are not clear about, then by all means, don’t bother.

The question was intentionally concise, so as to be clear to those that have experience in this area, and have worked out a similar problem.

If you had never faced this issue of matching art work, then no doubt it would be cyptic. We neither wanted to waste the time of those that understand the problem, nor our time reading suggestions from those that really have no clue.

We look at it like sifting through resumes to fill positions. We only want to talk to those that actually have a chance of getting the job.

Mr. Waugh…..I am new to this group and have found it to be very informative. I also feel that the "volunteers" here give up their time to help out those that need it. You come in here and ask a very technical question, one that is probably beyond the skill level of a lot of those who volunteer their time. If someone answers your question because they thought they understood what you were asking, but they were on the wrong track, a simple polite reply would have been all that was needed.
To insult the people here with your rude comments was totally unnecessary. To call someone pompass and a know-it-all is a sign of your character, which must not be much. To be honest, you sound like a boss…someone who expects people to do their bidding, and treats those people with little or no respect. You didn’t even say "Thank You" to Stroker for his step by step reply.
Your comment: "We tire of the many that post on these types of boards that have no clue what they are saying and don’t even take the time to read what was written." I guess you’ve never tried to answer a question or offer help to someone when you have some knowledge of the subject, but not a complete indepth, encyclopedic understanding of it, have you?
If you’re married, I feel sorry for your wife, because if she doesn’t make your coffee just right, I guess you’d throw it in her face and call her names, telling her that if she didn’t know how to make coffee the exact way you wanted it, why did she bother to try?

Talker
Merry Christmas and Happy New Year to everyone!
G
grannysplayhouse
Dec 25, 2006
"We look at it like sifting through resumes to fill positions. We only want to talk to those that actually have a chance of getting the job."

Granny looks at it like outsourcing by sifting through the forums looking for FREE consultations and solutions to your problems from the experts in the field.
PW
Patrick_Waugh
Dec 25, 2006
"Granny looks at it like outsourcing by sifting through the forums looking for FREE consultations and solutions to your problems from the experts in the field."

Yeap, we’ll as I have pointed out, we already have a solution, and were inviting others to share it and their ideas. Feel free not to participate. =)
JJ
John Joslin
Dec 25, 2006
This is another one that posts in the First Person Regal.
JR
John_R_Nielsen
Dec 26, 2006
It’s ‘Pompous’, not ‘Pompas’, Patrick.

You, of all people, should know that.

Do you have a friend named "Tomo"?
BP
Bert Philippus
Dec 26, 2006
Bertin’ A he does!

[{Patrick}, don’t bother to ask about either <Tommo> or <Bertin’>, they are beyond the ({scope}) of the uninitiated]
B
BranderChatfield
Dec 26, 2006
Well, I think that you need to have two different photos.
JL
John_Levine_IOPHFI_INH!__-)
Dec 26, 2006
Anyway, I have a working solution that is good enough.

Um… I thought you didn’t want "close," but exact?

( I know the solution, but I’m not telling an ingrate…)

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

Related Discussion Topics

Nice and short text about related topics in discussion sections