[x3d-public] Castle Engine support for Industry Foundation Classes (IFC) using X3D
Brutzman, Donald (Don) (CIV)
brutzman at nps.edu
Fri May 23 11:32:25 PDT 2025
We met today as part of ongoing X3D Standards Working Group efforts.
*
https://www.web3d.org/working-groups/x3d-standards
X3D Standards | Web3D Consortium<https://www.web3d.org/working-groups/x3d-standards>
X3D Standards Working Group. This group meets every Friday from 09-10:00 AM pacific and discussions occur on the x3d-public and X3D (member-only) mailing lists. Web3D Calendar Member-only resources: Meeting Link, Agenda, Minutes and Documents The Extensible 3D (X3D) Standards Working Group forms the core of the working groups within the Web3D Consortium.
www.web3d.org
Attendees: Anita Havele, Michalis Kamburelis, Vincent Marchetti, Nicholas Polys, Dick Puk, Don Brutzman. Regrets, schedule conflict: Christophe Mouton.
Michalis Kamburelis generously offered to brief Web3D members on significant progress he has made with Castle Engine support for Industry Foundation Classes (IFC) with X3D.
Background references:
*
Castle Game Engine supports now IFC
*
https://community.osarch.org/discussion/2826/castle-game-engine-supports-now-ifc
[https://img.youtube.com/vi/MJcMqfx6u98/0.jpg]<https://community.osarch.org/discussion/2826/castle-game-engine-supports-now-ifc>
Castle Game Engine supports now IFC — OSArch<https://community.osarch.org/discussion/2826/castle-game-engine-supports-now-ifc>
Hello everyone! I'm project lead of Castle Game Engine, an open-source 3D and 2D game engine with a visual editor, powerful API, using modern Object Pascal.I wanted to announce a new feature in our engine: we support now the IFC model format! Not just for games :) -- our engine and tools can be used for general applications, like 3D visualizations, as well.
community.osarch.org
*
Castle IFC (Industry Foundation Classes) format support
*
https://castle-engine.io/ifc
*
Latest developments in Castle Game Engine (March 2025) - web, IFC, zip (starts at minute 15:10)
*
https://www.youtube.com/watch?v=MJcMqfx6u98
*
Example conversions using bonsaibim "add-on for beautiful, detailed, and data-rich OpenBIM with Blender"
*
https://github.com/castle-engine/demo-models/tree/master/ifc/created_using_bonsaibim
*
[x3d] May 23 Standards WG meeting - IFC discussion
*
https://www.web3d.org/mailman/private/x3d_web3d.org/2025-May/008813.html
*
Wikipedia: Industry Foundation Classes
*
https://en.wikipedia.org/wiki/Industry_Foundation_Classes
Industry Foundation Classes - Wikipedia<https://en.wikipedia.org/wiki/Industry_Foundation_Classes>
The Industry Foundation Classes (IFC) is a CAD data exchange data schema intended for description of architectural, building and construction industry data (ABCII). The IFC file format is based on ISO 10303-21 standard and definitions of ABCII are documented by using underlying EXPRESS. [1]It is a platform-neutral, open data schema specification that is not controlled by a single vendor or ...
en.wikipedia.org
Michalis described Constructive Solid Geometry (CSG) including geometry operations for addition, subtraction, intersection of meshes and shapes. To learn
*
Wikipedia: Constructive solid geometry
*
https://en.wikipedia.org/wiki/Constructive_solid_geometry
[https://upload.wikimedia.org/wikipedia/commons/8/8b/Csg_tree.png]<https://en.wikipedia.org/wiki/Constructive_solid_geometry>
Constructive solid geometry - Wikipedia<https://en.wikipedia.org/wiki/Constructive_solid_geometry>
CSG objects can be represented by binary trees, where leaves represent primitives, and nodes represent operations. In this figure, the nodes are labeled ∩ for intersection, ∪ for union, and — for difference.. Constructive solid geometry (CSG; formerly called computational binary solid geometry) is a technique used in solid modeling. ...
en.wikipedia.org
He then showed us examples of how Blender supports these operations, specifically union difference and intersection. He also demonstrated export to IFC in JSON syntax. Screenshots attached.
Boolean operation
==
constructive solid geometry
===
1. difference A - B
2. union A + B
3. intersection A * B
He next showed us an impressive set of import/export conversion functions in the castle-view codebase, including much support for X3D. Of note is that the IFC class names and model identifiers were preserved in the names and metadata from the original IFC model.
He showed conversions and identifiers/metadata getting carried through multiple intermediate stages from original source model to final X3D presentation-layer Web rendering.
----------
.ifc extension
means
IFC in STEP encoding, extension .ifc (POPULAR)
IFC in JSON encoding, extension .ifcjson (2nd popular)
... IFC encoding XML encoding...
----------
Converted X3D metadata:
<MetadataSet containerField="metadata"
name="ContainerForAllMetadataValues">
<MetadataString
name="IFC_ClassName"
value='"TIfcWall"' />
<MetadataString
name="IFC_Name"
value='"Wall"' />
</MetadataSet>
------------
He thinks it is a good idea for X3D players to support IFC (direct or converted). Of note is that the X3D Inline node specification quietly allows such extensibility now.
Inline {
url [
# "xxx.ifcjson" # if x3d player can read ifc to make x3d nodes
# "xxx.x3d" # a already-conversion of the original model
# 'https://exampleConverter.com/xxx.x3d"
# "https://exampleConverter.com/my-model?format=ifc"
]
}
*
X3D4.1 draft Architecture, clause 9 Networking component, 9.4.2 Inline
*
https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/components/networking.html#Inline
*
"The run-time system can support any number of 3D model resource types as long as those follow the abstract model definition (see 2.[RFC2077<https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/references.html#RFC2077>), provide a registered content type (e.g., model/x3d-xml, model/gltf-bin, model/stl, etc.), and can be determined with some form of content negotiation (see 2.[RFC2616<https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/references.html#RFC2616>). The run-time system shall support at least one X3D type (e.g., model/x3d-xml) but can also support and negotiate any number of X3D encodings and (optionally) non-X3D representation formats. Support for loading glTF assets (see 2.[GLTF<https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/references.html#GLTF>) also requires support for Shape component level 2 and Lighting component level 4."
TODO, specification editors will consider inclusion of IFC reference information as an example allowed format for Inline url field. Reference:
*
IFC 4.3.2.0 (IFC4X3_ADD2) official, 4.1.9.7 Project Library Information
*
https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/concepts/Project_Context/Project_Library_Information/content.html
*
"The following standard MIME types may be supported by a server (in addition to any proprietary formats) for uploading and downloading data for use in the HTTP Accept header:"
*
MIME Type
Format
application/xml
IFC-XML
application/step
IFC-SPF
Table 4.1.9.7.D
------------
Previous X3D efforts in CSG (over a decade ago) ran into problems with unacceptable computational complexity in Web browser when performing subtractive geometry operations in real time. We successfully mapped to necessary CAD structures, resulting in CAD component, but were unable to recommend direct Inline loading of CAD STEP models.
Showing how much the "art of the possible" has changed for real-time 3D CSG, here is an outstanding ThreeJS demo. Note that when both ends are visible, even the shadows respond to the CSG operations. Controls panel in upper right allows selection to choose SUBTRACTION, INTERSECTION, or DIFFERENCE operations. Wireframe mode reveals that primary interaction is between a Sphere and a Cylinder. Impressive.
*
t.js bvh csg
*
https://threejs.org/examples/webgl_geometry_csg.html
three.js geometry - csg<https://threejs.org/examples/webgl_geometry_csg.html>
three.js bvh csg - three-bvh-csg See main project repository for more information and examples on constructive solid geometry.
threejs.org
Today's in-depth group scrutiny is very useful. Possible big-picture capabilities for X3D:
1.
Conversions like these which carry through names and metadata and unique identifiers means that details in the original IFC models, which can be incredibly comprehensive (for example, every detail for entire buildings) means that specific rooms/window/corridors and other objects of interest can be specifically located in the output.
2.
In other words, everything has a unique name and viewable location, all linkable to anything else on the Web via X3D.
3.
X3D has potential to be Web-facing presentation layer for sharing building models on the web.
4.
As long as people build buildings (uh, forever we hope!) there is an important use case here.
Looking ahead, planning next steps:
1.
We will plan on a public Web3D Webinar where Michalis can again demonstrate these powerful topics.
1.
We do not need to write specification requirements to convert (or map) 800 IFC classes into X3D nodes - Michalis has done about 250! Rather we should encourage broad use of converters.
1.
Inline support for IFC files is possible. Of note is that Inline is flexible in that it might support preferential loading of (a) native IFC formats, (b) an author-converted X3D version, or (c) a conversion-server production. Interestingly the Inline node can support all three options in one definition.
1.
The X3D Standards group will look at whether we can define a BIM/IFC/STEP Interchange profile for X3D version 4.1, likely similar to
*
X3D 4.1 (draft) Architecture, Annex H (normative) CADInterchange profile
*
https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/CADInterchange.html
1.
1.
In addition to a variety of different X3D servers out there in the wild, Web3D Consortium might consider whether the time has come for us to host our own server, maintained for the long term, providing baseline conversion and validation services for general use. Encouraging such best practices has been part of the World Wide Web Consortium (W3C) repertoire for a number of years now.
1.
Our liaison collaborations with other key International Standards Organizations (ISO) groups ensures that the maximum capabilities can be achieved that are stable and repeatable, standing the test of time for the long term.
Nicholas described the importance of reducing dependencies on file formats, rather "the Web is Services" and therefore connections/mashups/editing/conversions on demand are what we are really enabling. This insight helps us sort out how to best proceed with our X3D standardization efforts... not redefining the universe, rather we continue making it easier and easier to connect diverse 3D assets using X3D. Such perspectives are central to the efforts in related work by the following group, led by Nicholas Polys and Johannes Behr.
*
3D Web Interoperability Group, Metaverse Standards Forum (MSF)
*
https://metaverse-standards.org/domain-groups/3d-web-interoperability/
So... Wow! Thank you Michalis for again-amazing work and a tremendous session! There is much opportunity for Web3D members - and indeed everyone - if we can unlock Building Information Models to have full-fledged Web presence using X3D.
Have fun with X3D and building visualization! 🙂
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250523/5359e5ba/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MichalisKamburelisBriefingCastleEngineIfcX3D.23MAY2025.800x447.png
Type: image/png
Size: 694652 bytes
Desc: MichalisKamburelisBriefingCastleEngineIfcX3D.23MAY2025.800x447.png
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250523/5359e5ba/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BlenderSubtractiveGeometrySphere.png
Type: image/png
Size: 241960 bytes
Desc: BlenderSubtractiveGeometrySphere.png
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250523/5359e5ba/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BlenderIfcBuildingExample.png
Type: image/png
Size: 361518 bytes
Desc: BlenderIfcBuildingExample.png
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250523/5359e5ba/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CastleIfcBuildingExample.png
Type: image/png
Size: 205688 bytes
Desc: CastleIfcBuildingExample.png
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250523/5359e5ba/attachment-0007.png>
More information about the x3d-public
mailing list