[semantics-public] X3D Semantic Web 30 MAR 2020: OWL-Time considerations for X3D Ontology and animation mappings

Don Brutzman brutzman at nps.edu
Mon Mar 30 09:40:16 PDT 2020


Attendees: Jakub Flotyński and Don Brutzman.

Welcome back to the deep end of the swimming pool!  8)

=============================================

1. X3D Semantic Web paper revisions continue, editorial work by Jakub and Thanos in progress.

=============================================

2. *Time Ontology in OWL*

W3C Candidate Recommendation 26 March 2020

This Version:
   https://www.w3.org/TR/2020/CR-owl-time-20200326/
Latest Published Version:
   https://www.w3.org/TR/owl-time/

Abstract:
OWL-Time is an OWL-2 DL ontology of temporal concepts, for describing
the temporal properties of resources in the world or described in Web
pages. The ontology provides a vocabulary for expressing facts about
topological (ordering) relations among instants and intervals, together
with information about durations, and about temporal position including
date-time information. Time positions and durations may be expressed
using either the conventional (Gregorian) calendar and clock, or using
another temporal reference system such as Unix-time, geologic time, or
different calendars.

> -------- Forwarded Message --------
> Subject: Time Ontology in OWL is a W3C Candidate Recommendation (Call for  Implementations)
> Date: Fri, 27 Mar 2020 00:17:54 +0800
> [...]
> 
> Dear Advisory Committee Representative, Chairs,
> 
> I am pleased to announce that Time Ontology in OWL is now a W3C
> Candidate Recommendation:
>   https://www.w3.org/TR/2020/CR-owl-time-20200326/
> 
> The approval and publication are in response to this transition request:
>   https://github.com/w3c/transitions/issues/228
> 
> Please provide feedback by 23 April 2020 as follows: 
[...]

/Action item:/ it would be great if we could perform some initial correspondences and provide comment back from Web3D to W3C.

We discussed the components of animation and the potential use of OWL-Time with X3D.

Jakub notes:
The use of OWL-Time would be interesting in the context of temporal representation and exploration of animations, e.g., in semantic HAnim. For instance, we could perform reasoning and queries about interpolators and time sensors in X3D scenes, get position, orientation, colors, and coordinates of animated 3D objects at particular moments or within some periods of time.

I believe these worthy principles appears applicable to all X3D scene animations.  Of note, a common definition for "simulation" is "the behavior of a model over time".  So these considerations are actually fully general.

Humanoid Animation (HAnim) is perhaps the ultimate application for animation... if we had skeletal records and motion-animation results in medical records, then semantic query and reasoning across such data might have a profound impact upon medical diagnosis, treatment and even quality of life.

However HAnim models are large and somewhat unwieldy (today).  Further ISO has delayed proper publication of the HAnim v2 specification (separate topic, specification editors are pursuing) and HAnim practitioners are just starting to work on testing our initial HAnim v2 examples for X3D4 more thoroughly.

Why don't we choose a simple scene that includes basic animation chain, that will be easier to consider correspondences between X3D Ontology and OWL-Time.

* X3D Example Archives: X3D for Web Authors,
   Chapter 07 Event Animation Interpolation, Hello X3D Authors Animation Chain
   https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation/HelloX3dAuthorsAnimationChainIndex.html
   https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation/HelloX3dAuthorsAnimationChainX3dom.xhtml
   https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation/HelloX3dAuthorsAnimationChain.x3d

Alert: be sure to select/click/touch the globe in order to start the animation!

TODO: add a good screen shot, likely an exemplar video as well.

Here are the corresponding autogenerated conversions to Turtle (produced during build process using X3dToTurtle.xslt) plus subsequent SPARQL query results:

   https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation/HelloX3dAuthorsAnimationChain.ttl
   https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation/HelloX3dAuthorsAnimationChain.rq.txt

----------------------------------------------------------------------
Model in turtle:

