Comments (16)
Hello,
Yes, there are updates! I made a major improvement to materials, which now support textures. It is now possible to get some more realistic material, I made a proof-of-concept with the "Pabellon de Barcelona" (do you see the peebles under the water, the terrazzo tiles and the green marble?):
(click on the picture to enlarge)
I should have made an announcement in FreeCAD forum but I'm too lazy for that...
Should be possible get a measure of "light" reflected by a known surface under a known area light or other to get the ratio of power each render requires?
I my opinion, unfortunately, no. Lighting a scene is quite an art, you may google it to convince yourself.
However, I created two templates that should provide a ready-to-use lighting for most cases. They are called "studio"...
I would try your last update of the code but substituting all the github code at the same module in Mod I get errors.
My last updates should be available with the Addon Manager, did you try it?
Finally, if you need a tester for materials I could try.
Great! It would be a nice improvement to propose a material library.
from freecad-render.
Hello, thanks for so kind reply. Textures visible in your picture are in arch only or in all rendering? Any instruction to try them?
Is the update in picture the last one?
Are still correct the online instruction to add new materials and/or textures?
Best regards
from freecad-render.
Hello,
I got a look to the code you've added for green marble mat. Waw, what a lot of code. I ask myself if could be useful to write a procedure to "compile" all the steps required to add new mats and offer it as tool for.
from freecad-render.
Hello @claudiomush
Textures visible in your picture are in arch only or in all rendering?
Textures are available for all FreeCAD objects, not only Arch ones, as textures implementation relies on material feature, which is universal in FreeCAD. You can see another application I made for an assembly here:
https://forum.freecadweb.org/viewtopic.php?f=24&t=73513&p=643989&hilit=Render#p643989
Is the update in picture the last one?
Yes it is! Version 2022.3.0.
Are still correct the online instruction to add new materials and/or textures?
Yes, they should be, as I updated documentation before releasing. Do not hesitate to signal me any errors you could find, however.
the code you've added for green marble mat
Do you mean the FCMat file?
I ask myself if could be useful to write a procedure to "compile" all the steps required to add new mats and offer it as tool for.
Yes, a graphical tool might be more user-friendly. If you have some time and ideas for such a dev, you're welcome!
from freecad-render.
Oh, last sentence is too challenging but I could be "short" for that. Let me have a look on FCmat structure to understand how big this challenge. Every your suggestion was welcome of course. Just to start maybe writing a kind of template could help, but I imagine it should very useful a kind of immediate graphical object as test of the properties, even if not in a real time. That however should be repeated for every render engine. Mmm, not so simple.
from freecad-render.
Every your suggestion was welcome of course.
To get started, I would suggest you just to clone an existing FCMat (GreenMarble, for instance) and replace some statements with your customized ones.
To avoid polluting the workbench, you may rather put the cloned file in your user directory (type App.ConfigGet("UserAppData")
in FreeCAD Python console), in the Material subdirectory.
You may find some interesting textures here, for instance.
Just let me know the difficulties you may encounter.
from freecad-render.
Can someone update the issue name to reflect better what it's discussing? Does it also need to be split?
from freecad-render.
Every your suggestion was welcome of course.
To get started, I would suggest you just to clone an existing FCMat (GreenMarble, for instance) and replace some statements with your customized ones. To avoid polluting the workbench, you may rather put the cloned file in your user directory (type
App.ConfigGet("UserAppData")
in FreeCAD Python console), in the Material subdirectory. You may find some interesting textures here, for instance.Just let me know the difficulties you may encounter.
I've done some clones but picking Aluminium instead of GreenMarble and practice with/against configparser I see some problem with:
Render.Luxcore.0001 = scene.textures.%NAME%.type = fresnelpreset
Render.Luxcore.0002 = scene.textures.%NAME%.name = aluminium
Render.Luxcore.0003 = scene.materials.%NAME%.type = metal2
Render.Luxcore.0004 = scene.materials.%NAME%.fresnel = %NAME%
because of % in values that return error. Other mat's are fine, so a first step. reading, is done.
from freecad-render.
Sorry, about my previous message. That % problem is solved by a simple configparser setting. I'm thinking about a graphical layout for editing. Any suggestion's welcome.
from freecad-render.
Inside "[Rendering]" section of FCmat the option "Render.Type" must be the only one or one of several?
from freecad-render.
Hello,
Sorry, I missed your last post.
Concerning the %NAME%, it's a macro that represents the name of the material internally. It's only used in one particular case: passthrough. As a general rule, one should avoid passthrough, as it's not portable from one renderer to another and it requires to know renderer SDL. I just introduced some passthrough for aluminium for Luxcore as there is a specialized shader for that in Lux, better than the (standard) Disney one. In the future, I may introduce a "Metal" material type to avoid passthrough for metals...
Concerning Render.Type
, it is a unique statement with a unique value, to be chosen among Diffuse
, Disney
, Glass
, Substance_PBR
and Mixed
.
You can find explanations on each type in the help document here: https://github.com/FreeCAD/FreeCAD-render/blob/master/docs/Materials.md.
For textured materials, I specifically created the substance_PBR
. You can see the settings here: https://github.com/FreeCAD/FreeCAD-render/blob/master/docs/Materials.md#substance_pbr-material.
I would recommend to use it for classical textured materials (wood, stone etc.), as it matches the data you can find on public websites providing textures for Physical Based Rendering (like https://www.cgbookcase.com/).
Just another tip: : you can find all material types in the FreeCAD GUI. Just create a new material through the workbench (see 'Create material' command), and edit the render settings ('Edit render settings' in material context menu).
Let me know any obstacle you could encounter.
from freecad-render.
I'm now able to parse an FCmat file but that was the easiest part.
There are still a few issues I'm trying to wrap my head around.
I see that in Arch and Fem mod there are tools like the Mat Editor
(fig.) and in Render there is a different one (fig.). If I'm not wrong
they define different materials existing in different locations in
FreeCad. So there is more than one material database in FC.
Let's now look at rendering. It would be extremely useful to be able to
add custom textures, for the Substance_PBR section. Tweaking the
material's properties would require an instant visual feedback. It
would be necessary to have a fast render engine giving this feedback in
real-time while the user is tweaking values.
What do you think about that?
from freecad-render.
The forgotten two pictures...
and
from freecad-render.
If I'm not wrong
they define different materials existing in different locations in
FreeCad. So there is more than one material database in FC.
Yes and no.
Yes: Each workbench propose its own specialization of the Material object, adapted to its needs, with a dedicated GUI. So your feeling is understandable.
No: Render Material is just a subclass of Arch Material, so it is just an extension (the underlying data structure is strictly the same). Arch Material and Render Material rely on the same data structure, the same file format (FCMat), and they are stored at the same place in FreeCAD system.
It would be extremely useful to be able to
add custom textures
But you can add your own textures: right-click on the material and select Add Texture
item. For more details, see the documentation: https://github.com/FreeCAD/FreeCAD-render/blob/master/docs/Materials.md#textures
Tweaking the
material's properties would require an instant visual feedback. It
would be necessary to have a fast render engine giving this feedback in
real-time while the user is tweaking values.
Yes it would nice... but it's technically completely out of reach for me, I wouldn't know how to do it. Not to mention that it would have to be done for each of the renderers...
So I rely on (super)-users to find the good settings by trial and errors. And the second response is to propose a large rendering material database, so plain user just has to pick materials, not to tweak them.
from freecad-render.
Thanks for your precious comments.
from freecad-render.
from freecad-render.
Related Issues (20)
- Cycles renderer - skip_meshing and lights HOT 4
- LuxCore renderer does not accept AreaLight HOT 5
- Doc: detail renderer installations for Ubuntu and Windows HOT 8
- Doc: provide a test function for renderer installation HOT 1
- Cycles templates are strange HOT 5
- Cycles needing to be compiled standalone should be made more clear. HOT 29
- Adding materials seems to be broken in latest dev! HOT 14
- [Contest] HOT 3
- File name too long HOT 3
- [feature request] Add emmision material/shader HOT 9
- AttributeError: module 'Material' has no attribute 'MaterialManager' HOT 2
- Render.view.ViewProviderView not JSON serializable HOT 4
- handling of links to std::part broken. HOT 8
- [macOS] ImportError: No module named site HOT 1
- Cycles say: Color management disabled HOT 8
- make_material can't be caller with alpha in color HOT 1
- Editing Material try error HOT 1
- Using ArchMaterial beaks rendering
- appleseed don't render HOT 3
- Merge #358 breaks workbench (init needs to be updated too to reflect removal of set_a2p) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freecad-render.