Unusual Frame Rig in PlayCanvas; Crowd-Sourced Help Appreciated. :)

Howdy, Canvassers!

Good to be here on the forum. I’ve used a few engines (Unreal, UE4, and others) and it’s been interesting to learn a new web-based engine. I have an unusual question for some crowd-sourced help, including from the fine people at PlayCanvas if they can lend some help. :slight_smile:

We’re working on a VR project where we have something like a picture frame that needs to scale. This object needs to scale from a minimum width and height to a maximum width and height, (imagine a custom frame shop allowing a user to preview picture frames). So, the frame might be 20 x 40 or 30 x 60 or some unusual size.

These possible combinations mean we cannot simply brute force all of the variants, and instead need to scale them somehow, with the least complicated rig or setup for each frame type (assume there are 30 frame types or so).

Also imagine that the frames have a midline bar which needs to remain consistent. So, a frame with bar in the center (going across) needs to have the bar stay relative to that scaling frame no matter what size it is.

How would you tackle this?

We’ve tried just breaking up the frames into pieces for programmatic scaling, but imagine that the picture frames are complicated and not easily broken up into 4 simple pieces. So, if you would indulge me, can you help me think of a way to set up a rig so programming could change scale (width and height) without separating the frame?

One method we’ve tried is to skin the verts on one side of the frame to a bone, and that bone moves over a range of animations frames corresponding to a particular percentage of scale, e.g., frame 50 out of 100 would be 50% scale. This is great for width, but for height, those same corner verts want to be 100% skinned to a totally different bone. How would you all address this issue?

Also, is there any way for a programmer to see a PlayCanvas bone and control it programmatically, even if we came up with a working rig that allows both horizontal and vertical movement?

Another thing we could do perhaps is to utilize linking. Skinning for one direction, linked bones for another which I’m about to try here in a bit.

Before we try our next tests I’m keen to hear your best ideas. Thanks so much!




Okay, I got the frame to scale in two directions with a 100% rig of verts on one side to a bone animating on the Max timeline. The ‘vertical’ bone is the parent of the side bone, with other verts assigned to it. This lets me scale in two directions, but isn’t a good solution for the midline bar just yet. Could be another bone or two could do it, or I might need to separate the midline pieces. Ideas welcome!

1 Like

@DBurke I think I have a solution for you in the top right corner there is a sizer that should help just hit the sizer tool in tool box and streach it with the thing you put or use the sizer in the top right corner, just remember be carful.