@prefix :       <http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation/HelloX3dAuthorsAnimationChain.ttl#> .
@prefix dc:     <http://purl.org/dc/terms/> .
@prefix owl:    <http://www.w3.org/2002/07/owl#> .
@prefix rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:   <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix xsd:    <http://www.w3.org/2001/XMLSchema#> .
@prefix x3d:    <http://www.web3d.org/specifications/x3d-4.0.xsd#> .
@prefix x3do:   <http://www.web3d.org/semantics/ontologies/X3dOntology4.0#> .

:X3D a owl:NamedIndividual, x3do:X3D ;
   x3do:hasHead :head ;
   x3do:hasScene :Scene ;
   x3do:profile 'Immersive' ;
   x3do:version '3.3' ;
   x3do:noNamespaceSchemaLocation 'http://www.web3d.org/specifications/x3d-3.3.xsd' .
:head a owl:NamedIndividual, x3do:head ;
   x3do:hasParent :X3D ;
   x3do:hasMeta :meta_1_1, :meta_1_2, :meta_1_3, :meta_1_4, :meta_1_5, :meta_1_6, :meta_1_7, :meta_1_8, :meta_1_9 .
:meta_1_1 a owl:NamedIndividual, x3do:meta ;
   x3do:hasParent :head ;
   x3do:content 'HelloX3dAuthorsAnimationChain.x3d' ;
   x3do:name 'title' .
:meta_1_2 a owl:NamedIndividual, x3do:meta ;
   x3do:hasParent :head ;
   x3do:content 'Don Brutzman' ;
   x3do:name 'creator' .
:meta_1_3 a owl:NamedIndividual, x3do:meta ;
   x3do:hasParent :head ;
   x3do:content '5 October 2000' ;
   x3do:name 'created' .
:meta_1_4 a owl:NamedIndividual, x3do:meta ;
   x3do:hasParent :head ;
   x3do:content '20 October 2019' ;
   x3do:name 'modified' .
:meta_1_5 a owl:NamedIndividual, x3do:meta ;
   x3do:hasParent :head ;
   x3do:content 'Fully developed animation-chain example showing spinning globe and text: Hello!' ;
   x3do:name 'description' .
:meta_1_6 a owl:NamedIndividual, x3do:meta ;
   x3do:hasParent :head ;
   x3do:content 'http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation/HelloX3dAuthorsAnimationChain.x3d' ;
   x3do:name 'identifier' .
:meta_1_7 a owl:NamedIndividual, x3do:meta ;
   x3do:hasParent :head ;
   x3do:content 'https://www.web3d.org/x3d/content/examples/Basic/course/HelloX3dAuthorsAnimationChain.x3d' ;
   x3do:name 'reference' .
:meta_1_8 a owl:NamedIndividual, x3do:meta ;
   x3do:hasParent :head ;
   x3do:content 'X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit' ;
   x3do:name 'generator' .
:meta_1_9 a owl:NamedIndividual, x3do:meta ;
   x3do:hasParent :head ;
   x3do:content '../license.html' ;
   x3do:name 'license' .
:Scene a owl:NamedIndividual, x3do:Scene ;
   x3do:hasParent :X3D ;
   x3do:hasChildren :WorldInfo_2_1, :Viewpoint_2_2, :OrbitalTimeInterval, :SpinThoseThings, :EarthCoordinateSystem ;
   x3do:hasROUTE :ROUTE_2_5 .
:WorldInfo_2_1 a owl:NamedIndividual, x3do:WorldInfo ;
   x3do:hasParent :Scene ;
   x3do:info '"an introductory scene"' ;
   x3do:title 'Hello X3D Authors Animation Chain' .
:Viewpoint_2_2 a owl:NamedIndividual, x3do:Viewpoint ;
   x3do:hasParent :Scene ;
   x3do:description 'Hello, world' ;
   x3do:orientation ( 0 1 0 3.14159 ) ;
   x3do:position ( 0 0 -8 ) .
:OrbitalTimeInterval a owl:NamedIndividual, x3do:TimeSensor ;
   x3do:hasParent :Scene ;
   x3do:cycleInterval '12' .
:SpinThoseThings a owl:NamedIndividual, x3do:OrientationInterpolator ;
   x3do:hasParent :Scene ;
   x3do:key ( 0.00 0.25 0.50 0.75 1.00 ) ;
   x3do:keyValue ( 0 1 0 0 0 1 0 1.57079 0 1 0 3.14159 0 1 0 4.7123889 0 1 0 6.2831852 ) .
:ROUTE_2_5 a owl:NamedIndividual, x3do:ROUTE ;
   x3do:hasParent :Scene ;
   x3do:fromField 'fraction_changed' ;
   x3do:fromNode 'OrbitalTimeInterval' ;
   x3do:toField 'set_fraction' ;
   x3do:toNode 'SpinThoseThings' .
:EarthCoordinateSystem a owl:NamedIndividual, x3do:Transform ;
   x3do:hasParent :Scene ;
   x3do:hasROUTE :ROUTE_2_6_1, :ROUTE_2_6_5 ;
   x3do:hasChildren :MiniWorld, :SimpleGeoStationarySatellite, :ClickTriggerTouchSensor .
:ROUTE_2_6_1 a owl:NamedIndividual, x3do:ROUTE ;
   x3do:hasParent :EarthCoordinateSystem ;
   x3do:fromField 'value_changed' ;
   x3do:fromNode 'SpinThoseThings' ;
   x3do:toField 'set_rotation' ;
   x3do:toNode 'EarthCoordinateSystem' .
:MiniWorld a owl:NamedIndividual, x3do:Group ;
   x3do:hasParent :EarthCoordinateSystem ;
   x3do:hasChildren :Shape_2_6_2_1 .
:Shape_2_6_2_1 a owl:NamedIndividual, x3do:Shape ;
   x3do:hasParent :MiniWorld ;
   x3do:hasAppearance :Appearance_2_6_2_1_1 ;
   x3do:hasGeometry :Sphere_2_6_2_1_2 .
:Appearance_2_6_2_1_1 a owl:NamedIndividual, x3do:Appearance ;
   x3do:hasParent :Shape_2_6_2_1 ;
   x3do:hasTexture :ImageTexture_2_6_2_1_1_1 .
:ImageTexture_2_6_2_1_1_1 a owl:NamedIndividual, x3do:ImageTexture ;
   x3do:hasParent :Appearance_2_6_2_1_1 ;
   x3do:url '"../../earth-topo.png" "../../earth-topo.gif" "../../earth-topo-small.gif" "http://X3dGraphics.com/examples/X3dForWebAuthors/earth-topo.png" "http://X3dGraphics.com/examples/X3dForWebAuthors/earth-topo.gif" "http://X3dGraphics.com/examples/X3dForWebAuthors/earth-topo-small.gif"' .
:Sphere_2_6_2_1_2 a owl:NamedIndividual, x3do:Sphere ;
   x3do:hasParent :Shape_2_6_2_1 .
:SimpleGeoStationarySatellite a owl:NamedIndividual, x3do:Transform ;
   x3do:hasParent :EarthCoordinateSystem ;
   x3do:hasChildren :Shape_2_6_3_1 ;
   x3do:rotation ( 1 0 0 .3 ) ;
   x3do:scale ( 0.1 0.3 0.1 ) ;
   x3do:translation ( 0 0 5 ) .
:Shape_2_6_3_1 a owl:NamedIndividual, x3do:Shape ;
   x3do:hasParent :SimpleGeoStationarySatellite ;
   x3do:hasAppearance :Appearance_2_6_3_1_1 ;
   x3do:hasGeometry :Text_2_6_3_1_2 .
:Appearance_2_6_3_1_1 a owl:NamedIndividual, x3do:Appearance ;
   x3do:hasParent :Shape_2_6_3_1 ;
   x3do:hasMaterial :Material_2_6_3_1_1_1 .
