Fri, Dec 13, 9:16 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Dec 13 7:48 am)



Subject: Displacement Question


Shadow_Fyre ( ) posted Wed, 04 February 2009 at 9:55 AM · edited Wed, 11 December 2024 at 2:24 AM

file_423439.jpg

I am revisiting a Poser shader that I have that makes displacements by using a mask. You can see in the first picture that the displacement works fine but I was wondering if there was anyway to extend the displacement image down the sides of the displacement itself. I have tried different image map masks, either contracting the mask or expanding it over the image but it always looks the same with the skin going up the side of the displacement.


Shadow_Fyre ( ) posted Wed, 04 February 2009 at 9:56 AM

file_423440.jpg

Here is a picture of the node settings.


ockham ( ) posted Wed, 04 February 2009 at 10:28 AM

What happens when you change the Filtering to None?   Might give
less blurring around the edges?

My python page
My ShareCG freebies


Miss Nancy ( ) posted Wed, 04 February 2009 at 11:15 AM

just to agree with ock:

  • if the anti-aliased displacement mask is the inverse of the anti-aliased displ map, then there would be a blurred displ. edge.
  • texture filtering would also do it.

this problem doesn't arise with the usual use of this technique in tattoos, e.g.



Teyon ( ) posted Wed, 04 February 2009 at 11:29 AM

Or...you could extend the edges of whatever color map you're using for the designs to include a slightly larger area, causing the effect to not look like the items are protruding out of the skin.

....and then do everything else suggested to make it look crisp.


Shadow_Fyre ( ) posted Wed, 04 February 2009 at 11:37 AM

Taking texture filtering off did not make a difference. I tried it on all the maps. This is true that it does not do this with tattoos, so I assume it's because the texture below is being stretched up with the displacement. I have tried extending the color map to go beyond the mask edges and the other way around, inside the mask edges and either way "skin" is stretched up alongside the displacement.


Anthanasius ( ) posted Wed, 04 February 2009 at 11:57 AM

***If i understand you dont want the "blur" at the base of the displacement ...

Youre displacement picture need to be a little small like the diffuse picture ...***

Génération mobiles Le Forum / Le Site

 


Shadow_Fyre ( ) posted Wed, 04 February 2009 at 12:40 PM

I don't know if I would call it a blur, but what I would like, if possible, is not for the "skin" to stretch up along the displacement, but for the image on the displacement to stretch down alongside it. I know I could do this if I made a new diffuse map with the displacement image directly on that, but I am wanting to do this with textures already out there, plus I never made a body texture and I'm not sure I even could. 😊 I was hoping someone would know how to accomplish this with maybe a new combination of nodes.


santicor ( ) posted Wed, 04 February 2009 at 1:18 PM

Why do you need to do this with a mask method.

Also - Is this the only displacement you want to do on the "head" Poser surface?




______________________

"When you have to shoot ...

SHOOT.

Don't talk "

 

   - Tuco

 

Santicor's Gallery:

 http://www.renderosity.com/homepage.php?page=3&userid=580115

 


dorkmcgork ( ) posted Wed, 04 February 2009 at 2:32 PM

you should be able to make the gems stretch down to the skin by increasing their size on the image map while leaving the displacement map alone.  just scale each gem a few pixels that'll do it.

go that way really fast.
if something gets in your way
turn


Shadow_Fyre ( ) posted Wed, 04 February 2009 at 2:57 PM

Quote - Why do you need to do this with a mask method.

Also - Is this the only displacement you want to do on the "head" Poser surface?

The mask method enables me to use any skin texture I want without having to make a new one. I am using skin as an example, but this can be used on anything. > Quote - you should be able to make the gems stretch down to the skin by increasing their size on the image map while leaving the displacement map alone.  just scale each gem a few pixels that'll do it.

In theory that would seem to work. I tried it, it doesn't. It does work however if you were to make a new texture combined with the displacement image , which I am trying to avoid.


bagginsbill ( ) posted Wed, 04 February 2009 at 3:06 PM

The displacement starts becoming visible very close to 0, even .05 in the Overlay_Mask will make a noticeable rise here. But the color blend doesn't completely take over until the Overlay_Mask is considerably more than .5, 10 times that. Until then, there is a lot of skin color in the blend.

Think of the mask as a number from 0 (BLACK) to 1 (WHITE). That's what it actually is. The gradual rise in displacement means there are numbers between those. But you want the overlay color to take over almost immediately.

The solution is simple. Increasing the Blender_Diffuse_Color.Blending value from 1 to 100 or even higher. The faster that rises, the less skin will carry over into the masked area.

You don't have to worry about this number getting way higher than 1, because it is Clamped automatically at 1 (and 0 as well, no negative numbers leak through the blender).

So the modified numbers will look like this:

Displacement = .001, Color_Blend = .1

Displacement = .003, Color_Blend = .3

Displacement = .01, Color_Blend = 1

Displacement = .05, Color_Blend = 1

See?

 


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 Wed, 04 February 2009 at 3:20 PM

file_423465.jpg

In fact, depending on the contour, that may be too much.

Here's a little demo. I grabbed a lip mask I have from the Antonia project and tossed it onto a couple one-sided squares.

The lower one is using the shader shown. The 100x factor makes the visible color transition very sharp, but also makes it start a little bit early, when the displacement still hasn't kicked in.

Next I'll show you how you might adjust that.


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 Wed, 04 February 2009 at 3:22 PM

file_423466.jpg

I inserted a subtract node, and I offset the value in the mask by decreasing it a constant amount. In this case I used .1, but you will need to play with this value.

So now the blender sees 100 * (mask - .1) as the blending factor. This looks much better with this mask.


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 Wed, 04 February 2009 at 3:28 PM

file_423468.jpg

I did one more render with blue instead of yellow. The contrasting colors here make it easier to see the difference.


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)


Shadow_Fyre ( ) posted Wed, 04 February 2009 at 3:43 PM

Thank you bagginsbill, I am going to get my head wrapped around what you said and then post an image of my results. 😄


Shadow_Fyre ( ) posted Wed, 04 February 2009 at 4:59 PM

file_423470.jpg

Here is the results I got with your settings. I increased the blend to 100 and the new math_functions node to the same as yours except value 2 is .7. The skin does not show anymore up the side of the displacement! I know the edges look terrible, but I can fix that with new maps and the end result be perfect. Thank you so much!


bagginsbill ( ) posted Wed, 04 February 2009 at 6:28 PM

Beautiful! Glad to help.

Those jaggies are usually because your mask needs to be a higher resolution.

Or sometimes it can be because your min shading rate render setting isn't low enough. Try that first.

If you go the higher res path, you may end up with a huge mask, just for the forehead. This can be a resource hit that slows a render down badly. There is a solution, but it's a little tricky. I use this trick for decals and tatoos.

Instead of designing your mask and color map for the entire UV space, trim it down to only the part where the data is actually important. You then load these partial maps as usual, but you use scaling and offsets on the Image_Map nodes to size and position the trimmed map to cover just the area that is needed. You also have to turn off tiling for these.

For example, my little demo above is the lip mask for lipstick on the new Antonia figure. To get the fine detail needed on that tiny lip area, we needed to use a 4K by 4K map! That's a lot of data just for a few hundred white pixels. But by trimming it, I can have the same effective resolution of a giant mask, while actually only taking up a tiny amount of memory.


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)


Shadow_Fyre ( ) posted Wed, 04 February 2009 at 6:45 PM

file_423478.jpg

Here is a better work up of the shader in action. I made all new maps amd masks and as you can see it looks pretty nice :biggrin: I have used that small image thing before in a package I once had for sale but it didn't do too well and it was quite awhile ago when I think many people were still holding onto Poser 4 and hadn't graduated to P5+ yet, or understood the material room very well. Thanks again, I really appreciate your help as always!


Fazzel ( ) posted Thu, 05 February 2009 at 10:00 AM

Sort of an off topic question, but how do I change the names of nodes in the material room.
For example I noticed that Shadow has changed the node name of Image_Map to things
like Color_Texture, Overlay_Mask, Overlay_Diffuse.  How is this done?



Shadow_Fyre ( ) posted Thu, 05 February 2009 at 10:11 AM · edited Thu, 05 February 2009 at 10:14 AM

Attached Link: http://www.poseworks.com/shaderspider/

poseworks has a free python script to change the name of nodes. I'm not sure if you have to have Shaderspider for it to work, but I do have Shaderspider.


Fazzel ( ) posted Thu, 05 February 2009 at 10:26 AM · edited Thu, 05 February 2009 at 10:31 AM

Quote - poseworks has a free python script to change the name of nodes. I'm not sure if you have to have Shaderspider for it to work, but I do have Shaderspider.

Thanks.  I'll give it a try.

edit:   Yay!  It's free, and it works.  Thanks again.



bagginsbill ( ) posted Thu, 05 February 2009 at 12:59 PM · edited Thu, 05 February 2009 at 1:00 PM

Here's a handy variation I find useful. I mostly only want to rename image maps. So I made a copy of that script and changed one line so that I don't have to wade through a bunch of nodes - just those that are images.

I'm not allowed to distribute a modified version, but you can hack yours easily.

Look for the first line in the AskNode method. It looks like this:

nodes = shaderTree.Nodes()

change it to this:

nodes = **[node for node in shadertree.Nodes() if node.Type() == poser.kNodeTypeCodeIMAGEMAP]

**NOTE: That has to be all one line. This forum may wrap that into two lines.


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)


Shadow_Fyre ( ) posted Thu, 05 February 2009 at 1:09 PM

Ah, thank you 😄 Should come in handy.


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.