Difference between revisions of "X3D Python Language Binding"
(→Motivation) |
(→Motivation) |
||
(21 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | The X3D Working Group has started to work on this important potential addition to the suite of X3D-capable programming languages and file encodings. | ||
+ | |||
+ | We expect that Web3D Consortium members will pursue this work, with design reviews and feedback typically on the x3d-public@web3d.org mailing list. | ||
+ | |||
== Motivation == | == Motivation == | ||
− | + | X3D supports multiple language bindings and file encodings, each providing equivalent implementations of X3D Architecture. | |
− | + | The [http://www.web3d.org/specifications/X3dSpecificationRelationships.png X3D Specification Relationships] diagram shows how the various programming-language bindings and file encodings are related. | |
+ | |||
+ | Why Python: | ||
+ | |||
* Python is widely used, so many tools and applications might then easily create/use/produce X3D | * Python is widely used, so many tools and applications might then easily create/use/produce X3D | ||
+ | * X3D Python Language Binding ISO/IEC 19777-6) will directly implement X3D Scene Access Interface (SAI) Specification, which in turn accesses the X3D Architecture Specification | ||
* We are not afraid of programming languages that depend on whitespace! | * We are not afraid of programming languages that depend on whitespace! | ||
− | |||
− | |||
== Resources == | == Resources == | ||
+ | |||
+ | We are finding multiple 3D graphics resources that use Python, so understanding them can help our X3D Python design patterns. | ||
* Python script interfaces | * Python script interfaces | ||
− | ** | + | ** H3DAPI has a Python Interface (which includes most of X3D) http://www.h3dapi.org/modules/judoc |
− | ** Blender has an independent interface | + | ** Blender has an independent interface using Python interfaces |
+ | ** NIH has written a series of Python scripts that exercise Blender | ||
+ | ** pyOCC python interface to Open Cascasde geometry kernel | ||
− | John Carlson has produced | + | Masaki Aono of [https://www.tut.ac.jp/english Toyohashi University of Technology, Japan] has experimented with Python designs for X3D. |
+ | * TODO might examples, code or further information be available? | ||
+ | |||
+ | John Carlson has produced and example implementation already: | ||
* https://github.com/coderextreme/pythonSAI | * https://github.com/coderextreme/pythonSAI | ||
+ | * Autoconverts X3DJSAIL Java implementation classes using PyJNius | ||
== Deliverables == | == Deliverables == | ||
+ | We are following the regular Web3D Consortium Specification Development Process to produce this work as part of the X3D Working Group. | ||
+ | * [https://github.com/Web3DConsortium/X3D/tree/master/ISO-IEC%2019777 Draft 19777-6 specification] added in GitHub | ||
+ | ** Follow examples of other X3D language bindings | ||
+ | ** Reach proof-of-capability initial draft | ||
+ | ** New Work Item Proposal (NWIP) by Web3D Consortium for ISO | ||
+ | |||
+ | * Example scenes | ||
+ | ** Test scenes to demonstrate design patterns | ||
+ | ** Convert all scenes in [http://www.web3d.org/x3d/content/examples/X3dResources.html#Examples X3D Example Archives] to demonstrate completeness | ||
+ | |||
+ | * Implementations | ||
+ | ** Conversion stylesheet, X3dToPython.xslt | ||
+ | ** PyJnius cross-compilation conversion of X3DJSAIL java classes | ||
+ | ** Possibly another library, X3DPSAIL or X3DPYSAIL perhaps? | ||
+ | |||
+ | * Validation by compilation | ||
+ | ** are special tests needed, written in Python, to test program validity? | ||
+ | ** Compatible with X3D Unified Object Model (X3DUOM) | ||
+ | ** Self-validation checking for python source code transformed from .x3d scenes | ||
+ | |||
+ | * Plan of Action Milestones (POAM) | ||
+ | ** Ensure these assets are all collected | ||
+ | ** Develop working group schedules for related work are refined | ||
+ | ** Gain commitments from participants | ||
+ | |||
+ | == TBD == | ||
+ | |||
+ | To Be Determined: | ||
− | * | + | * Is it possible to run Python scripts in a Web browser? |
− | * | + | * How does Python provide support for DOM? |
− | + | ||
− | + |
Latest revision as of 15:51, 27 July 2018
The X3D Working Group has started to work on this important potential addition to the suite of X3D-capable programming languages and file encodings.
We expect that Web3D Consortium members will pursue this work, with design reviews and feedback typically on the x3d-public@web3d.org mailing list.
Contents
Motivation
X3D supports multiple language bindings and file encodings, each providing equivalent implementations of X3D Architecture. The X3D Specification Relationships diagram shows how the various programming-language bindings and file encodings are related.
Why Python:
- Python is widely used, so many tools and applications might then easily create/use/produce X3D
- X3D Python Language Binding ISO/IEC 19777-6) will directly implement X3D Scene Access Interface (SAI) Specification, which in turn accesses the X3D Architecture Specification
- We are not afraid of programming languages that depend on whitespace!
Resources
We are finding multiple 3D graphics resources that use Python, so understanding them can help our X3D Python design patterns.
- Python script interfaces
- H3DAPI has a Python Interface (which includes most of X3D) http://www.h3dapi.org/modules/judoc
- Blender has an independent interface using Python interfaces
- NIH has written a series of Python scripts that exercise Blender
- pyOCC python interface to Open Cascasde geometry kernel
Masaki Aono of Toyohashi University of Technology, Japan has experimented with Python designs for X3D.
- TODO might examples, code or further information be available?
John Carlson has produced and example implementation already:
- https://github.com/coderextreme/pythonSAI
- Autoconverts X3DJSAIL Java implementation classes using PyJNius
Deliverables
We are following the regular Web3D Consortium Specification Development Process to produce this work as part of the X3D Working Group.
- Draft 19777-6 specification added in GitHub
- Follow examples of other X3D language bindings
- Reach proof-of-capability initial draft
- New Work Item Proposal (NWIP) by Web3D Consortium for ISO
- Example scenes
- Test scenes to demonstrate design patterns
- Convert all scenes in X3D Example Archives to demonstrate completeness
- Implementations
- Conversion stylesheet, X3dToPython.xslt
- PyJnius cross-compilation conversion of X3DJSAIL java classes
- Possibly another library, X3DPSAIL or X3DPYSAIL perhaps?
- Validation by compilation
- are special tests needed, written in Python, to test program validity?
- Compatible with X3D Unified Object Model (X3DUOM)
- Self-validation checking for python source code transformed from .x3d scenes
- Plan of Action Milestones (POAM)
- Ensure these assets are all collected
- Develop working group schedules for related work are refined
- Gain commitments from participants
TBD
To Be Determined:
- Is it possible to run Python scripts in a Web browser?
- How does Python provide support for DOM?