Arch materials

A forum dedicated to the Draft, Arch and BIM workbenches development.
User avatar
rockn
Posts: 1580
Joined: Wed Sep 28, 2011 10:39 am
Location: Toulouse, France
Contact:

Re: Arch materials

Postby rockn » Sat Jan 30, 2016 11:11 pm

Hello, I would to know if you have problems with Material Editor ? Like it does not take modification you done in it.
Step to reproduce :
Create a new doc
Switch to Arch WB
Create a new Material
At the Edit panel clic the Material Editor button
Choose a material (like Steel-1C35) in the list of the MaterialEditor
Clic Ok (this close the MaterialEditor)
Python report the Material Object look like an empty material.

Code: Select all

>>> obj = App.getDocument("Sans_nom").getObject("Material")
>>> obj.Material
{'ProductURL': u'', 'StandardCode': u'', 'Name': u'Material', 'Description': u'', 'DiffuseColor': u'(0.5019607843137255, 0.5019607843137255, 0.5019607843137255)'}
>>>
We expect to get the new material

Code: Select all

>>> obj = App.getDocument("Sans_nom").getObject("Material")
>>> obj.Material
{'Density': u'7800 kg/m^3', 'UltimateStrain': u'21', 'ModulusOfShare': u'81000', 'UltimateTensileStrength': u'480', 'PoissonRatio': u'0.3', 'StandardCode': u'', 'Description': u'Non-alloy quality steel', 'YoungsModulus': u'210000 MPa', 'DiffuseColor': u'(0.5019607843137255, 0.5019607843137255, 0.5019607843137255)', 'Norm': u'EN 10083-1', 'Name': u'1C35', 'ThermalExpansionCoefficient': u'1.10E-005', 'Father': u'Metal', 'DescriptionPL': u'Wysokogatunkowa stal niestopowa', 'NameDE': u'C35', 'YieldStrength': u'300', 'MaterialNumber': u'1.0501', 'AuthorAndLicense': u'(c) 2014 M. M\xfcnch - GNU Lesser General Public License (LGPL)', 'CardName': u'1C35 - 1.0501 - EN 10083-1', 'KindOfMaterialDE': u'Verg\xfctungsstahl', 'KindOfMaterial': u'Heat-treatable steel', 'ProductURL': u''}
>>> 
If you have the same problem, then this is a bug. You can try this branch, it fix the problem :
https://github.com/wood-galaxy/FreeCAD/ ... -materials
Formations et tutoriels FreeCAD en Français, soutenez moi : https://www.tipeee.com/formations-freecad
User avatar
yorik
Site Admin
Posts: 11566
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Arch materials

Postby yorik » Mon Feb 01, 2016 9:36 pm

There was a bug there indeed, the material editor always returned None, no matter the clicked button. I fixed that in another form: git commit 2688a2f
paullee
Posts: 1762
Joined: Wed May 04, 2016 3:58 pm

Re: Arch materials

Postby paullee » Sun Jul 10, 2016 4:48 am

Hi, I am testing the material editor.

I noted below and the blog about the colour characteristics but I can't get same effect.

I tested with an Structure object and shape colour e.g. set to blue, and set material to glass e.g. I search through the glass material with xxxxColour property and set it to gray e.g. But no colour change in the view. Anything wrong with my workflow???


http://yorik.uncreated.net/guestblog.ph ... complete=3
- Colors specified in materials will override object colors
- If an Arch object has a material, its color is automatically taken from the material color.


yorik wrote:Ok I just committed a first idea. Basically it works like this:

- All Arch objects now have a "BaseMaterial" property which is a PropertyLink and can link to a Material object
- There is a new "Add Material" button on the Arch toolbar
- When pressed, a new material is created, a task panel appears to load a material card and adjust some settings. You can also, from there, open the full editor from the Materials WB
- These materials are editable afterwards by double-clicking them in the tree
- These materials are always stored inside a "Materials" folder
- If you have arch objects selected when you create a new material, it will be automatically attributed to them. If not, you can attribute a material to an object simply by editing its BaseMaterial property.
- If an Arch object has a material, its color is automatically taken from the material color.

