nimbling

[Feature Request]
Hi! I'm attempting a bit of a 3D effect by moving the pupil inside of the iris.

I'd like to link the movement of the pupil to, say, 101% of the movement of the constraint target, so that I could move the whole iris around the eye, and have the pupil do it's perspective thing as a result.

In this vein: I'd also like to link the transform to the scale :) - in that way, I could pretend the eye is round by having the whole thing scale down on the corresponding axis of movement.

Is this currently possible?
Screen Shot 2016-08-03 at 15.08.33.png
You do not have the required permissions to view the files attached to this post.
User avatar
nimbling
  • Posts: 177

Nate

Interesting idea. I suppose it doesn't hurt to allow < 0% and > 100%, though I'm not completely sure what you're doing in your specific scenario.

"transform to the scale" <- Did you mean translation to scale? I'm afraid we don't have a way to do that in the editor. You could do it at runtime easily, but of course you won't see it while animating in the editor.
User avatar
Nate

Nate
  • Posts: 10070

amcleod

Nimbling, what you could try is linking the iris to the pupil, instead of the pupil to the iris. You can't create a constraint where the pupil has 101% of the iris' position, but you can create a constraint where the iris has 99% of the pupil's position.
amcleod
  • Posts: 38

Xelnath

I've cheated this effect by manipulating the curve of an animation to go past 100% - it allows for a really cool "rubber banding" effect on a transform constraint.

---

I've cheated this effect by manipulating the curve of an animation to go past 100% - it allows for a really cool "rubber banding" effect on a transform constraint.
Xelnath
  • Posts: 408

nimbling

@Nate, yea, I meant translation to scale :) I'll ask our coders to have a look - thanks! :)
As for the under 0 and over 100, it's to make the iris and pupil move relative to each other, to fake them being on a round surface.
The idea is: If I move the iris to the edge, the pupil would move "a bit more" (that 1+%, or perhaps 0,5%) - as such giving us some illusion of perspective.

And @amcleod, Good call! I'll give that a go :) thanks!

@Xelnath - did you manipulate said curve in the editor, or in the runtime?

Here's our characters looking in different cardinal directions.

eye-examples.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
nimbling
  • Posts: 177

Nate

Ah, gotcha. That's an interesting use case. 3.4.02 is now released, which allows <0% and >100%.
User avatar
Nate

Nate
  • Posts: 10070

nimbling

Rebindpose.gif


There :) using the 110% movement constraint, and a 60% rotation mix.
THANKS! :)

PS: I knowI'm late to ask, but is this supported in the Unity runtime?
Are the constraint-results-keys baked into the Json, or do the constraints make it over to the export?
You do not have the required permissions to view the files attached to this post.
User avatar
nimbling
  • Posts: 177

Pharan

spine-csharp (which is used by spine-unity) is the closest runtime to spine-libgdx/the Spine editor.
If there are any differences/limitations between them, it's more related to rendering, not skeleton control.

So yes. It is intact when you load it in Unity. :)

If you use BAKING (which means you force skeletons to conform to Unity's animation API and structures, then all bets are off. Even IK won't work because Unity doesn't do 2D IK, and I don't think they have a built-in 3D IK for that matter.)
So don't use baking and expect it to be fully-featured.
User avatar
Pharan
  • Posts: 5366

nimbling

Sweet! I'll constrain the shit out of that pupil.
Pharan wrote:If you use BAKING (which means you force skeletons to conform to Unity's animation API and structures, then all bets are off. Even IK won't work because Unity doesn't do 2D IK, and I don't think they have a built-in 3D IK for that matter.)
So don't use baking and expect it to be fully-featured.
I meant baking in the sense of Spine's export to the JSON.
Is the constraint "live" in Unity, or are the values of the bone, that is constrained in any given way, "baked" / in the export to the JSON?

Thanks :)
User avatar
nimbling
  • Posts: 177

Nate

No baking happens when exporting to JSON. Everything is dynamically computed at runtime.
User avatar
Nate

Nate
  • Posts: 10070

Pharan

No. Forget I even mentioned baking. FORGET IT NOW. :D

In other words, yes. Constraints behave as they would in any normal runtime; You can change the constraint values at runtime and the constrained bones will be positioned accordingly.
User avatar
Pharan
  • Posts: 5366

nimbling

Is it me, or is scaling still capped to 100%?
I'm trying to have my "squint" animation "follow" the eyewhite :) -but in the editor, I can't get it to key over 100.

---

While on the subject: do constraints chain? / affect other constraints down the line?

(I'd like this!)
User avatar
nimbling
  • Posts: 177

Nate

The limit was removed only for translate and rotation. Does it make sense for scale? Shear?

Constraints do chain, but the order isn't customizable yet. We are working on it. :)
User avatar
Nate

Nate
  • Posts: 10070

Søren

I think removing the limit for Scale and Shear makes sense. I'm fairly certain there are use cases for both.
One thing to note for scaling > 100% is that since we're working with raster images scaling above 100% might not look great if you go too high.
User avatar
Søren

Shiu
  • Posts: 2418

nimbling

@Shiu Yea. How about that SVG support? ;)
User avatar
nimbling
  • Posts: 177


Return to Editor