diff options
author | Clemens Barth <barth@root-1.de> | 2022-01-15 22:33:24 +0300 |
---|---|---|
committer | Clemens Barth <barth@root-1.de> | 2022-01-15 22:33:24 +0300 |
commit | efcceb62d4a85cbae1832e58c0d2019e9a405814 (patch) | |
tree | 853ad479dc71ae7d35d59c2634e701d341fbdb23 | |
parent | c00916b26b08cb5701974ffddadc6aba6c1e00f0 (diff) |
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.
-rw-r--r-- | io_mesh_atomic/pdb_import.py | 13 | ||||
-rw-r--r-- | io_mesh_atomic/xyz_import.py | 8 |
2 files changed, 14 insertions, 7 deletions
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 |