[x3d-public] Mantis 1410: HAnimHumanoid skin definitions have no way to assign textures

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Tue Dec 6 02:05:02 PST 2022


John, you are confirming exactly what we think we have in these examples.
No encoding efforts needed.

 

The problem is a gap in X3D4 specification.  If no one disagrees that
HAnimHumanoid geometry defined in the "skin" field ought to have texture
capabilities, just like HAnimHumanoid geometry defined in the "skeleton"
field, then we can rectify the X3D4 specification prose and fix that gap, as
indicated in the Mantis issue.

 

Existing example excerpt follows in JSON syntax, produced from .x3d by rules
implemented in our X3dToJson.xslt stylesheet.  Looks like yours, happily.

 

*
https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/JoeK
ickIndex.html
*
https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/JoeK
ick.json

 

 

                    "-skin":[

                      { "Shape":

                        {

                          "@DEF":"Joe_Shape",

                          "-appearance":

                            { "Appearance":

                              {

                                "@DEF":"Joe_skin_Appearance",

                                "-material":

                                  { "Material":

                                    {

                                      "@DEF":"Joe_skin_Material",

                                      "@diffuseColor":[0.3,0.3,0.6],

                                      "@emissiveColor":[0.3,0.3,0.6]

                                    }

                                  },

                                "-texture":

                                  { "ImageTexture":

                                    {

                                      "@DEF":"JoeSkinImageTexture",

 
"@url":["JoeBodyTexture29.png",https://www.web3d.org/x3d/content/examples/Hu
manoidAnimation/Characters/JoeBodyTexture29.png]

                                    }

                                  },

                                "-textureTransform":

                                  { "TextureTransform":

                                    {

                                      "@DEF":"KickTextureTransform"

                                    }

                                  }

                              }

                            },

                          "-geometry":

                            { "IndexedFaceSet":

 

 

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

 

From: John Carlson <yottzumm at gmail.com> 
Sent: Monday, December 5, 2022 2:02 PM
To: Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
Cc: X3D Public Mailing List (x3d-public at web3d.org) <x3d-public at web3d.org>;
h-anim at web3d.org
Subject: Re: [x3d-public] Mantis 1410: HAnimHumanoid skin definitions have
no way to assign textures

 

  Here's translation of "skin" field as JoeKick.json  (I'll have to regen
the other file you mentioned).

                  "-skin":[

                      { "Shape":

                        {

                          "@DEF":"Joe_Shape",

                          "-appearance":

                            { "Appearance":

                              {

                                "@DEF":"Joe_skin_Appearance",

                                "-material":

                                  { "Material":

                                    {

                                      "@DEF":"Joe_skin_Material",

                                      "@diffuseColor":[0.3,0.3,0.6],

                                      "@emissiveColor":[0.3,0.3,0.6]

                                    }

                                  }

Is X3dToJson.xslt ready to go? File info for mine:

 

-rw-r--r-- 1 john 197609 312970 Oct 30 20:21 X3dToJson.xslt

 

 

 

Note that -skin has a skin containerField child, Shape. Note that this is
also allowed per HAnim 2 and allowed in JSON schema

 

            "-skin": {

              "$ref": "#/$defs/-Group-Transform-Shape-IndexedFaceSetMFNode"

            },

 

Last schema update was November 1st. Will regen.   Looks OK.

 

<xs:element name="HAnimHumanoid">

<xs:annotation>

<xs:appinfo>

[ snip ]

<xs:element name="skin" type="MFNode" fixed="inputOutputField"
default="Group|Transform|Shape|IndexedFaceSet"/>

X3DUOM looks like this too.

 

I will have to re-read your messages. I'm getting old, or something.

 

On Mon, Dec 5, 2022 at 1:44 PM Brutzman, Donald (Don) (CIV)
<brutzman at nps.edu <mailto:brutzman at nps.edu> > wrote:

John, the mantis issue includes two examples already. 

 

A. The first by Joe uses "skin" field with a Shape (illegal according to
spec), rather than geometry node only (as specified by X3D spec).  That is
why his example is able to use textures, and that approach seems appropriate
for X3D4.

 

B. The second Korean-student example uses "skeleton" field with descendant
HAnimSegment nodes containing Shape geometry.  That is a different approach,
long valid, with similar visual effects as "skin" geometry.

 

If you have another example that you want to propose for X3D Example
archives, we are always happy to review and consider together on mailing
list.  Thanks for your scrutiny and development efforts.

 

all the best, Don

-- 

Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu
<mailto: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

  _____  

From: John Carlson <yottzumm at gmail.com <mailto:yottzumm at gmail.com> >
Sent: Monday, December 5, 2022 11:25:03 AM
To: Brutzman, Donald (Don) (CIV) <brutzman at nps.edu <mailto:brutzman at nps.edu>
>
Cc: X3D Public Mailing List (x3d-public at web3d.org
<mailto:x3d-public at web3d.org> ) <x3d-public at web3d.org
<mailto:x3d-public at web3d.org> >; h-anim at web3d.org <mailto:h-anim at web3d.org>
<h-anim at web3d.org <mailto:h-anim at web3d.org> >
Subject: Re: [x3d-public] Mantis 1410: HAnimHumanoid skin definitions have
no way to assign textures 

 

NPS WARNING: *external sender* verify before acting.

 

Don, my comment was more about examples in HAnim 2 Standard Annex.   If one
wants to put an example with skin in the HAnim 2 annexes, that would be
great.  You have identified a problem with the body of the standard, I have
identified a problem with annex.

 

I do not know a way to handle cases where there is an unmentioned field.  I
haven't checked Joe Kick yet.

 

But yeah, conscientious attitudes are welcome too.   We're playing the long
game.   I feel very bad about not being able to read everything.

 

A skin field is welcome!  I will add to Mantis.

 

CFE?

 

John

 

On Mon, Dec 5, 2022 at 12:08 AM Brutzman, Donald (Don) (CIV)
<brutzman at nps.edu <mailto:brutzman at nps.edu> > wrote:

Hi John.  We use Mantis for tracking possible issues in the specifications.

 

The problem in the X3D4 specification appears to be that there is no way to
assign textures to skin geometry.

 

The Mantis issue (copied into this email) also proposes a solution that
fixes the problem.

 

all the best, Don

-- 

Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu
<mailto: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 <http://faculty.nps.edu/brutzman> 

 

From: John Carlson <yottzumm at gmail.com <mailto:yottzumm at gmail.com> > 
Sent: Sunday, December 4, 2022 9:37 PM
To: Brutzman, Donald (Don) (CIV) <brutzman at nps.edu <mailto:brutzman at nps.edu>
>
Cc: X3D Public Mailing List (x3d-public at web3d.org
<mailto:x3d-public at web3d.org> ) <x3d-public at web3d.org
<mailto:x3d-public at web3d.org> >; h-anim at web3d.org <mailto:h-anim at web3d.org> 
Subject: Re: [x3d-public] Mantis 1410: HAnimHumanoid skin definitions have
no way to assign textures

 

There is no derivation that i see.

 

On Sun, Dec 4, 2022 at 11:33 PM John Carlson <yottzumm at gmail.com
<mailto:yottzumm at gmail.com> > wrote:

Don, I did notice  that there were no skins on an HAnim Motion 2 example.  I
will check the repository again tomorrow.

 

Is Joe Kick ok?

 

Do HAnim nodes derive from some Shape type?

 

John

 

On Sun, Dec 4, 2022 at 6:14 PM Brutzman, Donald (Don) (CIV)
<brutzman at nps.edu <mailto:brutzman at nps.edu> > wrote:

Joe and I were working with various HAnim models today (using X3D-Edit!) and
found an important problem.no
<https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fproblem.no
%2F&data=05%7C01%7Cbrutzman%40nps.edu%7C033fbfc04ae44488829308dad70c4e48%7C6
d936231a51740ea9199f7578963378e%7C0%7C0%7C638058745120738613%7CUnknown%7CTWF
pbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%
7C3000%7C%7C%7C&sdata=7J3lhP3HU0Ntt%2F%2BFtphbmYIiPuLVKW4Yhdoxjd4thAc%3D&res
erved=0> 

 

 

*	Mantis 1410: HAnimHumanoid skin definitions have no way to assign
textures
*	https://www.web3d.org/member-only/mantis/view.php?id=1410

 

HAnimHAnimHumanoid skin definitions have no way to assign textures because
Shape nodes are not currently allowed in the X3D4 parent-child node
hierarchy.

* X3D4 Architecture, HAnim component, 26.3.2 HAnimHumanoid
*
https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-DIS/Part01/
components/hanim.html#HAnimHumanoid

Relevant field is
  MFNode [in,out] skin [] [IndexedFaceSet, IndexedFanSet, IndexedQuadSet,
IndexedTriangleSet, IndexedTriangleStripSet]

It is possible to assign color values, through use of Color or ColorRGBA
nodes within IndexedFaceSet, for example. However, because Shape is not
permitted, there is no way to assign corresponding Appearance with either
Material or ImageTexture.

 

The following example shows animated skin with a texture, playable in X_ITE
(and X3DOM and BSContact) players.

* X3D Example Archives: Humanoid Animation, Characters, Joe Kick
*
<https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/Joe
KickIndex.html>
https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/JoeK
ickIndex.html

Excerpt:
<Shape DEF='Joe_Shape' containerField='skin'>
  <Appearance DEF='Joe_skin_Appearance'>
    <Material DEF='Joe_skin_Material' diffuseColor='0.3 0.3 0.6'
emissiveColor='0.3 0.3 0.6'/>
    <ImageTexture DEF='JoeSkinImageTexture'
  url=' "JoeBodyTexture29.png" "
<https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/Joe
BodyTexture29.png%22>
https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/JoeB
odyTexture29.png" '/>
    <!-- ROUTE information for KickTextureTransform node: [from
SkinInterpolator.value_changed to rotation ] -->
    <TextureTransform DEF='KickTextureTransform'/>
  </Appearance>
  <IndexedFaceSet DEF='Joe_skin_IndexedFaceSet' etc.
     <Coordinate DEF='Joe_SkinCoord' point= etc.
     <TextureCoordinate point='0 0 0.5 0.5 0.5 0 0 0.5'/>
  </IndexedFaceSet>
</Shape>

 

HAnim specification says

* HAnim specification version 2 volume 1, 6 Object interfaces, 6.2 Humanoid
*
<https://www.web3d.org/documents/specifications/19774/V2.0/Architecture/Obje
ctInterfaces.html#Humanoid>
https://www.web3d.org/documents/specifications/19774/V2.0/Architecture/Objec
tInterfaces.html#Humanoid

sequence<Object> skin [] [indexed mesh objects as defined by the
representation]

 

An example "representation" for HAnim is X3D.

Possible fix:
a. Allow Shape node, in addition to IndexedFaceSet etc. (Matching Joe's
example)
b. Note in the X3D4 specification prose that such a Shape node must contain
one of those same nodes (IFS, ITS etc.).  That will allow identical geometry
capabilities that are currently clearly defined.

 

Note that the animated Korean characters did not display such a problem
because they are apparently textures are part of HAnimSegment that is
animated, which is part of skeleton field hierarchy, and not part of skin
field.  For example,

*	X3D Example Archives: Humanoid Animation, Characters, Jin LOA 4
*	Articulated 3D game character designed with a general graphics tool,
then converted into an X3D HAnim model.
*
https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/JinL
OA4Index.html

 

 

We recommend

*	Taking a generous view of HAnim2 wording "[indexed mesh objects as
defined by the representation]"
*	to allow identical usage of a Shape node, thus ensuring that
textures are possible on animated human skin.
*	Such an approach is already demonstrated in our examples, so it is
feasible and expected.

 

Sincerely yours, Joe and Don.

 

 

all the best, Don

-- 

Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu
<mailto: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 <http://faculty.nps.edu/brutzman> 

 

_______________________________________________
x3d-public mailing list
x3d-public at web3d.org <mailto:x3d-public at 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/20221206/c3176c94/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5353 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20221206/c3176c94/attachment-0001.p7s>


More information about the x3d-public mailing list