Closed Moult closed 2 years ago
From a discussion, rather than misuse the "NOTDEFINED" enum value, it was proposed to instead add a new enum value called PHYSICAL. I have edited the original post.
Moving to proposal stage, with support from @aothms and @TLiebich
Note that glTF is getting PBR-Next. There was a press release last year. Here is the feature in Three.JS: https://threejs.org/examples/webgl_loader_gltf_transmission
This may help with your transmission and reflective colors.
Here's another good reference.
https://github.com/cx20/gltf-test/tree/master/tutorialModels/IridescentDishWithOlives
Good luck!
Here is press release:
https://www.twice.com/the-wire/new-gltf-extensions-raise-the-bar-on-3d-asset-visual-realism
Thanks @coderextreme ! This is great news! Ping @michaliskambi is X3D also aiming to get these new glTF toys? Would this constitute a new reflectance model / lighting model, or simply an extension of PhysicalMaterial?
My gut feel is that this may have to wait until after IFC 4.3 to be released if X3D doesn't already have these, since it will take some time to go through. Right now for IFC4.3 since we aren't adding new attributes / classes I think it is sufficient to cover the base cases, and there just isn't enough time (deadline in a month with a lot of other priorities).
We do plan on incorporating them in X3D at some point, definitely :) Quoting from my mail to X3D working group some time ago:
6 glTF PBR-related extensions that I want to familiarize with, and consider "how I would do this in X3D", are listed in these 2 pages:
https://www.khronos.org/news/press/khronos-releases-wave-of-new-gltf-pbr-3d-material-capabilities
KHR_materials_clearcoat KHR_materials_transmission KHR_materials_sheen
https://www.khronos.org/news/press/new-gltf-extensions-raise-the-bar-on-3d-asset-visual-realism
KHR_materials_ior KHR_materials_volume KHR_materials_specular
The 2 Khronos press releases linked above contain a nice 1-paragraph summary of each extension.
They are all extensions to the existing glTF 2.0 metallic-roughness model (not e.g. to KHR_materials_pbrSpecularGlossiness, which presents a different PBR approach). Which is good news for X3D, as they'll be extensions to our PhysicalMaterial
then.
I do not yet have a timeline for when it will happen though. At least if it will be on my head -- I need time to play with them first, to understand the details of API and implementation, to decide how to express them in X3D.
I started speaking on one of our talks "these things, like transmission, are not available in real-time... oh wait, actually they are available, just not so easy" -- I was not able to go into details as I don't know them yet :) But it's definitely on my TODO list, both for X3D and CGE, to learn them :)
OK, given that X3D currently does not support them, and IFC references X3D, I'd say it's good to know they exist but we very likely won't consider them until at least after IFC 4.3 due to time constraints :)
+1 from my side
Upgrading this to decided from the verbal discussion on Monday. Also agreed upon that after IFC4.3 we can revisit this and take an even closer look. I've tracked this in the big issues thread so we don't forget :)
Schema changes:
Doc changes:
What am I missing?
I've done all the doc changes, just need to add PHYSICAL and that's it! :)
Credits to Ilkin, mentored by Jakob Beetz, and Michalis from X3D who have helped research, implement, and come to this proposal. However, I have just typed out this proposal, and they have not yet read it yet so do not assume they support this just yet :)
Further reading: https://community.osarch.org/discussion/877/understanding-how-textures-and-shaders-work-in-ifc
Current situation
The current IfcReflectanceMethodEnum used in IfcSurfaceStyleRendering references outdated, biased rendering techniques that provide limited value in the CG visualisation workflows. The current list is:
BLINN, FLAT, GLASS, MATT, METAL, MIRROR, PHONG, PLASTIC, STRAUSS, NOTDEFINED
This list of reflectance models (or lighting methods), were popular in the past when rendering was computationally expensive. Nowadays, they have limited value to artists, who have since moved on to physically based rendering workflows. For example, the last Blender release which supports these biased rendering workflows was in March 2018. Now, they are increasingly impossible to support.
Some of these reflectance models are also amgiuously defined. For example, "METAL" could refer to the proprietary 3DS Max "Metal" shader, or any other arbitrary app's implementation. Some have clearer definitions which can be replicated across applications: "BLINN, FLAT, PHONG, STRAUSS".
Proposal description
IFC currently references the VRML ISO standard for its rendering capabilities. VRML has been superseded by X3D v3.2 (which has already been referenced in IFC's texture classes). More recently, and what I will focus on, is that X3D v4 is now aligning its data model with glTF. I propose to update IFC's rendering and texturing capabilities to catch up and align to both X3D and glTF. This will make IFC compatible with modern artist workflows with existing ISO standards. IFC, X3D, and glTF will be compatible.
Doing this alignment completely with X3D and glTF is a big change which involves new IFC classes and attributes. This big change can be delayed until after IFC4.3.
However, especially given that nobody has implemented this so far properly, we can make a number of docstring changes that will get us some of the benefits of modern X3D and glTF workflows in IFC4 and IFC4.3 today. This is the "lightweight" proposal I will focus on today. This can be further supplemented with a separate implementation guide that I can help write (similar to the georeferencing user-guide) to help implementers.
There are three reflectance models that X3D and glTF use: Material, PhysicalMaterial, and UnlitMaterial (Note: TwoSidedMaterial) is deprecated. (source)
Assuming we do not add any enums or attributes and are only limited to docstrings, here's what we can support.
As you can see, there seems to be no equivalent X3D or glTF attribute for the IFC attributes TransmissionColour, DiffuseTransmissionColour, or ReflectionColour.
The lack of support for emissiveColor is not a deal breaker. IFC has existing lighting geometry for lights, and we can make the Tron building designs happy later. The lack of support for normal scale is also not a deal breaker. It simply means that artists cannot adjust the "bumpiness" of their normals. Artists can simply adjust the scale in their normal maps within the range of 0-1 for now. The lack of support for occlusion strenght has a similar workaround.
The existing docs also note how SurfaceColour could be treated as the ambient colour.
In practice, this does not make sense. The SurfaceColour is used in non-rendered real time viewport visualisations. This viewport colour and rendering attributes serve two different purposes, and IfcSurfaceStyleRendering and IfcSurfaceStyleShading are mutually exclusive due to the WHERE RULE, so this attribute cannot be reused in practice.
Also note the current entity description for IfcSurfaceStyleRendering refers to already removed IFC2X3 concepts like TextureType = bump. It needs to be revised.
Itemised list of docstring changes
Note: most of these docstrings are copy pasted from the X3D docs.
I propose to rewrite the entity description for IfcSurfaceStyleRendering as follows:
I propose to change the description of DiffuseColor to:
I propose to mark the following attributes as deprecated:
I propose to change the description of SpecularColour to:
I propose to change the description of SpecularHighlight to:
I propose to change the description of ReflectanceMethod to: