Sun, Sep 15, 11:54 AM CDT

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Sep 15 7:04 am)



Subject: Masking into the Dissplacement Node?


Angelouscuitry ( ) posted Thu, 05 April 2007 at 4:25 PM · edited Sun, 15 September 2024 at 11:52 AM

Does anyone know how to stop a Grey Scale Value, in a Dissplacement Map, from effecting the Dissplacement node?


Angelouscuitry ( ) posted Thu, 05 April 2007 at 4:26 PM

file_373988.jpg

Greyscale Maps are really interesting. 

I like how, for a Transparency Maps; Black translates to %100 transparency(multiplied by the Transparency node Value,) White means %50(ditto...) and White means %0(etc...)


Angelouscuitry ( ) posted Thu, 05 April 2007 at 4:27 PM · edited Thu, 05 April 2007 at 4:29 PM

file_373990.jpg

And for Dissplacement Maps, translating Brightness' Differences'; between Black and White, into Terrain Elevation and Depression, works for me. Black equals a level of Depression(to be multiplied by the Dissplacement node Value.) Grey means go neither Up nor Down, allthough is still effected by the Dissplacement node Value...And White means Elevation(multiplied by the Dissplacement node Value.)


Angelouscuitry ( ) posted Thu, 05 April 2007 at 4:30 PM

file_373991.jpg

Sometimes though; I do'nt appreciate the Grey rule, and would like to remove that from the map(equation.)


Angelouscuitry ( ) posted Thu, 05 April 2007 at 4:30 PM

file_373992.jpg

You can see the YTrans change, difference; between screenshots 2, 3, and 4.  But the YTans Parameter, for this Cloth Plane, has been unedited.  What's made the plane jump, is the Dissplacemnt node Value getting Charge by all that Grey Value in the Dissplacemnt Map. As seen positively in Screenshot3, and Negatively by Screenshot 4(VS. the unrendered position of screenshot 2.)


Angelouscuitry ( ) posted Thu, 05 April 2007 at 4:31 PM

file_373993.jpg

In the past, the Blender node has functioned as such a Mask(/Filter.)  In this example the overlap of Input_2 over Input_1, is restricted by the Transparency Map, to create White(Input_2's Color) clothing over this figure's skin.


Angelouscuitry ( ) posted Thu, 05 April 2007 at 4:32 PM

file_373994.jpg


Angelouscuitry ( ) posted Thu, 05 April 2007 at 4:33 PM

file_373995.jpg

The closest of my attempts to reapply this, for Dissplacement, have failed similarly; but I ca'nt explain their shortcoming, nor similarity?


bagginsbill ( ) posted Thu, 05 April 2007 at 4:52 PM

How funny - I just explained this a few days ago.

It is a common misconception that "gray" or numerically .5 means no displacement. In fact it means .5 * the displacement number in the root node.

Black, or 0, means 0 * that value or 0 i.e. no displacement.

White, or 1, means 1 * that value i.e. exactly as specified in the number.

You want to shift everything so that greater than gray (i.e. greater than .5) is positive and darker than gray (i.e. less than .5) is negative. Can you guess how now?

The answer is this: Subtract .5 from your displacement map. In Matmatic you would say:

surface.Displacement = amount_you_want_maximum_up_or_down * 2 * (imagemap - .5)


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Thu, 05 April 2007 at 4:53 PM

Forgot to add that clearly if the imagemap is .5, then imagemap - .5 is zero, so the displacement would be zero.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Thu, 05 April 2007 at 4:57 PM

Just FYI, in your shader above (posted at 4:32) the blend value multiplier is 0, which means that the blend value is always 0, which means that the Blend node was always using 100% of Value_1. In other words, it did nothing at all to change the imagemap.

In your next shader (posted at 4:33) Value_1 and Value_2 were both pointing to the image map. Which means no matter which one the blend value chose, the result was the same as the original image map.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


Angelouscuitry ( ) posted Thu, 05 April 2007 at 5:02 PM

Hmm..in Matmatic, you say?  It's reassuring to hear you mention it's added perpective!

For Poser, are you saying subtract from Dissplacemnt Node Value, or per Map Pixel?


Angelouscuitry ( ) posted Thu, 05 April 2007 at 5:12 PM

file_373998.jpg

*"Just FYI"

*Oh, I should have posted the one I thought would have work, too.  This is what I ca'nt understand not having worked at all, at my best attempt.


bagginsbill ( ) posted Thu, 05 April 2007 at 5:59 PM

Just use a subtract node - subtract .5 from the image map


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Thu, 05 April 2007 at 6:02 PM

In your last example, Value_2 is 1 (WHITE). Your blender is using the image map where the mask is black, and using 1 where the mask is white - you might as well use the mask.

Forget the blender.

Connect a math node, subtract, Value_1 = DisplacementImageMap, Value_2 = .5


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


Angelouscuitry ( ) posted Thu, 05 April 2007 at 7:03 PM · edited Thu, 05 April 2007 at 7:04 PM

file_374013.jpg

Wow, thanks Bagginsbill!  I would never have guessed this intuitively.

I would have thought that subtracting .5, from the Map's White Value, would criple the Maps White bump(upward dissplacement.)  And then that the White(1) area would be considered Grey(1 - .5), thus making the white area of the map behave as if it were grey. 


bagginsbill ( ) posted Thu, 05 April 2007 at 9:10 PM

Imaging this:

I put you in a room and tell you to stack some tiles up, covering the whole floor. Now I tell you to stack another layer, but leave one tile out of the middle. What does that one tile look like? It looks like a depression because all the other tiles are even and that one is low.

But in reality, it is not a depression because you put a tile in that spot, so it is higher than the floor. It's just that all around it the floor is covered with two tiles so the spot that only has one tile stands out as being "depressed", even though it has been raised.

Suppose I pick one more spot and tell you to place one more tile. So in that spot there are 3 tiles - the top is 3 tiles above the original floor. It looks raised, but only by 1 tile, even though it has been raised up 3 tiles.

Now I magically lower the entire floor, tiles and all by exactly 2 tile thicknesses.

The spot that had only one tile on it is now one tile thickness below the original floor level. The spot that had 3 tiles on it is now one tile thickness above the original floor level. And all the rest of the tiles, those stacked to a depth of 2, the tops of those are exactly where the floor used to be.

Does that make more sense?

So what I'm saying is, where you have gray, that actually means stack this up .5 times the displacement depth. Black, being a zero, means don't stack that up at all. And white, being a one, means stack that up to the full depth. When you subtracted .5 from that, you "lowered the floor" by .5 - thus anywhere there is gray is now at the original level. Anywhere there was black, well that didn't get raised, so the net is that it got lowered by .5 of the displacement depth. And the white area was raised a full displacement, but lowered by half.

So, adding or subtracting does indeed change the overall height of the pattern or surface, but it doesn't change the relationships of the elements of the pattern to each other.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


Angelouscuitry ( ) posted Thu, 05 April 2007 at 10:06 PM

This is really awsome baggnsbill!  You're helping me out quite a bit, and I'm sure there are others that will benefit from this.  Bump and Dissplacement Maps seem to be very primitive Poser lessons; but without a finger on Gray Value, VS. Displacement Node Value, this is very confusing.

*"..., but it doesn't change the relationships of the elements of the pattern to each other."

*Agreed, but with Black(0) as a negative shift(downward,) when we subtracted .5 from all of the Gray(.5;) should'nt we have gotten another big(negative) YTrans Shift(of seemingly the majority of the cloth plane;) as I was mentioning in reference to my screenshot, from Thu, Apr 5, 2007 4:30 pm?


bagginsbill ( ) posted Fri, 06 April 2007 at 7:34 AM

*when we subtracted .5 from all of the Gray(.5;) should'nt we have gotten another big(negative) YTrans Shift

*No because Gray(.5) - .5 is 0. Zero means no shift. Remember the entire displacement is shifted by the minus .5, not just the gray or black or white or any other shade. The whole thing moves.

A picture is worth 1000 words, right? 3000 words coming up.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Fri, 06 April 2007 at 7:36 AM

file_374036.jpg

Here is a simple black-gray-white image map applied to a one-sided square. There are three other squares as well. All four are perfectly lined up. There are two in the middle - one that is the image map, and one that is semi-transparent and unshifted. Thus you can see where the central square is supposed to be based on the idea that gray (.5) is desired to be no shift.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Fri, 06 April 2007 at 7:36 AM

file_374037.jpg

Here is the same setup, but now the image map is shifted back .5. This brings the gray areas in line with the other squares.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Fri, 06 April 2007 at 7:37 AM

file_374038.jpg

And finally, by reducing the displacement amount, I show that the black and white can be adjusted with a single number, but the gray area doesn't care because it is effectively 0. 0 times anything is 0.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


anxcon ( ) posted Fri, 06 April 2007 at 9:38 PM

didn't see this part above

as said, put a math node, and value1 plug in the map, but enter value 2.0 for it, and value2 put 1.0, and set subtract, this will make your map range -1.0 to +1.0, rather than -0.5 to +0.5, just making it easier in some cases to set strength of displacement, such as a 2nd map that you might add ranging just 0.0 to 1.0

it will give your map the range of having -1 (black) lowest depression
to 0 (grey) being unchanged , to 1 (white) highest bump


Angelouscuitry ( ) posted Sun, 07 October 2007 at 12:08 PM · edited Sun, 07 October 2007 at 12:09 PM

file_390057.jpg

Thanks anxcon!

I've used you suggestion, over an over again!

As I do have this URL archived, and just recently revisited, it's about time I posted a quick picture of how I use the Math Function.  Attached are the Values_1 and Value_2 values I find work best.

Thanks again guys!

🆒


Faery_Light ( ) posted Sun, 07 October 2007 at 10:43 PM

Bookmarking. :)


