[Bf-extensions-cvs] [efcceb62] master: The addon gets updated for Eevee/Cycles - part 3: vacancies, as described by an 'X' in PDB and XYZ files, are shown as transparent cubes. The properties of the transparency have been changed and are now much better ... . The user can certainly adjust these properties after the import.

Clemens Barth noreply at git.blender.org
Sat Jan 15 20:36:11 CET 2022


Commit: efcceb62d4a85cbae1832e58c0d2019e9a405814
Author: Clemens Barth
Date:   Sat Jan 15 20:33:24 2022 +0100
Branches: master
https://developer.blender.org/rBAefcceb62d4a85cbae1832e58c0d2019e9a405814

The addon gets updated for Eevee/Cycles - part 3: vacancies, as described by an 'X' in
PDB and XYZ files, are shown as transparent cubes. The properties of the transparency
have been changed and are now much better ... . The user can certainly adjust these
properties after the import.

===================================================================

M	io_mesh_atomic/pdb_import.py
M	io_mesh_atomic/xyz_import.py

===================================================================

diff --git a/io_mesh_atomic/pdb_import.py b/io_mesh_atomic/pdb_import.py
index 28f75b12..4c2f92c7 100644
--- a/io_mesh_atomic/pdb_import.py
+++ b/io_mesh_atomic/pdb_import.py
@@ -1380,9 +1380,8 @@ def import_pdb(Ball_type,
             # comparison of names ...
             if atom.name in material.name:
                 # ... and give the atom its material properties.
-                # However, before we check, if it is a vacancy, because then it
-                # gets some additional preparation. The vacancy is represented
-                # by a transparent cube.
+                # However, before we check if it is a vacancy.
+                # The vacancy is represented by a transparent cube.
                 if atom.name == "Vacancy":
                     # Some properties for eevee.
                     material.metallic = 0.8
@@ -1394,9 +1393,13 @@ def import_pdb(Ball_type,
                     material.use_nodes = True
                     mat_P_BSDF = material.node_tree.nodes['Principled BSDF']
                     mat_P_BSDF.inputs['Metallic'].default_value = 0.1
-                    mat_P_BSDF.inputs['Roughness'].default_value = 0.2
-                    mat_P_BSDF.inputs['Transmission'].default_value = 0.97
+                    mat_P_BSDF.inputs['Specular'].default_value = 0.15
+                    mat_P_BSDF.inputs['Roughness'].default_value = 0.0
+                    mat_P_BSDF.inputs['Clearcoat Roughness'].default_value = 0.37
                     mat_P_BSDF.inputs['IOR'].default_value = 0.8
+                    mat_P_BSDF.inputs['Transmission'].default_value = 0.6
+                    mat_P_BSDF.inputs['Transmission Roughness'].default_value = 0.0
+                    mat_P_BSDF.inputs['Alpha'].default_value = 0.5
                 # The atom gets its properties.
                 atom.material = material
 
diff --git a/io_mesh_atomic/xyz_import.py b/io_mesh_atomic/xyz_import.py
index 96bf7913..16241c0e 100644
--- a/io_mesh_atomic/xyz_import.py
+++ b/io_mesh_atomic/xyz_import.py
@@ -537,9 +537,13 @@ def import_xyz(Ball_type,
                         material.use_nodes = True
                         mat_P_BSDF = material.node_tree.nodes['Principled BSDF']
                         mat_P_BSDF.inputs['Metallic'].default_value = 0.1
-                        mat_P_BSDF.inputs['Roughness'].default_value = 0.2
-                        mat_P_BSDF.inputs['Transmission'].default_value = 0.97
+                        mat_P_BSDF.inputs['Specular'].default_value = 0.15
+                        mat_P_BSDF.inputs['Roughness'].default_value = 0.0
+                        mat_P_BSDF.inputs['Clearcoat Roughness'].default_value = 0.37
                         mat_P_BSDF.inputs['IOR'].default_value = 0.8
+                        mat_P_BSDF.inputs['Transmission'].default_value = 0.6
+                        mat_P_BSDF.inputs['Transmission Roughness'].default_value = 0.0
+                        mat_P_BSDF.inputs['Alpha'].default_value = 0.5
                     # The atom gets its properties.
                     atom.material = material



More information about the Bf-extensions-cvs mailing list