IFC Materials mysterium
I am still a Blender and Bonsai newbie.
When I import an IFC into Blender, I will always get multiple versions of the same "Material".
Having Multiple Material Assignments, applied to multiple Objects, would make sense to me.
But having multiple non-instanced copies of "same" Render Materials would not make any sense to me.
How could I ever control, handle or update my e.g. Brick Material, when I get n times Walls,
(which use that Material) copies inside Blender
What kind of IFC "Material" are we talking here in Bonsai exactly,
"Render-Material-Definitions" or "Material-Assignments" ?
Currently in Bonsai it look like this :
While for Blender Materials it looks like this !? :
So how it is meant to work with IFC Materials for Viszaulization purposes in Blender ?
Is there a way to re-combine these Material Copies into a single Instance in Blender ?
Should Bonsai do this initially when loading an IFC ?
Comments
And to go a bit deeper,
The IFC4.0 was Exported from Vectorworks
As I see the Naming, all my Materials have my "BM- " Prefix.
So it was derived from my VW "Building" Materials - so kind of "IFC" Materials,
not from my "Render" Materials, which usually have have a "RM-" prefix to differentiate.
Like with Bricscads "Materials", these are "Building" Materials, containing primarily
technical information - but can also include a "Render" Material Assignment.
These Building/IFC Materials are usually assigned to Components of BIM Objects.
Like in multi-ply Wall/Slab/... "Styles" (VW) or "Compositions" (Bricscad) while
custom Solids would just get a Render Material only applied by Object or Layer.
So I would have expected that my IFC Material "BM-BRICK-RED" would import
a "RM-BRICK-RED" Render Material in Blenders Material List,
but all I see is this :
How should I work with unnamed and redundant Material copies ?
I can not guarantee for Vectorworks IFC Export
(I already see that especially some single-ply Walls lost their Material and use "Default"
and there were some strange extra Geometries exported that do not exist in VW !?)
and have not yet tested Bricscad Exports.
But I am so far not sure where the problem starts between VW, Bonsai and Blender.
I would also welcome any "general" tips or workflows on how other
people deal with Materials while CAD/IFC to 3D conversion.
With the following utility, you can merge duplicate materials & styles....

When you click on the following, it's the 'style' that's applied to the object, not the material.
Typically a style is connected to the material, and then the material is connected to the object.
style --> material --> object
you can also apply a style directly to an object's geometry.
style --> object
So in your particular example the
4394
style is probably applied to theBM-BRICK-RED
material.And it's the
BM-BRICK-RED
material that's assigned to the object.Yes, it's confusing. :)
from AI...
In IFC (Industry Foundation Classes) terminology, materials and styles serve different roles in defining the physical and visual properties of building elements:
Material
Style
IfcSurfaceStyle
orIfcCurveStyle
, which define how an object appears when rendered in a 3D view.Key Differences
In practical terms, both materials and styles can be essential for different phases of a project, with materials primarily supporting technical and structural needs, and styles enhancing readability and aesthetics in digital or printed presentations.
And if I can offer something who has recently gone through this... Stop using Blenders materials panels while in Bonsai. Try to purge Blenders materials from your brain while using Bonsai. It just causes confusion.
Have a separate regular .blend file for creating any blender material that you want to use in a bonsai style that might be applied to a bonsai material. Clear? 😆
Thanks all a lot for answering !
Sorry for the delay !
My Forum settings promised eMail notification, which did not happen.
I just came back after I made some progress with Materials in Bonsai/IFC
while I was examining different IFC version Exports from Vectorworks
and Bricscad.
I think I got the Material definitions, as @theoryshaw has mentioned.
IfcMaterial = BIM or Building Material = Data/Information
IfcSurfaceStyle = Render Material = Blender Material
and
IfcMaterialConstituentSets = "Styles or "Compositions
For Vectorworks, my Wall/Slab/... "Styles" where I define single or multi-ply
Styles, where Components get a BIM "Material" assigned,
which also has a Render Material attached.
For Bricscad that likewise would be "Compositions", single or multi-ply,
which get a "Physical Material" assigned,
that again has a Render Material attached.
(Unfortunately Bricscad does not export IfcMaterialConstituentSets)
Unfortunately, Vectorworks does already duplicate the IfcMaterial !
n times "IfcMaterialConstituentSets" where it is in use (?)
And again duplicates "IfcSurfaceStyle"
So 65 MatConstituentSets > 288 IFC Materials > 600+ Surface Styles
(that is useless)
Bricscad does not duplicate the IFC Materials !
Fine. But also duplicates Surface Styles.
21 IFC Materials > 53 Surface Styles
(so less bad but still far from good)
This tip helped a lot a lot !
BTW;
seems like a Bonsai 0.8.1 feature, deleting Materials is not yet available
in my 0.8.0 versions. But I found it in my 0.8.1 in my Blender 4.4 Alpha !
Bummer !
Not yet clear, but I think I get the direction ....
But replacing or overwriting imported Materials, and keeping overwritings when
IFCs get re-imported or updated, would be my next BIG thing.
But I have to put that behind vor now ...
binsai can export IFC files to BRICSCAD but "how does the Compositions pass?"
If you can attach a Bonsai IFC I could check .
When I import an IFC 4.0 from VW, into Bricscad, Composition translation looks really poor.
Beside Composition's and Ply/Material's Names - I get nothing.
No Ply thicknesses, No Material data, No IfcSurfaceStyles, No physical data, ....
Ahm,
why ? What's the problem exactly ?
???
Do you mean having a Master Visualization Blend File, and linking a saved Blend File from a Bonsai IFC Project File or something like that (or Append (/Reuse)) ?
But how do I get control over duplicated IfcSurfaceStyles ?
(I think this is a lack in IFC standards, not a bug in all IFC importing Apps that could be fixed by IFC importers ?)
If you are working as recommended with only an .ifc file, then when you save, any tweaks you made to blender materials are not saved. This is why you create and edit them as an external .blend file. More advanced users have the option to save both .ifc and .blend files of their project. But there are apparently some issues with synchronisation between the two files causing issues, and the general advice is to stick with .ifc.
Yes. Create a normal blend file, set up your Blender materials on dummy (default cube?) objects, then save it as a .blend. Then in your opened .ifc file, use the Styles, External option to point towards this Blender material. e.g.

(Or don't bother, and just use IFC compatible materials, but they are limited in what they can do, especially around texture mapping.)
My suggestion had nothing to do with this bit. I think you got the necessary tips up-thread for that. I was just suggesting you avoid using Blenders own materials panels while working in Bonsai, because of the confusion (Bonsai material =/= Blender material, Bonsai styles ~= Blender materials, Bonsai styles -> Blender materials) and the fact that changes to the Blender materials would not survive an application restart if you are following advice on working solely with .ifc files for your BIM project.
For what it's worth, we created a blend file with a bunch of material definitions that we pull in via 'external styles'.
https://hub.openingdesign.com/OpeningDesign/OD_Textures
A lot of the textures are open source too, pulled from: from, https://ambientcg.com/, https://polyhaven.com/, and https://www.sharetextures.com/
And that is where I learned how to do it! :-D
OMG,
Thank you very much !
I look into it - but will need to look a bit deeper.
BTW,
Great projects. And I am very pleased to see that "FreeCAD BIM" Yorik is also on board.
Thank you very much also @sjb007 !
I still don't get eMail notifications (anymore). Got them in the past for the Welcome to OSArch Thead in the past but that does no more work either ....
Got it.
I also read about saving/synching a Blend File beside the IFC Project but never really got that working.
So if it is not reliable anyway ....
Wouldn't it be possible to just assign a fake user (yes, error prone) or will it not offer the Materials "assets" for linking ?
Boah, have to learn/read into this first .....
I wasn't even aware of that. So far I thought, beside BIM Tags, these were just standard Blender Materials ... ok.
Could be that this limitation might not be a problem for me, but have to look into those limits.
In Architecture, 95% of my Materials would just need a repeating/Tiling Box projections with an origin and a Texture Size. E.g. a Brick Texture where I count the Bricks, set the Texture size according to the n*Brick grid, maybe adjust the origin and my building would have a perfect Brick layout over all Walls over the whole building. But Artist friendly 3D Apps often make a tedious UVW setup mandatory.
If it is about other limits, I will see if it is applicable or not.
I think so far my best CAD/BIM to Blender Exchange so far is by IFC.
(Beside I am testing all other Import/Export Options between all my Apps, VW/Bricscad vs C4D, Blender and Modo in all combinations)
But as doing mainly ArchViz, duplicated Materials is a Nightmare and for me there is no solution at the horizon. I usually get really large IFC, or worse RVT, Files where Materials are already duplicated because of use of library elements , from different languages, .... like Edelstahl , stainless steel, Stainless ....
So having a linked Blender Material, linking my own Edelstahl to all these IFC duplicates sounds tedious but better than nothing. In Modo I would have just selected all these Objects by those Materials and dumped them into a single Mesh, but that may have other disadvantages.
If I get updated source files, I may be screwed ....
So thanks you all very much,
I will need to get into it and more familiar with Blender vs Bonsai ....
I suppose so. I just like having a visualization in the 3D view so I can work on the materials there, and see the "palette".
Yes and no. The Bonsai style is converted into a hidden Blender material "under the hood"(1), but it is limited to what the IFC format styles permit, and that is where the limitation is. IFC styles permit a small subset of what full Blender materials are capable of. If you've ever looked at a really complicated Blender material node tree, none of that clever stuff is possible. By externalising the style to point to the Blender material, you get access to a lot of that goodness. It will still cause some speed bumps. Getting textures to map onto your elements is still a bit "Russian roulette". I've had to do several tweaks to downloaded Blender materials to get them to look good, i.e. usually some combination of the following:
1. Switch the Texture Coordinate from UV to Object
2. Adjust Mapping scale
3. Switch Texture projection method to Box
4. Switch the Normal Map from Tangent to Object space
5. Remove displacement maps (the geometry isn't dense enough, and it causes issues with low poly geom, causing open seams at corners.
(1) Don't make the mistake of thinking you can tweak these "under the hood" materials and save them as part of the IFC file. I don't think they are preserved in any way, and will be created fresh from the styles when loading an IFC in.
You would scale the Blender material in the external file until it matches the real physical size. Not sure about setting the origin. I think you'd have to experiment. It depends on how precise and exact you need to be. For my needs I think I got close enough, and precision wasn't really a requirement! :-)

The steps I mention above avoid the need for UV maps, but they can cause their own quirks. i.e. rotating objects often cause textures to stretch or slide around on the surface.
I can't really help with that side of it. I'm working in isolation, only in Bonsai, so easy life. If you have Python skills I would suggest you might want to learn and use the IfcPatch program facility. You could write a recipe where any file you get spits out a list of unknown material/styles, and then you have a mapping file where you add them to the "blessed" one. Then once everything is mapped, a second IfcPatch program changes the variety of entries into consistent ones. It's not something I've looked at, but here's a link to the included patch recipes for inspiration: https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.8.0/src/ifcpatch/ifcpatch/recipes
Or maybe someone else around here has experienced the same kind of pain, and has already created a solution.
Thanks again for the insights.
That sounds pretty much like a setup for the simple Box Mapping I am looking for.
I think I got it.
OK, can I anywhere see what the limitations and allowed features are ?
I do not really like the redundant abstraction and bad legibility of Nodes anyway.
I usually set up my Materials in Properties Panel so far. I everything inside there is my allowed playground for IFC I would be fine.
I think that may be a long term target ..... I'm jealous.
Hahah, I am a black hole in terms of any programming skills :)
I am doing mainly Visualization so I do not get directly paid for BIM.
But somehow I always preferred to work by CAD Solid Modeling tools and/or parametric architectural tools vs plain Mesh Modeling for Architecture. So BIM is a hobby. That is why I switched from pure CAD Modeling or 3D Mesh Modeling from Microstation and 3DSMax/Viz or Modo to Vectorworks + C4D and later added Bricscad. So far I pay for both, VW and BC, and like their quite opposite workflows. (VW BIM Tools vs BC Direct Modeling and AI supporting BIM) The only problem with this workflow is that lossy exchange to 3D penalty.
In the past I got pure 2D DXF drawings and did a 3D Model. But nowadays I will get already IFC or RVT 3D Models - usually not well suited/organized for Visualization purposes. So the main job was always to clean up and organize the projects first. That is where I do not yet feel as comfortable in Blender so far as I did in CAD or Modo.
https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/ifcpresentationappearanceresource/content.html

