[x3d-public] ECMAScript eventual inclusion in view3dscene, HAnimDisplacer in X3D-Edit

Joe D Williams joedwil at earthlink.net
Mon Aug 7 21:34:03 PDT 2023


> "HAnimDisplacer? "

> This is again offtopic, and we talked about it. Yes, it's just a missing feature of view3dcene/CGE. Again, our time is limited, we don't support it yet.

yes, a bit off topic, and thanks again for skin, but then what are you doing that allows deformation of all or part of a mesh?
Displacer is alternative to doing set(s) or subset(s) of coordinate interpolators. Further, it is a displacement added after point is moved by skeleton actions. Sort of a mesh morphing tool, and the only of its type in x3d, and really an advanced feature to offer your users.

> If any authoring tool will appear that actually generates X3D models with HAnimDisplacer node (better yet, if that authoring tool would be popular, like Blender), that would certainly bump our priority to support this node. 

Please, it is not a matter of other authoring tools generating displacer code, it is users generating the point motions however they can, using random techniques. Yes, it is hard, but when you understand the need, then maybe more approval by you. In detailed control of the skin points with motion, without displacer, authors commonly just go ahead and add funny sets of joints to push skin around and alter the shape, or use sets of coordinate interpolators to get the effect. This is essentially random and not standards-track. A better way to make tucks and bulges is needed.
Additionally, as standards for facial animation emerge, point motions for an expression will most likely be defined in terms of displacement of areas of points from some reference positions, and will be best implemented by a displacer function. This is an operation supported by the gltf mesh animations tools, and is used at the very highest levels of mesh animation. In fact, look at the ways this is done in the most exclusive mesh animation tools.
For most fun, first they need skeleton, then they want a skin, then they need joint-driven skin animation, then they need displacer. 

Thanks Again for view3dscene, I am using it every day.  
Joe


-----Original Message-----
From: Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
Sent: Aug 7, 2023 8:33 AM
To: Michalis Kamburelis <michalis.kambi at gmail.com>, Joe D Williams <joedwil at earthlink.net>
Cc: X3D Graphics public mailing list <x3d-public at web3d.org>, Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
Subject: RE: [x3d-public] ECMAScript eventual inclusion in view3dscene, HAnimDisplacer in X3D-Edit

Thanks Michalis for being very careful and deliberate with implementing ECMAScript (aka JavaScript).  This is not a task to perform lightly or loosely.  Having a long-term campaign is smart.

I also agree that more implementation effort is needed with HAnimDisplacer.  X3D-Edit supports it, but we do not have many HAnimDisplacer examples and likely can benefit from further quality assurance (QA) tests in our X3D Examples Archives for HAnim.





all the best, Don
--
Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149
X3D graphics, virtual worlds, navy robotics https://faculty.nps.edu/brutzman

-----Original Message-----
From: x3d-public <x3d-public-bounces at web3d.org> On Behalf Of Michalis Kamburelis
Sent: Monday, August 7, 2023 8:08 AM
To: Joe D Williams <joedwil at earthlink.net>
Cc: X3D Graphics public mailing list <x3d-public at web3d.org>
Subject: Re: [x3d-public] ECMAScript

