[x3d-public] Scaling PositionInterpolators

Joe D Williams joedwil at earthlink.net
Wed Apr 8 17:47:14 PDT 2026


Right, for HAnim only root translation may matter and the Humanoid scale sets space for skeleton.
Set Humanoid scale 1:1 then 'Standard" interpolator keyvalues work. Solve the problem by delivering a properly dimensioned Humanoid and skeleton, please. Then, reasonably 'standard' root translation values will at least work.  
Thanks, John,
Joe

-----Original Message-----
From: John Carlson via x3d-public <x3d-public at web3d.org>
Sent: Apr 6, 2026 11:57 PM
To: X3D Graphics public mailing list <x3d-public at web3d.org>
Cc: John Carlson <yottzumm at gmail.com>
Subject: [x3d-public] Scaling PositionInterpolators

Is there some way to scale PositionInterpolators with an MFVec3f scale field to scale keyValues on initialization?  This would be a nice addition!  I don’t know if Transforms or HAnim does it. 
Google AI suggests this, but I don’t want to use a Script (these would be key values, not keys).
 
function initialize() {    update_keys();}function set_scale(val) {    scale_vec = val;    update_keys();}function update_keys() {    var new_keys = new MFVec3f();    for (var i = 0; i < original_pos.length; i++) {        new_keys[i].x = original_pos[i].x * scale_vec.x;        new_keys[i].y = original_pos[i].y * scale_vec.y;        new_keys[i].z = original_pos[i].z * scale_vec.z;    }    scaled_keys = new_keys; // ROUTE this to PositionInterpolator.set_keyValue}

I would say push the code to the browser, instead of more user code.
 
The example of this is getting a humanoid out of Blender 100 times the size you want it to be.  (Meters vs centimeters), and you’re incorporating the humanoid into a scene that’s at a different scale.  I would like to add scale to the humanoid and the PositionInterpolators with fields.  My PositionInterpolators are built for < 2m humanoids.
 
Yes, I know about unit statements.  Naively exporting JSON output from an AI generated exporter does need to be fixed.  I’m trying to add non-Blender animations (not 100x).  It’s a lot easier to add a scale to each PositionInterpolator by hand than multiplying each keyValue value.  If I shrink the human by 100x, maybe the x PositionInterpolator is shrunk too?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20260409/135d0231/attachment.html>


More information about the x3d-public mailing list