Let me introduce you to my multiple personalities. :)
     BluEcho...Faery_Light...Faery_Souls.


Angelouscuitry ( ) posted Wed, 27 February 2008 at 10:38 PM · edited Wed, 27 February 2008 at 10:42 PM

file_400888.jpg

I've been meaning to update this thread, with a full screenshot of my working model, for a long time!  As I often forget, and return here to remember how the Math_Function goes; because I really do'nt understand how it does work, still?

The goal has been to keep the Y-Transition, of the Plane(grayness,) constant; between the Preview and Render Windows.  Without the Math_Function, set properly, this just does'nt happen.  So we have achieved my goal; thank you all for this!

We've actually achieved my goal twice over.  The Math_Function node can be set to 1, .5; or 2, and 1.  In either case the plane stays put; but at 2, and 1 the Displacement Value causes more of a displacement?  In other words the White area of a map sticks up more, and the Black area down farther?

Lets review the Variables; and hopefully get a working Vocabulary?

There is the Displacement Value, which stops all displacement(black, white, and gray) if set to zero?  The Displacement Value could also be positive, or negative; in which case we get opposite displacement.

Then we have our Displacement Map values; White, Grey, and Black.  I think of Black as  -1, Gray as 0, and White as +1; which, somehow get Multiplied by the Displacement Value?   I use Multiplied loosely, because I ca'nt think of what does'nt happen when a negative Displacement Value is entered, and then multiplied by a Negative Black (my -1 hypothesis) which would thus yielding a positive Displacement?

Now enter the Math_Function's Value_1, and Value_2.  Why are there two values at work here, and/or what is their major contrast?  Does Value_1 just always need to be double what Value_2 is?

Am I missing anything terms?

One other thing I do'nt understand is the visual display, of the Math_Function Node; why is it that the White appears unchanged, while the Gray is no Black, and the Black is...well are we missing something there?


bagginsbill ( ) posted Wed, 27 February 2008 at 11:36 PM · edited Wed, 27 February 2008 at 11:39 PM

Quote - I think of Black as  -1, Gray as 0, and White as +1; which, somehow get Multiplied by the Displacement Value?

There's the mistake. Don't think of it that way because it isn't that way.

The number that is BLACK is 0, not -1. The number that is gray is .5. The number that is WHITE is 1.

Letting M be the displacement map value, the math node using 2 and 1 calculates 2 * M - 1