There is much space for improvement, but I thought this will already allow us to test and see how this kind of workflow behaves. Please test and tell me what you think!
paullee
Posts: 1762
Joined: Wed May 04, 2016 3:58 pm

Re: Arch materials

Postby paullee » Sun Jul 10, 2016 4:52 am

Yes indeed. I look around everywhere, find the command below (thought it is only accessible from console only, before I finally note this is the button :)

import MaterialEditor
editor=MaterialEditor.MaterialEditor()
editor.show()


OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.Unknown
Build type: Unknown
Python version: 2.7.11
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.8.0.oce-0.17

yorik wrote:I should actually change that icon... It is not htere to paste, but to open the full material editor...
paullee
Posts: 1762
Joined: Wed May 04, 2016 3:58 pm

Re: Arch materials

Postby paullee » Sun Jul 10, 2016 6:22 am

Hi, I am looking if, other than colour of shape and lines, material and texture could be applied and shown in the FreeCAD
damian
Posts: 583
Joined: Sun May 31, 2015 6:16 pm

Re: Arch materials

Postby damian » Sun Jul 10, 2016 8:31 am

Good morning @paullee:

FreeCAD support for materials and textures is in development. It will be more complete in the near future.

Through the GUI the options are a little bit limited. Using the python console and scripts you can do some things more.

Really FreeCAD has a big strength with materials and textures.
paullee wrote:other than colour of shape and lines, material and texture
I think that you mentioned every concept (material and texture of surfaces, lines and points) used by lighting visualization and photo-realistic render programs. It doesn't exists any more, I think so ... am I loosing any thing?

Are you looking for a particular concept, or simply do you want to know every option?

The FreeCAD ability for rendering is very limited and I don't wait too much improvements in this question. I prefer to make geometries and materials in FreeCAD and later, if I need a nice rendering, to use a specialized program (at this moment it never happen). Perhaps a higher rendering quality could slow down the freecad operation.

See you
paullee
Posts: 1762
Joined: Wed May 04, 2016 3:58 pm

Re: Arch materials

Postby paullee » Sun Jul 10, 2016 2:49 pm

Thanks. I start learning FreeCAD recently and testing for a few aspects like webgl (viewtopic.php?f=9&t=3914&start=110) mainly for architecture or interior disciplines.

It is nice to have colours on the models - the example in FreeCAD is already nice indeed (copy below).

I think if FreeCAD could also provide simple texture and materials, no meaning raytracing, it is already very nice to deliver a good re-presentation of the model materials (e.g. wood, stone etc.). SketchUp is able to do that, but it do not have the strength of FreeCAD I think. I think FreeCAD is not Blender, again FreeCAD can built model, like buildings, that Blender is not good to do.
Screenshot from 2016-07-10 22-38-09.jpg
Screenshot from 2016-07-10 22-38-09.jpg (104.83 KiB) Viewed 1209 times
damian wrote:Good morning @paullee:

FreeCAD support for materials and textures is in development. It will be more complete in the near future.

Through the GUI the options are a little bit limited. Using the python console and scripts you can do some things more.

Really FreeCAD has a big strength with materials and textures.
paullee wrote:other than colour of shape and lines, material and texture
I think that you mentioned every concept (material and texture of surfaces, lines and points) used by lighting visualization and photo-realistic render programs. It doesn't exists any more, I think so ... am I loosing any thing?

Are you looking for a particular concept, or simply do you want to know every option?

The FreeCAD ability for rendering is very limited and I don't wait too much improvements in this question. I prefer to make geometries and materials in FreeCAD and later, if I need a nice rendering, to use a specialized program (at this moment it never happen). Perhaps a higher rendering quality could slow down the freecad operation.

See you
damian
Posts: 583
Joined: Sun May 31, 2015 6:16 pm

Re: Arch materials

Postby damian » Sun Jul 10, 2016 4:45 pm

paullee wrote:FreeCAD can built model, like buildings, that Blender is not good to do.
I'm in FreeCAD for this reason.
Blender seems to be the most popular option for a finishing touch of a model created with FreeCAD.
In my case, I am more physical and I don't need this workflow.