:Material_2_6_3_1_1_1 a owl:NamedIndividual, x3do:Material ;
   x3do:hasParent :Appearance_2_6_3_1_1 ;
   x3do:diffuseColor ( 0.9 0.1 0.1 ) ;
   x3do:emissiveColor ( 0.9 0.2 0.1 ) .
:Text_2_6_3_1_2 a owl:NamedIndividual, x3do:Text ;
   x3do:hasParent :Shape_2_6_3_1 ;
   x3do:hasFontStyle :FontStyle_2_6_3_1_2_1 ;
   x3do:string '"Hello X3D Authors !!"' .
:FontStyle_2_6_3_1_2_1 a owl:NamedIndividual, x3do:FontStyle ;
   x3do:hasParent :Text_2_6_3_1_2 ;
   x3do:size 3 .
:ClickTriggerTouchSensor a owl:NamedIndividual, x3do:TouchSensor ;
   x3do:hasParent :EarthCoordinateSystem ;
   x3do:description 'Click to start animation' .
:ROUTE_2_6_5 a owl:NamedIndividual, x3do:ROUTE ;
   x3do:hasParent :EarthCoordinateSystem ;
   x3do:fromField 'touchTime' ;
   x3do:fromNode 'ClickTriggerTouchSensor' ;
   x3do:toField 'startTime' ;
   x3do:toNode 'OrbitalTimeInterval' .

----------------------------------------------------------------------
SPARQL query to find WorldInfo @title if it exists:

PREFIX rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl:  <http://www.w3.org/2002/07/owl#>
PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
PREFIX x3d:  <http://www.web3d.org/specifications/x3d-4.0.xsd#>
PREFIX x3do: <http://www.web3d.org/specifications/X3dOntology4.0#>

# X3dHelloWorldQuery_03.rq    Query HelloWorld.ttl to show title given to model within a WorldInfo node.

###############################################

SELECT ?WorldInfoNode ?title ?parentNode
WHERE
{
     ?WorldInfo rdf:type       x3do:WorldInfo ;
                x3do:title     ?title         ;
                x3do:hasParent ?parent .

     BIND (strafter(xsd:string(?WorldInfo),"#") AS ?WorldInfoNode)
     BIND (strafter(xsd:string(?parent),"#")    AS ?parentNode)
}

###############################################
----------------------------------------------------------------------
| WorldInfoNode   | title                               | parentNode |
======================================================================
| "WorldInfo_2_1" | "Hello X3D Authors Animation Chain" | "Scene"    |
----------------------------------------------------------------------


Excerpt: here are the key excerpts relating to time, in XML and Turtle.  Pretty simple.  Next let's look at X3D Ontology.

<TimeSensor DEF='OrbitalTimeInterval' cycleInterval='12'/>

:OrbitalTimeInterval a owl:NamedIndividual, x3do:TimeSensor ;
   x3do:hasParent :Scene ;
   x3do:cycleInterval '12' .

----------------------------------------------------------------------
X3D Ontology with excerpt for TimeSensor:

# X3D Ontology

<http://www.web3d.org/specifications/X3dOntology4.0> a owl:Ontology ;
   dc:title       "X3D Ontology"@en ;
   dc:description "The X3D Ontology for Semantic Web provides terms of reference for semantic query of X3D models." ;
   dc:reference   "https://www.web3d.org/x3d/content/semantics/semantics.html" .
   # TODO include further provenance information
             
# Maintained at
#	http://www.web3d.org/specifications/X3dOntology4.0.ttl
#	http://www.web3d.org/x3d/content/semantics/ontologies/X3dOntology4.0.ttl
[...]

:TimeSensor a owl:Class ;
   rdfs:subClassOf :X3DTimeDependentNode ;
   rdfs:subClassOf :X3DSensorNode ;
   rdfs:label "TimeSensor continuously generates events as time passes." .
:cycleInterval a owl:DatatypeProperty ;
   rdfs:domain :TimeSensor ;
   rdfs:range :SFTime .

