mountain height masking with group and/or color

   15043   32   2
User Avatar
Member
75 posts
Joined: Feb. 2019
Offline
Hey Everybody

I would like to control my mountain height parameter with some kind of “soft selection”

I attached an image (at least i hope so), so i would like to control the height with something like this:


honestly i don't have a clue how can i:
-make a soft selection like this (color would be also ok if i can use it as “mask” to control height or point position)
-how to tell Houdini to use that soft selection as mask to control mountain height

I also tried color node with attribvop but in vex builder i can't combine my unified noise output:noise with ramp


I attached there the hip file, but it's on the bottom of my post :
Image Not Found


The best would be to use attrib vop because of vex builder. i try avoid magic codes as possible

Thanks for the help in advance!
Edited by ostyascukor - July 3, 2019 12:32:49

Attachments:
mountain_height_soft_selection.jpg (106.8 KB)
mountain_height_attribvop.jpg (779.5 KB)
cliff.hip (356.0 KB)

User Avatar
Staff
3465 posts
Joined: July 2005
Offline
file needs the HDA
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
75 posts
Joined: Feb. 2019
Offline
yeah, sorry, it's here!

thanks!
Image Not Found

Attachments:
szadam_cliff_chunks.hda (15.3 KB)

User Avatar
Member
1139 posts
Joined: April 2017
Offline
Could be something like this:

VectorToFLoat
(to pick the y values) -> Fit range(set the sourceMin and sourceMax to set where the soft selection is) etc…

Hope this helps.

-Olivier
User Avatar
Member
1139 posts
Joined: April 2017
Offline
…Actually, here's a better/clearer way.

The idea is to use fit range using the y axis (to create the mask) and use vector to float so you can add to the y axis using a constant. Use the float to vector to combine your added Y value to the old X and Z values. You now have a position that's moved on the y axis.

You just need to pass the old position with the lifted position in a colormix using the mask as the bias.

-Olivier
Edited by olivierth - July 3, 2019 15:41:43

Attachments:
soft_selection_translate.hip (133.9 KB)
soft_selection_translate.JPG (150.5 KB)

User Avatar
Member
75 posts
Joined: Feb. 2019
Offline
Ahhh, this is pure diamond!
And You did it in vex builder, not with magic codes, so double Thank You!

Thank You very much, this is exactly what i need!

Now i try to remake like this with more unified noise (which node is the base of the mountain as i can understand), so i may control different areas of the mesh with masking, and i can give different type and intensity of noises to the mask areas!

Just one more question. is there any slope or cavity kind of masking in vex builder?
At detailing it would be supercool to get something like “cavity” masking so i can put more detail to the “inner corners (orange)”, more wear to the edges (blue)
rock

Thank You again, this example is a very big help to me!

Attachments:
cavity_corners.jpg (140.2 KB)

User Avatar
Member
75 posts
Joined: Feb. 2019
Offline
It's me again!

now i see unified noise is the base of the mountain node, but there are a lot of other parameters those i would need to use unified noise properly, so i think another way to mix noises (mountain nodes) together:

i have this cool fit range and color mix method thanks to olivierth.

my question is how can i mix together 2 separate mountain node with this “masking” method?

so it's important that i'd like to drive my mountains with that mask color (mix) method, and within the mountains i can drive my heights and other profiles…

plus is there a way to display color only? i mean the color info on the mesh as an albedo pass in the 3d viewport?
now i can see it only in shaded mode.

Thank You for the answers in advance
Edited by ostyascukor - July 4, 2019 08:03:56

Attachments:
masking_mountain.jpg (246.7 KB)

User Avatar
Member
1139 posts
Joined: April 2017
Offline
Hey!

I'm glad I can help you! I also needed help when I started (and still do!). This community is awesome!

You can check the houdini file. I used vop noises instead of the mountain sop. it gives a lot more look options than using the mountain node.

The first vop is to pick the direction (mask) you want your displacements. The second vop is to apply the noises to those masks.

good luck!

-Olivier

Attachments:
direction_mask_displacements.JPG (102.7 KB)
dir_mask_for_displacements.hip (260.8 KB)

User Avatar
Member
75 posts
Joined: Feb. 2019
Offline
You did again exactly what i need!
i'm not saying i can understand every node that You are using (because of lack of proper math knowledge), but those commentaries are super useful to a noobie as me!

I have to apologize because i forgot to mention i'm using a tricky normal transfer because of the good displacement results.
I attached a picture that shows what is my problem.

When i’m using mountain node it gets the normals of A at shading, but gets the normals of B to the displacement
I have to define somehow the normals of A and give it back in the second attribvop (where the actual displacement is happening) to get “proper” normals to shading.
But important to use the normals of B at displacement (unified noise) in the attribvop to get good displacement result.

I could save You time if i mention it sooner, but i was not sure if it's important or not!

A big Thank You again and also thanks for the answer in advance
Edited by ostyascukor - July 4, 2019 17:35:06

Attachments:
normals_ab.jpg (618.0 KB)

User Avatar
Member
75 posts
Joined: Feb. 2019
Offline
And two more question:
1-How can i “blur”/interpolate my color masks? i see there is space to play with ranges to get a more soften/hard result, but sometimes it would be good to get a simply blur or interpolation kind of thing.

2-Plus i'm trying get over color information from one attribvop “level” to another (shot attached), but i only get the bias “mask” of the color mixer. Is there any way to “recall” also the colors, not just the “bias mask”?
Now i'm thinking of it, maybe that not a big problem, because when i have all my displacement and whatsoever operations (levels), then i can simply recall the bias masks, and assign color to them in the “highest level” attribvop.
Edited by ostyascukor - July 4, 2019 18:42:59

Attachments:
vcolor_blur.jpg (119.5 KB)
color_recall.jpg (415.7 KB)

User Avatar
Member
1139 posts
Joined: April 2017
Offline
Hey!

For your first reply, don't you just place a normal sop at the end? But if you really need to use the same normals you had before, you could simply use a “bind export” node in your previous VOP. It allows you to store attributes that you can later “recall” with a “bind” node.

For blurring the mask, you could soften it with the fit range but to get real blurring, use the attribblur sop.

For the last question, you can store as many mask as you want with the “Bind Export” node in vops and get them back with a “Bind” later. You can check the attached file.

Hope that helps!

-Olivier

Attachments:
store_normals_and_blur_mask.hip (221.5 KB)

User Avatar
Member
75 posts
Joined: Feb. 2019
Offline
Thank You for the fast reply and for the hip file again!

