Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieving Element Material #17

Open
andreghosn opened this issue Jan 4, 2019 · 3 comments
Open

Retrieving Element Material #17

andreghosn opened this issue Jan 4, 2019 · 3 comments

Comments

@andreghosn
Copy link

Can someone please tell me how we can extract the material of an element (color, alpha, transparent or not, etc. ) so it can be recreated in Unity? Thank you.

@Wolgraph
Copy link

Transparency is saved into the property set within the file. you can easily find it in the .ifcxml file.
I think textures depends on the material library in you modelling software.
I suggest you to create new materials in Unity, then you can check the material name in the xml file and assign the unity material depending on the name.

May I ask you how you managed to import Xbim libraries into Unity project?
I have this issue I must solve.
https://answers.unity.com/questions/1614112/integrate-xbim-tool-external-library-into-unity.html
Thank you in advance

@andreghosn
Copy link
Author

Hello,

Thank you for your reply.

Do you have some samples files or link showing how to get these properties?

Regarding using Xbim in Unity directly, I have not yet found a solution as there are some dependency issues. A potential workaround could be creating a separate parser and sending the data to unity via HTTP or some inter-process communication if the parser if local.

Hope this helps.

@Wolgraph
Copy link

If you parse the xml file, you can find the list of the materials with their ID.
Then you can parse the instances of the model and read the ref related to the material field.
Cattura

I've not done this yet, so I can't tell you if this makes sense.
I'm quite stuck with making Unity do anything I want him to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants