News:

 

Topic: Lattice deform  (Read 17293 times)

0 Members and 1 Guest are viewing this topic.

  • Posts: 496
  • Triangle
March 21, 2014, 01:19:41 pm
But really I want a result like this:

You know how it goes, you model something and at the end you have the idea to modify the shape. You didn't model everything with the end result in mind from the start and don't want to start over again.

So how would I get this deformation in NVil?

  • Posts: 496
  • Triangle
March 21, 2014, 11:51:25 pm
By adding in extra points to the spline, i can get almost to the shape I want. I like that, because it let's me place the controls for the deformation myself. But the squashing is still an issue I can't get rid of.
Also, I don't fully understand what effects the transformation of the spline vertices in "vertical" directions have.

  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon
March 25, 2014, 09:47:28 am
Try this
http://www.digitalfossils.com/Download/NVil-Mar-22-14.rar

Two scale factor inputs are added. If you want to disable one axis' scale, set its value to 0.

  • No avatar
  • Posts: 2103
  • Polygon
March 25, 2014, 10:15:46 am
Two scale factor inputs are added.

Very nice, much better than simple locks.

Only quick tests, but looking very good. Excellent work.

  • No avatar
  • Posts: 2103
  • Polygon
March 27, 2014, 04:22:57 pm
Hi IStonia,

I was looking more at the new "Scale" functions in the "Scale modifier curve".
As it is, I would say you may as well just have an axis lock on the 2 axis(0 or 1), as nothing more is added beyond that which cannot already be done.

From looking at the results, any scale entry not 0, will first apply the full "scale modify curve" to the mesh, then scale the resulting mesh by scale amount. You can do that currently, by adding scale modify, then scaling manually.

When I first looked at the change(only looked at 0/1 scale at the time), I thought the new scale options would scale(or move) the curve modifier, then the new curve modifier(for the axis) would be applied to the mesh. That way you are scaling the modification, which IMHO would be more correct.


-----------------------------------
Just a thought.

What about having 2 scale modify curves, one for each axis. (No scale modify curve on an axis, no modification.)





« Last Edit: March 27, 2014, 05:22:04 pm by steve »

  • Posts: 496
  • Triangle
March 27, 2014, 06:17:47 pm
I don't have much time at the moment, so I quicly recorded a video that hopefully conveys my confusion about the usage of spline modify. It's just not that intuitive. If you have 10mins time, see for yourself: http://youtu.be/UUF8I4hu6Cc
when does it do what and what are the dependencies and why are they there? (Like rotating to align to a specific axis)

  • No avatar
  • Posts: 2103
  • Polygon
March 27, 2014, 07:08:07 pm
A very quick explanation:-

The "Scale modify curve" needs to be set to world X/Y axis. The full distance(length) of the modify curve in "Y" equates to being the same length as the axis. So the start in Y of the modify curve = start of axis, and end of modify curve in Y = end of axis (it does not matter the actual length of the modify curve)
The distance in X from world X axis is used for modification amount.


Sorry, I know my quick explanation may not be helpful (easy to make scale modification once you know how, but still not too easy to explain).

I will see if I can find time later to post examples.

------------------------------------
While looking, there appeared to be a bug between axis/path curve, when they are not aligned to main axis (even when axis/path are same curve).

---------------------------------------------

But now cannot reproduce. How very annoying.





« Last Edit: March 27, 2014, 07:56:11 pm by steve »

  • Posts: 496
  • Triangle
March 27, 2014, 11:22:07 pm
The "Scale modify curve" needs to be set to world X/Y axis.
For an intuitive workflow, this is just the first problem. Why does it need to be aligned to that?
I just quickly fired it up again to take a picture. How can it be that I get so many different results, while making such easy changes like just changing orientation or the length of the spline. It's not intuitive at all! And that needs to change.

I don't even know what's happening there. One time it gets squashed in the middle (symmetry is off), after changing the length of the spline to half it tapers to the end, but somehow mirrored to the spline. When there's rotation on the object and splines, the taper twists and in another case there's suddenly stepping...

  • Posts: 496
  • Triangle
March 28, 2014, 12:35:14 am
One more: The only time I have success* with it is, when the object is rotated and there's no rotation on the spline objects.


I had to create them "in line", otherwise it wouldn't have worked. I just put them side by side for better display.
1. everything in world axis: nothing happens. It would, if I moved a Spline vertex of the scale spline in both axes (X&Y). One is not sufficient. The result is not predictable.
2. The object and the spline objects are rotated. The scaling is predictable, but there's twisting.
3. Theres no rotation on the spline objects. Result is somewhat predictable (*as long as there's not vertical diversion from the path spline). But if I were to insert a new spline vertex and move it in Y-direction, it gets real crazy as it seems to do what the "move" modifier does.

  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon
March 28, 2014, 10:53:06 pm
The "Scale modify curve" does not work in the way you thought. You need to create and keep the scale curve in world XY plane. When computing scale value, each sample point's world x value is used to be divided by the first point's world x value.

  • Posts: 496
  • Triangle
March 29, 2014, 01:36:00 am
The "Scale modify curve" does not work in the way you thought. You need to create and keep the scale curve in world XY plane. When computing scale value, each sample point's world x value is used to be divided by the first point's world x value.

I'm sorry, but this is what I am talking about: not intuitive! And I still don't get it. I tried to do what you said (keeping the scale spline to XY) and came up with this:

How am I supposed to control anything with this?

So what I imagine what it should be like is this:

Unfortunately that only works under curious circumstances (desribed above, object rotated and so on).
So instead of taking the XY-plane something to calculate the scale value I should be able to align my spline along the mesh and the mesh adjusts its dimensions according to the spline. How could this work? Well, I'm no expert, but it could take the offset from the path spline (you get 1 perpendicular vector) and set this to be the scale. To determine what's 100% scale you would need to take the original dimensions into account somehow, maybe by getting the vector from the path spline to the outer mesh boundaries or bounding box on its way to the scaling spline or something. Another issue I can imagine is that the scale spline would have to be created in way to be in the same plane as the path/axis in order to determine the up-vector (for scale dimension restrictions), workplane could do the trick, or taking first and last vertex of the scale spline as reference.
But still, in the worst case I'll end up with 3 different splines or more (path, axis, scale), and still it's not as intuitive as a lattice/mesh deformer.
« Last Edit: March 29, 2014, 01:38:14 am by Vaquero »

  • No avatar
  • Posts: 2103
  • Polygon
March 29, 2014, 02:26:45 am
The mesh(to deform) and the Axis can be anywhere, at any orientation, in 3d space.
When creating the "scale modifier curve", you create it as if the Axis was on the world Y axis. The amount of modification is then made in the + direction of the X axis (from world X 0).

It does not matter the length of the "scale curve modifier" in the Y axis. It is calculated as if its first point being at start point of axis, and its last point being at the end point of axis.




with modification added:-
(if you find the mesh twists, it is only following the path tangents, you can disable the option "Use path curve tangent spaces" if needed)






« Last Edit: March 29, 2014, 02:43:31 am by steve »

  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon
March 29, 2014, 03:12:52 am
I made a video for this
http://youtu.be/cWOdLsV4I2A

Yes, it is not as intuitive as lattice deformer. I have no idea when I will be able to implement the lattice deformer. But at least you can do something that can be done with lattice deformer. Also the "Spline Modify" tool can do things that lattice deformer can't.

  • Posts: 496
  • Triangle
March 29, 2014, 04:35:34 am
Thanks steve & IStonia!
When creating the "scale modifier curve", you create it as if the Axis was on the world Y axis.
Ah, so that was the critical information I was not aware of. Before you tell me to, I deliberately didn't take a look into the manual to evaluate the intuitiveness of the tool.
I find it easier to have my modifier alongside my mesh and of the same length to see which part of the mesh gets affected how. So this is a very indirect process.

When computing scale value, each sample point's world x value is used to be divided by the first point's world x value.
So this means, that if my first point's world x position is 0, there's division by zero and I get very ugly results.

It's a tragic thing, that you don't have the ressources to spend more time on NVil and I don't expect you to. Replenishing your energy after a full day of work is vital and from my standpoint has priority.

So I guess this topic can now go back to discussing ideas about a far future lattice deformer.

  • No avatar
  • Posts: 2103
  • Polygon
March 29, 2014, 05:18:52 am
I find it easier to have my modifier alongside my mesh and of the same length to see which part of the mesh gets affected how.

If I wanted to work that way, I would simply align the mesh to Y axis. (store its original position/orientation in the transform list, if I wanted to move it back).