# enabled field inheritedFrom=X3DSensorNode with accessType=inputOutput, type=SFBool, default=true
# loop field inheritedFrom=X3DTimeDependentNode with accessType=inputOutput, type=SFBool, default=false
# pauseTime field inheritedFrom=X3DTimeDependentNode with accessType=inputOutput, type=SFTime, default=0
# resumeTime field inheritedFrom=X3DTimeDependentNode with accessType=inputOutput, type=SFTime, default=0
# startTime field inheritedFrom=X3DTimeDependentNode with accessType=inputOutput, type=SFTime, default=0
# stopTime field inheritedFrom=X3DTimeDependentNode with accessType=inputOutput, type=SFTime, default=0
# DEF field inheritedFrom=X3DNode with accessType=inputOutput, type=SFString, baseType=xs:ID
# USE field inheritedFrom=X3DNode with accessType=inputOutput, type=SFString, baseType=xs:IDREF
# class field inheritedFrom=X3DNode with accessType=inputOutput, type=SFString, baseType=xs:NMTOKENS
# IS field inheritedFrom=X3DNode with accessType=inputOutput, type=SFNode, default=NULL
# metadata field inheritedFrom=X3DNode with accessType=inputOutput, type=SFNode, default=NULL
----------------------------------------------------------------------

BTW note how we have made the actual definition pretty terse since (as each comment shows) many fields are inherited from super classes.  The X3D Unified Object Model (X3DUOM) enables us to do that rigorously and consistently for all fields in X3D.

Pseudo-query in SPARQL to find duration (by finding cycleInterval) follows, in X3D terms.  TODO test!

SELECT ?TimeSensorNode ?title ?parentNode
WHERE
{
     ?TimeSensorNode rdf:type            x3do:TimeSensor ;
                     x3do:cycleInterval  ?cycleInterval      ;
                     x3do:hasParent      ?parent .

     BIND (strafter(xsd:string(?WorldInfo),"#") AS ?WorldInfoNode)
     BIND (strafter(xsd:string(?parent),"#")    AS ?parentNode)
}

The "hasParent" is what gets us the identifier label (DEF or autogenerated) for the parent TimeSensor node.

Note that x3do:cycleInterval has rdfs:range :SFTime .

TODO: perhaps a dozen of the many SFTime fields are durations (intervals) and the rest are actual time (seconds since midnight beginning 1 JAN 1990).  We need to distinguish those SFTime fields in X3DUOM and the ontology.

FAQ: note that X3D interpolator, chaser and damper nodes have no intrinsic definition of time in their fields.  TimeSensor is what controls the computation and generation of time events.  So our problem space for SFTime animation is actually quite small.

Relation between X3D time intervals and OWL-time:  *TODO our next step!*  Probably we should focus next on how to define correspondences between both SFTime (duration or absolute) and OWL-Time.

Jakub notes that at some point, some day, reasoning might be able to figure out the actual translation and rotation model at a given point of time... we would be able to *perform temporal analysis in 3D*.  Wow that would be quite a combination of relationships, very interesting.

=============================================

3. Metadata records: important topic to keep considering and building upon.

Suggested approach:

- look at X3D Ontology constructs for meta statements and Metadata* nodes
- look at examples
- see how far we can get looking at existing mappings
- consider whether further definitions are useful, or whether we have enough capability already
- try to keep following the same consistent patterns wherever possible to simplify understanding and adoption.

=============================================

4. p.s. my favorite literature quote in this domain:

"We all know time" is a phrase that is frequently repeated by character Dean Moriarty (actually Neal Cassady) in Jack Kerouac's book _On The Road_.  He says this many times as if it is a truism.  By the end of the book, I realized we all know very little about time... YMMV.

=============================================

We meet again next week on Web3D Zoom channel, same time (8-9 Pacific time zone, USA west coast).

Stay safe please.  Have fun with X3D!  8)

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 http://faculty.nps.edu/brutzman



More information about the semantics-public mailing list