Our CastleScript is indeed a poorer solution than ECMAScript. And indeed it's not portable. I don't pretend CastleScript is better than ECMAScript (it's not) -- but just point that, as of today, this is what we have. Many simple ECMAScript usage cases can be expressed as CastleScript.

As said, I'd like to add ECMAScript support at some point, however time is limited. We support what our users really need, our roadmap is public on our website.

As for external scripting -- it is a different way of operating and thinking. The whole API of Castle Game Engine is documented on our website, it's a big thing independent from X3D SAI. We're looking at other game engines (like Unity, Unreal, Godot) and what game developers need. You're welcome to read our manual :)

" I don't want to generate tex stuff for an IFS, even if the spec says i should. "

-- that seems offtopic here, and also I recall the resolution of that thread was simple: in some of your test models, you don't provide enough texture coordinates. I don't recall any CGE/view3dscene bug in this regard. Please don't add offtopic notes like that, it's hard to understand what you refer to and address. If you believe there's a bug in view3dcene/CGE, in that we fail to process some valid X3D content, you're welcome to submit a bug report
https://github.com/castle-engine/view3dscene/issues .

"HAnimDisplacer? "

This is again offtopic, and we talked about it. Yes, it's just a missing feature of view3dcene/CGE. Again, our time is limited, we don't support it yet.

If any authoring tool will appear that actually generates X3D models with HAnimDisplacer node (better yet, if that authoring tool would be popular, like Blender), that would certainly bump our priority to support this node.

Regards,
Michalis

pon., 7 sie 2023 o 16:48 Joe D Williams <joedwil at earthlink.net (mailto:joedwil at earthlink.net)> napisał(a):
> 
> well, all you have to say is that sorry, I don't support x3d Script
> node. I've got my own stuff, nana This is the same as somebody saying we still like the old EAI and don't want to change to SAI.
> Or. I like the old vrmlscript and don't want change to ecmascript.
> Also same as no, I don't want to generate tex stuff for an IFS, even if the spec says i should.
> HAnimDisplacer?
> 
> > So executing scripts within the models is not a commonly needed feature.
> 
> How about showing some examples of an external script doing something that could not be done better by internal script, or by internal x3d node? Does this external script operate anything like the x3d SAI?
> 
> A commonly needed feature of x3d is portable between tools.
> 
> Good Luck,
> Joe
> 
> -----Original Message-----
> From: Michalis Kamburelis <michalis.kambi at gmail.com (mailto:michalis.kambi at gmail.com)>
> Sent: Aug 7, 2023 6:40 AM
> To: Joseph D Williams <joedwil at earthlink.net (mailto:joedwil at earthlink.net)>
> Cc: X3D Graphics public mailing list <x3d-public at web3d.org (mailto:x3d-public at web3d.org)>
> Subject: Re: [x3d-public] ECMAScript
> 
> Indeed, view3dscene / Castle Game Engine is missing ECMAScript.
> 
> It is on the roadmap, and certainly possible to do. We could use
> Duktape like FreeWRL; or other JS engines -- whatever is lightweight
> to execute and easy to maintain.
> 
> But admittedly implementing JS scripting is not high priority in our
> case. Reason: most of CGE users do programming "outside" of X3D, using
> Castle Game Engine API to manipulate scenes (and X3D nodes too). This
> API is available from Pascal, we think about extending to other
> languages (Python) in the future too. In most cases, people want to
> treat model formats like X3D or glTF (or anything else) as just
> carriers of information between 3D authoring tool and CGE. So
> executing scripts within the models is not a commonly needed feature.
> 
> As a solution for now: We support CastleScript, a really simple (very
> simple, much more limited than JS) language for simple things. See
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcast (https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcast)
> le-engine.io%2Fcastle_script.php&data=05%7C01%7Cbrutzman%40nps.edu%7Ce
> 06e7e476e3445ecf94608db97585adf%7C6d936231a51740ea9199f7578963378e%7C0
> %7C0%7C638270179280242332%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAi
> LCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=X6EicARiRhv3GuSKc0XDfsfLTG0Co1LqJGP2FGNbPVY%3D&reserved=0 . It can express the operation you do in your samples :) And in X3D "Script" node, you can specify a few alternatives, so you could have both ecmascript and castlescript versions for cross-browser support. If you want to pursue this option, the "OrientationData" node would look like this:
> 
> -----------
> #X3D V3.2 utf8
> PROFILE Interchange
> 
> DEF OrientationData Script {
> outputOnly MFString orientation
> inputOnly SFRotation printOrientation
> initializeOnly SFString sep ", "
> url [
> "ecmascript:
> function printOrientation (value,ts) { var x =
> Math.round(value.x*100)/100; var y = Math.round(value.y*100)/100; var
> z = Math.round(value.z*100)/100; var angle =
> Math.round(value.angle*100)/100; orientation = new MFString ( x + sep
> + y + sep + z + sep + angle ); } "
> "castlescript:
> function foo(value,ts)
> { Note that we have to hardcode sep value (comma) below, due to
> CastleScript limitations. } orientation :=
> string(round(vector_get(value, 0) * 100) / 100) + ',' +
> string(round(vector_get(value, 1) * 100) / 100) + ',' +
> string(round(vector_get(value, 2) * 100) / 100) + ',' +
> string(round(vector_get(value, 3) * 100) / 100) + ','
> "
> ]
> }
> -----------
> 
> Regards,
> Michalis
> 
> niedz., 6 sie 2023 o 22:31 Joseph D Williams napisał(a):
> >
> >
> >
> > Hi, view3dscene, missing ECMAScript.
> >
> > Near implementation?
> >
> > All I need is some basic stuff. :
> >
> >
> >
> > DEF PositionData Script {
> >
> > outputOnly MFString position
> >
> > inputOnly SFVec3f printPosition
> >
> > initializeOnly SFString sep ", "
> >
> > url "ecmascript:
> >
> > function printPosition (value,ts) {
> >
> > var x = Math.round(value.x*100)/100; // simple 2 decimal digits
> >
> > var y = Math.round(value.y*100)/100;
> >
> > var z = Math.round(value.z*100)/100;
> >
> > position = new MFString ( x + sep + y + sep + z );
> >
> > }
> >
> > "
> >
> > }
> >
> >
> >
> > DEF OrientationData Script {
> >
> > outputOnly MFString orientation
> >
> > inputOnly SFRotation printOrientation
> >
> > initializeOnly SFString sep ", "
> >
> > url "ecmascript:
> >
> > function printOrientation (value,ts) {
> >
> > var x = Math.round(value.x*100)/100;
> >
> > var y = Math.round(value.y*100)/100;
> >
> > var z = Math.round(value.z*100)/100;
> >
> > var angle = Math.round(value.angle*100)/100;
> >
> > orientation = new MFString ( x + sep + y + sep + z + sep + angle );
> >
> > }
> >
> > "
> >
> > }
> >
> >
> >
> > Thanks,
> >
> > Joe
> >
> > _______________________________________________
> > x3d-public mailing list
> > x3d-public at web3d.org (mailto:x3d-public at web3d.org)
> > http://web3d.org/mailman/listinfo/x3d-public_web3d.org (http://web3d.org/mailman/listinfo/x3d-public_web3d.org)
> 
> 

_______________________________________________
x3d-public mailing list
x3d-public at web3d.org (mailto:x3d-public at web3d.org)
http://web3d.org/mailman/listinfo/x3d-public_web3d.org (http://web3d.org/mailman/listinfo/x3d-public_web3d.org)



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230808/012c91bc/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 120063 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230808/012c91bc/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 61728 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230808/012c91bc/attachment-0003.png>


More information about the x3d-public mailing list