Blend Shapes and intermediate position.

   7670   34   0
User Avatar
Member
22 posts
Joined: Oct. 2018
Offline
I use a Blend Shapes between two positions A and B. Is there possibility to add a C position between A and B to reach a A - C - B blend shapes ?

Under Blender, there is a similar concept called ShapeKey. There is no A - C - B possibility but there is another solution: it's possible to combine two or more Shapekey into one shapekey that controls all the others at the same time.

How to get the same result (A - C - B) with Houdini ?

Thank you.
User Avatar
Member
143 posts
Joined: Oct. 2015
Offline
Hello
I think this node do the job :

http://www.sidefx.com/docs/houdini/nodes/sop/sblend.html [www.sidefx.com]

Ben
User Avatar
Member
22 posts
Joined: Oct. 2018
Offline
Thank you for your answer.

I already had a look at this node but I've understood I can access to several sliders but not one slider that control multiple blend shapes or multiple point under the same way.

I think I have to look more precisely about that.
User Avatar
Member
22 posts
Joined: Oct. 2018
Offline
Well, I just looked at the sequence blend and I read
You cannot blend between more than 2 inputs at a time.

So, it seems to me it's impossible to use sblend to add a intermediate point (a third input) between two input. Am I right ?
User Avatar
Member
143 posts
Joined: Oct. 2015
Offline
Hello , Then go back to blend shape
and add some blend slider like on the image so you will have a slider per shape.
Or i don't know …maybe i didn't understand well your question, sorry
Edited by Benjamin Lemoine - March 11, 2019 10:59:24

Attachments:
Clipboard01.jpg (238.9 KB)

User Avatar
Member
22 posts
Joined: Oct. 2018
Offline
It's almost this but with one slider.

Imagine you slide your “blend1” to 1. Then you slide your “Blend2” to 1. So, you start from your sphere to your blend1 shape and after you get your shape 2 that is blend1 + blend2.

What I would like is, in more that this, a third slider that starts from the sphere and goes to blend1 at 0,5 and finish at blend1+blend2 when the slider is 1.
Edited by Chrisd - March 11, 2019 11:44:07
User Avatar
Member
143 posts
Joined: Oct. 2015
Offline
Then you should create your own parmeter float lets say with the name myblend. And in the first slider you put the expression clamp(ch(“myblend”),0,0.5)*2
And in the second
(clamp(ch(“myblend”),0.5,1.0)-0.5)*2
Or find better expression.
So you get your custom blend shape
User Avatar
Member
472 posts
Joined: July 2005
Offline
Hi,

for this case you can use an attribute wrangle aswell. The function “lerp” is performing a linear blend.

Attachments:
blend.hipnc (247.7 KB)

User Avatar
Member
22 posts
Joined: Oct. 2018
Offline
Thank you both for your help.

@benjamin
I don't know parameter float. I have a lot to learn to use your solution, but it seems interesting.

@Aizatulin
This is exactly what I'm looking for. By the way, I just don't understand how your code works in your blending node. I have to learn again.
User Avatar
Member
143 posts
Joined: Oct. 2015
Offline
To create custom parameter see images
And you definitely should learn a bit of vex !
I'm attaching the file too so you can try it for yourself

Have a nice Day

Ben

edit :
Taking a look at the other wrangle files , i just realize that my solution was not what you were looking for ! and also that what you were looking for is just the sequence blend ! So i don't understand why you don't just use this one !?
Edited by Benjamin Lemoine - March 13, 2019 07:17:58

Attachments:
Clipboard01.jpg (184.6 KB)
Clipboard02.jpg (188.7 KB)
Clipboard03.jpg (107.7 KB)
custom_blend.hiplc (135.0 KB)

User Avatar
Member
22 posts
Joined: Oct. 2018
Offline
Thank you Benjamin. Yes, I know I have to learn Vex to use well Houdini… I started with that.
User Avatar
Member
472 posts
Joined: July 2005
Offline
Yes !

Learning Vex is always a good idea, because things will become clearer (as a side effect).
With the attribute wrangle for example you can use code snippets to manipulate the geometry. There are different types of wrangles. The point wrangle loops over all points of the input geometry (which is connected to the first input) and performs the code you write into it for each point.
I've tried to simplify the last example using the “lerp” function. If you look into the wrangle you can see, I've addded some explanations (yellow comments).
For this case I've used as first input a poly curve with only 3 points. The second input is also poly curve with 3 points. Each of the points of the first curve can be identified by a point of the second curve using its point number.
Lets say curve1 has P0, P1, P2 and curve2 has V0, V1, V2. P0 and V0 have the same point number like P1 and V1 and P2 and V2.
While we are looping over all points of curve1, we now take fixed point number called @ptnum (it can be 0,1,2).
With the function “point” we can read corresponding point of the second input.
Now “lerp” takes two points (P,V) and a float value (u) which is between 0 and 1. 0 will give the first point and 1 the second one.
Any u-value between will give u*100% of the way on the straight line from P to V. For example u=0.5 gives you the midpoint.
The u-value can be modified using the “chf()” function, binding the float value to the parameter interface.
If you try this (for this simple example), you can see the result is same as if you are using the blend shape node.
But of course the blend shape node offers alot of other functions, but for this simple case it is the same.

Attachments:
lerp_basic_example.hipnc (76.4 KB)

User Avatar
Member
22 posts
Joined: Oct. 2018
Offline
I understood the solution of Benjamin only yesterday…

In my logic, the custom blend had to be built from the blend1 and 2 in that way:
Custom blend = function (blend1, blend2)

I mean a blend of blend.

So, I was looking for where the cutom blend code was… But I understood the custom blend is not a real blend but just a slide that sends the value to blend1&2 in their fields. In fact custom blend drives the blend1&2. I was looking for a solution in the opposite way… Anyway, your solution do the job. Nice !

By the way, this solution brings a problem. When the custom blend is on, the fields of blend1&2 are filled with the code and we lost the capability to use blend 1& 2 at the same time.
And same problem if I want to create a second custom blend #2 at the same times. May be there is a solution If we get more edit node… I have to look for that. But the concept of blend of blend seems to me more powerful even if this is a newbie intuition…

Thank you Aizatulin for your explanation and example. I think I understand how the code works but I have to understand how to use it beyond this example. May be with this solution there is not the limitation of the « driver » solution above.
Edited by Chrisd - March 14, 2019 12:44:21
User Avatar
Member
472 posts
Joined: July 2005
Offline
Here is another example with a visualization of the different methods. The last solution should do the same as the first solution, which I've posted before. In the last example there is a wrangle called “function”, where you have an u-parameter. From this parameter you can create attributes (detail mode which calculates them only once). These attributes called @u1, @u2 can be referenced in the blend shape nodes above and can drive the blend values.
Edited by Aizatulin - March 14, 2019 15:01:56

Attachments:
blend_visualize.hipnc (107.8 KB)

User Avatar
Member
22 posts
Joined: Oct. 2018
Offline
Thank you again Aizatulin.

I'm seeing your file.
I've got a warning in opening it. I don' t know if this affects the behavior.

Warning:

/obj/curve_object1/blend_1_to_2:

Skipping unrecognized parameter “weightperpack”.


/obj/curve_object1/blend_1_to_3:

Skipping unrecognized parameter “weightperpack”.


/obj/curve_object1/blend_1_to_2_to_3:

Skipping unrecognized parameter “weightperpack”.


/obj/curve_object1/blend_1_2:

Skipping unrecognized parameter “weightperpack”.


/obj/curve_object1/blend_1_3:

Skipping unrecognized parameter “weightperpack”.


/obj/curve_object1/blend_mixture:

Skipping unrecognized parameter “weightperpack”.


/obj/curve_object1/blend_1_2_X:

Skipping unrecognized parameter “weightperpack”.


/obj/curve_object1/blend_1_3_X:

Skipping unrecognized parameter “weightperpack”.


/obj/curve_object1/blend_mixture_X:

Skipping unrecognized parameter “weightperpack”.
User Avatar
Member
143 posts
Joined: Oct. 2015
Offline
Hello !
I didn't try it with the last Houdini version 17.5 but i know blendshape node had been updated… Maybe that's why !
User Avatar
Member
22 posts
Joined: Oct. 2018
Offline
Benjamin Lemoine
Hello !
I didn't try it with the last Houdini version 17.5 but i know blendshape node had been updated… Maybe that's why !

You're right. I didn't know the last 17.5 version was avalaible.
Thank
User Avatar
Member
22 posts
Joined: Oct. 2018
Offline
I’ve understood the blend file with the pig, even if I’m not confortable with the syntax. How we know the curved are called P, V or other things… So it seems some things are not declared but it’s secondary. I have to learn and that’s all.

About your last file, the function works and I understand the code. But the differents blend (1 to 3, 1 to 2,…) seems separately not working. I understand the global logic but I guess I miss something. I have to learn more.

But I guess, the function can do the global interpolation and each blend node makes the partial interpolations. We could access both interpolation but not at the same time. I mean, this is a « or » and not an « and » or a « plus ». I really would like to do it by myself to show it to you. But if we choose your example in your last file with the sphere and the different blends, in my mind we should have 3 slides.

- First slide: the sphere goes from 1 to 2
- Second slide: the sphere goes from 2 to 3
- Third slide: the sphere goes from 1 to 3 directly, following the diagonale. This slide is the add of the 1st and 2nd slide in a way,

But, the most important is elsewhere:

Using the third slide, imagine the sphere is on the way between 1 to 3 (with diagonal), it must be always possible to use the first and second slide that adds a variation around the third slide. The 1st et 2nd slides are not in place of the 3rd but in more. In a way, the 1st and 2nd slides can adjust the sphere path around the 3rd slide:

If the 1st and 2nd slides are on 0. The 3rd goes directly to the point 3 with the diagonal.
If the 1st is on 1 and 2nd on 0, The 3rd blend 1 to 2 to 3 point
If the 1st is on 0 and 2nd on 1, the 3rd blend 1 to opposite of 2 (on the square) then to 3.

Something like this. I’ll try to make this solution to show you.
User Avatar
Member
1755 posts
Joined: March 2014
Offline
Hi Chrisd,
I've tackled the topic too, as seen here [www.sidefx.com].
It's not a trivial thing to get a solution that works very well in production, where you need realistic results.
Although it might be currently possible to achieve good results, if you're a TD, it might be very difficult if you're a TA or a generalist. A shift in interest from SideFX to more character driven tools is obviously necessary.

One might need certain groups of geometry to shift differently from A to C to B and even though, like I said, it might be possible to do right now, it's not easy to implement. It would be a very useful feature to have, offering a lot more control over the blend, very necessary for organic shape transformations.

Make sure to submit RFEs with any insights and ideas you acquire in your effort to look for solutions to your problems, as those will pile up and give SESI a measure about what features are sought after the most by the community.
Edited by anon_user_89151269 - March 15, 2019 15:47:28

Attachments:
morph_groupds.jpg (201.8 KB)

User Avatar
Member
472 posts
Joined: July 2005
Offline
Hi,

another option is using a ramp to blend the values by function along A to B and A to C. The ball should stay in the (convex) triangle. One problem, which can occure, is that the speed can variate, but this can be controlled by another ramp, depending on the blend ramp.

Attachments:
blend_visualizeX.hipnc (119.6 KB)

  • Quick Links