For BLACK, M = 0, so 2 * 0 - 1 gives -1 (maximum depression)
For GRAY, M = .5, so 2 * .5 - 1 gives 0 (no change)
For WHITE, M = 1, so 2 * 1 - 1 gives 1 (maximum elevation)

However, the math node using 1 and .5 calculates M - .5

For BLACK, M = 0, so 0 - .5 gives -.5 (maximum depression)
For GRAY, M = .5 so .5 - .5 gives 0 (no change)
For WHITE, M = 1 so 1 - .5 gives .5 (maximum depression)

By using the 2M-1 version, you get a full range of -1 to 1
By using the M-.5 version, you get a half range of -.5 to .5

Whatever range you set up, that gets multiplied by the "Displacement Value" as you've called it.

It all depends on what you want your unit to be about. If you're thinking in terms of deviation (highest peak or lowest valley) then 2M-1 is better. If you're thinking in terms of total distance from peak to valley, then M-.5 is better.

And yes, the general rule to map GRAY to a 0 (no change) is that the Value_1 has to be twice that of Value_2. Any numbers work, its just that you're scaling the result.

Consider the more general formula:  2 * X * M - X

When M = .5 (GRAY) then that is 2 * X * .5 - X, which is X - X, which is 0.

So for any number X, the general formula guarantees that 2 * X * GRAY - X is precisely 0. The actual maximum deviation is just X. If you want a maximum deviation of 7 (up or down) then you'd use 14 * M - 7. If you want a maximum deviation of 26.33 you'd use Value_1 = 52.66 and Value_2 = 26.33.

And the reason you can't preview the results for the depression is simple. The color of 1 is WHITE. The color of 0 is BLACK. What is the color of -1? It is a negative color!!!! We can't see negative colors. But it's there, believe me.

Want to prove it? Connect the output of your subtract node to a new math node, with the function set to Abs (for absolute value). Voila, your -1 becomes 1 and you will see the word BLACK written in WHITE. Hahaha.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


Angelouscuitry ( ) posted Thu, 28 February 2008 at 11:00 PM · edited Thu, 28 February 2008 at 11:09 PM

Thank you again bagginsbill; I could not have expected a better answer!  These calculations are exactly what it is I need to understand!  And I'm very grateful you took the time to lay this out, for me, so well!

This is why I'm an artist, Mmn..literally!  In my mind mathematics ans science are a must; but in my eyes, there is a cry for translation.  I'd very much like to view and understand this with much more fluff; so the next person will have an easier time grasping the concept as well!  This is the kind of thing I'd like to print out and just oogle at, on my while, because it just looks so complicated; so when I do'nt get it I can just be happy I'm not going to get tested on it!

"It is a negative color!!!!"*

That is what I thought.

Why is it that values of 2(for Value_1,) and 1(for Value_2) cause more of a dissplacement than values of 1, and .5(if you hav'nt already answered that a couple times over?)
 

 

 

Seriously, 1000 thanks!


bagginsbill ( ) posted Fri, 29 February 2008 at 11:00 AM · edited Fri, 29 February 2008 at 11:02 AM

Quote - Why is it that values of 2(for Value_1,) and 1(for Value_2) cause more of a dissplacement than values of 1, and .5

That's pretty simple. Let:

M mean the value of the displacement map image  - we know that 0 <= M <= 1.
A mean a Math:Subtract with Value_1=1 and Value_2 = .5. So A(M) = M - .5
B mean a Math:Subtract with Value_1=2 and Value_2 = 1. So B(M) = 2M - 1

Now you asked why does B cause more displacement than A?

So - this is quite simple.

B(M) = 2M - 1 # by definition

divide both sides by 2

B(M)/2 = M - .5

since we defined A(M) = M - .5, we can substitute

B(M)/2 = A(M)

now multiply by 2

B(M) = 2 A(M)

So - we conclude that B(M) is always twice A(M).

As a little check, we examine the boundary cases where M = 0 and M = 1.

B(0) = -1, B(1) = 1
A(0) = -.5, A(1) = .5

Looks right.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


Angelouscuitry ( ) posted Fri, 29 February 2008 at 1:31 PM

:mellow:...


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.