Those sections deal with the IFC limitations. As far as I could tell, all that is available in Bonsai. I'm not aware of an actual page comparing them side by side. Sticking to IFC would probably be the way to go for interoperability with other applications (assuming everyone is standards compliant).
They have their uses.
Even the Blender properties panel (you meant Blender properties, right?) is just a sequence of panels giving a simplified view of a node structure. You're still using nodes. Even the IFC styles are in reality using nodes underneath. The risk is you do something in the blender material properties that isn't propagated to the IFC style, then when you save & reload your IFC file the changes are lost. That's why your best choices are a) stick with the styles panel in Bonsai, or b) put your materials in an external blend file and point the styles to them.
Well I'm just a non-professional DIY'er with his own little rinky-dink personal project, who felt let down by his original architect. Unless I can get something through planning (Curse their black-hearted souls!) I have zero need to collaborate with anyone.
So get learning! Seriously, Python is probably one of the easiest to learn, and there's tons of resources out there. Bonsai is Python, Blender uses Python for extensions, Python has replaced BASIC as the de-facto beginner programming language, it's in tons of stuff.
The issue is that proprietary applications have a very real financial interest in holding you (and anyone you need to collaborate with) hostage. There is no economic incentive for them to provide easy and reliable data transfer to other organisations applications, because you might just find you no longer need to pay their expensive recurring subscription costs. So they will pay lip service, provide half-baked import/export which often requires paying some nice fat consultancy fees on top to get some other tool to fix the "incompatibilities" with import/export, instead of just ensuring compliance to the spec. In the meanwhile, they will hard sell you on this other piece of software they have that replaces that other application you were trying to use, and surprise-surprise, their own software applications communicate perfectly using their closed, proprietary file format/protocol. They might even give you a discount on that second tool as a "valued customer". Not that I'm a cynic or anything...
I see that exactly the same.
But all my commercial Apps did help a lot, made some fun and they were "affordable" over many years. Which startet to change drastically for most of these during the last few years. Like going Subscription only, increasing yearly fees and slowing down development. Or recent Foundry killing Modo.
But so far, modeling, repairing, file cleaning and management in Blender and Bonsai, doesn't yet feel that easy, comfortable and fast for me.
So far, at least Bricscad is still (that will likely change in the not so far future) on the better side.
Pardon for hijacking my own thread ....
Blender Unit Standard is meter (and Z's up and Y positive) which is great.
Modo or VW is totally unit-tolerant, C4D standard is cm, .....
Bricscad unfortunately is millimeter (not mandatory ... but reasons ... ) and so it will save IFC's in millimeter units.
But I do want to work in Blender or Bonsai in meters.
Is there a way for Bonsai to open/convert a millimeter IFC - to (work in) meters ?
I fear a bit to hear the answer ...
Scaling (and hierarchies by using Empties) are a general annoyance for me since all my current import attempts. (So far beside USD or IFC, I will always getting in "Empties" instead of "Collections", and Empties are PITA in Blender)
Most of my Imports into Blender need Scaling and/or Rotation. And Import Scaling/Rotation will finally go into the Blend File. This manifests at best in the most top Empty, but that does not help, at the end, after all tedious "un parenting" - it just goes down into every single Blender Object - and does provoke all kind of issues.
"Apply" transforms and "delta" transforms are theoretically doable - but exceptionally tedious and user error prone in Blender.
Did not yet find how to do that.
But will ....
keep that in mind.
How to use external styles.
Attached an example.
^ Great !
have to get used to it.
I think I got it.
It took a while but I think I got closer.
So if I got that correct, if I edit in Bonsai Material Settings, I am on the safe side.
And for me it looks like I could set up Shaded View appearance and already a quite reasonable or complete Base PBR setup for rendering.
Just not sure about how the Texture and UV offers will work.....
OK, saving a Blend file from a Bonsai project would just be a Snapshot of the current IFC state .... and this Blend file should never be used together with the IFC/Bonsai again.
If I get that correct, therefore for a Visualization Project, I would need :
BLENDER VISUALIZATION FILE
(Master File with Render Setup, Cameras, Lights, Entourage, ...)
BONSAI IFC FILE
BLENDER MATERIAL LIBRARY FILE
(to link into BONSAI's IfcSurfaceStyles and append to BLENDER VIZ FILE)
BLENDER BONSAI SNAPSHOT/TRANSFER FILE
(current state, to link into the BLENDER VIZ FILE)
Otherwise I would need IFC tag each custom Blender Object, like plants or furniture, so that they get saved by Bonsai - but would be limited by IFC limits.
But that could work in cases where I am the "owner" of the IFC BIM Model.
What in cases where I get multiple BIM part Model and/or Updates/Versions ?
During the last larger Projects I got about ......
If I get that correct, all my IFC adaptions/optimizations, like IfcSurfaceStyle's externalisation work would be lost if I load an updated IFC (?)
(I tend to think it would be a great idea if Bonsai would make full use of Blender, sync Blend and IFC files and save e.g. all non related data, like Material externalization, inside the Blend file. Opening either the Blend or IFC file could open its partner)
Correct, unfortunately.
However, I don't think it would be a huge task to write a script that runs through these past external style assignments, and reapplies them to the newly updated IFC model.
Unfortunately ifcmaterials don't have GUIDs, so the script would have to rely on IfcMaterial names. (maybe there's a more clever way to do this).
The problem however, is when the IfcMaterial name changes from IFC version to IFC version.
I don't think IfcSurfaceStyles usually would change much, but there likely will come in new ones, that will need to be found - to externalize.
Now I am a bit confused.
I updated/re-exported my IFC from Bricscad again ....
(generated some 2D Drawings - BTW, they did not come into Bonsai)
So I started from a new Blender File to load the IFC 4.0 again, upgraded to 4x3 and saved the Project. In Finder I realized, that when saving the IFC with its 4x3 Suffix, Bonsai also created a Blend File with the same name automatically !?
Is this standard or just that I screwed up my settings so that I activated that forbidden Bonsai/Blender sync in any way ?
Also I always have my *.blend and a *.blend1 duplicate with same date.
So far I thought this is a Bonsai thing (Blender sync or so) but it looks like it happens for pure Blender files too (?).
While my Blender Backup directory is set to the local drive and Blender does creates Backups with time stamp there as expected.
In general i would not recommend using ifc4x3, as some functionality does not have support yet with Bonsai, as i understand it.