It's only an inconvenience but would be much better to get access to attribblur (or some kind of blur) right at the mask creating “ ”space“ (in vex builder)
Now i have to separate every mask i want to blur into different attribvop nodes to able to connect them into an attribblur (at least i didn't figure out how can i use bind_export in the attribblur. (shot attached)

Bigger problem is that i can't see how can i use both the normals (mesh A and B) within one ”connection line“ (or how we call a connection stream in Houdini) shot attached

To this problem, my question is how can i get normals from mesh A (plus the masks are binded from the same “connection line”,
but get normals from mesh B to proceed the displacement vectors right
i need somehow to get both (mesh A and B) normals, but once i have to use mesh A normal to get proper shading (plus i need the masks from mesh A) and at the “same time” i need mesh B normals to the displacement effect.

I guess somehow i have to merge the two connection line, and i have to store somehow both the normals (mesh A and B)
Or maybe i just need the normals of A but i still have to merge my ”mesh A ward“ with ”mesh B ward" because i need the detailed mask to use with the smooth normals/position in displacement.

Thank You for your patient
Edited by ostyascukor - July 5, 2019 07:48:08

Attachments:
mesh_AB_normals.jpg (785.7 KB)
attribblur.jpg (321.6 KB)

User Avatar
Member
1139 posts
Joined: April 2017
Offline
Can't your attribtransfer be just before your displacement? That way your detailled mask would already be created before transferring the smoothed normals for your displacement. And it would all be in the same connection line.

Also, an easy way of having smoothed normals is to use an attribblur set to "N" instead of the attribtransfer trick.

For the last image, the sphere has 2 attributes: @color_to_blur and @Cd. Your attribblur IS bluring @color_to_blur but you are looking at the sphere with @Cd. You would need another VOP where you would use a Bind to pick your @color_to_blur and connect it to the Cd. That way, you can see the blurred result.

-Olivier
Edited by olivierth - July 5, 2019 16:32:05
User Avatar
Member
75 posts
Joined: Feb. 2019
Offline
Ok, i still have problems

I attached the hip file + a shot.
I tried to “mimic” the mountain node settings to make the problem more “visible”
On bottom left the bad result, on bottom right the good result.

It seems mountain node somehow (and that's the problem i can't even see theoretically how) mix the original shading + the displacement with the smoothed mesh but the displacement is also part of the “shading” (normals)

Image Not Found
Edited by ostyascukor - July 5, 2019 17:43:30

Attachments:
ntrans_vs_mountain.jpg (571.2 KB)
cliff.hip (679.1 KB)

User Avatar
Member
75 posts
Joined: Feb. 2019
Offline
ok, lets simply things

is there a way to convert a color into “group selection”?
or convert an attribute created in vex builder (bind export) to group somehow?
i can drive mountain height with group and that would solve my problem
Edited by ostyascukor - July 6, 2019 10:55:10
User Avatar
Member
1139 posts
Joined: April 2017
Offline
I'll have a look at your file.

For the grouping by color, I don't how to do this with VOPs. You might need dark magic on this one.

If you use the expression sop, you can easily group by color. Set the group name as you want and use the expression: @Cd.r > 0.6

Here's what each part does:

@ -> attribute
Cd -> color
.r -> red channel
> -> bigger than

Attachments:
group_by_color.JPG (82.7 KB)

User Avatar
Member
1139 posts
Joined: April 2017
Offline
Sadly, I can't check your setup because the first node (szadam_cliff_chunks_inner and outter) is giving me an error. They are trying to access values with a path that doesn't work.

By the way, when you create an asset, you can place an Output sop at the end. This makes sure that when you get out of you asset, the Output node will be the viewed one no matter what.

Attachments:
bad_reference.JPG (28.7 KB)

User Avatar
Member
75 posts
Joined: Feb. 2019
Offline
Hey mate!

I figured out half our ago how i will use mountain node with your store P and N method.
I also tested it out, so it works for sure!

Basically i have 3 “player on the field”.
1-mask that controls where the mountain should work
2-store P and N to get a “mountain pass” free version
3-call the stored P and N (as You showed me before) and simply mix the “mountained” and “mountain free” versions of my mesh, and that do the right thing!

With this method i don't need any group, so we don't need the dark magic at this time

However i'm really curious (no i'm not ) how that mountain node works.
I opened it, but i have no chance to understand what is going in that mountain

Now groups are unnecessary, but a quick question. Am i assuming right that group can't store soft selection? I mean as i look at the picture You posted right now it seems binary to me.
But it's strange to me, because what is the obstruction to store “transition” (soft selection basically) in a group?

I attached the hip file if You are curios about the “solution” (more like a hack ).

Thank You again for your help, and quick replies!
Edited by ostyascukor - July 6, 2019 17:50:44

Attachments:
cliff.hip (483.8 KB)

User Avatar
Member
75 posts
Joined: Feb. 2019
Offline
olivierth
Sadly, I can't check your setup because the first node (szadam_cliff_chunks_inner and outter) is giving me an error. They are trying to access values with a path that doesn't work.

By the way, when you create an asset, you can place an Output sop at the end. This makes sure that when you get out of you asset, the Output node will be the viewed one no matter what.

something like this i attached in this post?
Edited by ostyascukor - July 6, 2019 17:50:28

Attachments:
cliff.hip (484.8 KB)

User Avatar
Member
75 posts
Joined: Feb. 2019
Offline
plus one more question
is there a way to turn of the display of Cd in Houdini?
because if i just disconnect it, it still shows the last Cd status, but i need middle grey Cd to check shading.
now i'm carrying with myself a color node to get middle grey color on shading when i'm needing it
  • Quick Links