Skip to content

Add shared materials across layers#36

Open
Gerard-Taulats wants to merge 1 commit into
aesc-silicon:mainfrom
Gerard-Taulats:Gerard-Taulats-shared-material
Open

Add shared materials across layers#36
Gerard-Taulats wants to merge 1 commit into
aesc-silicon:mainfrom
Gerard-Taulats:Gerard-Taulats-shared-material

Conversation

@Gerard-Taulats

@Gerard-Taulats Gerard-Taulats commented Jun 20, 2026

Copy link
Copy Markdown

Adds support to declare materials in the YAML presets and point each layer to a named material, or custom for it.

In the YAML file, add a new field "materials", then inside of it the material name, and then the material description like currently used per layer.

To assign a material to a layer, just write the material name.

For example:

materials:
  aluminum:
    color: [0.63, 0.64, 0.65, 1.0]
    metallic: 0.8
    roughness: 0.3

layers:
  Poly2:
    color: [0.18, 0.18, 0.16, 0.95]

  Metal1: "aluminum"

@Gerard-Taulats Gerard-Taulats requested a review from dnltz as a code owner June 20, 2026 12:25
Adds support to declare materials in the YAML presets and point each layer to a named material, or custom for it.

Signed-off-by: Gerard-Taulats <295358376+Gerard-Taulats@users.noreply.github.com>
@Gerard-Taulats Gerard-Taulats force-pushed the Gerard-Taulats-shared-material branch from cab6cfe to 44325ce Compare June 20, 2026 12:51
@Gerard-Taulats Gerard-Taulats deleted the Gerard-Taulats-shared-material branch June 20, 2026 12:57
@Gerard-Taulats Gerard-Taulats restored the Gerard-Taulats-shared-material branch June 20, 2026 12:58

@dnltz dnltz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a JSON validation schema at scripts/internal/color-schema.schema.json and it would fail as soon as someone adds those. How about updating import_gdsii/configs/colors/ihp-sg13g2/realistic.yaml to use this feature and extending the color schema? You can just ask Claude to update the schema according to the YAML file.

Comment thread import_gdsii/__init__.py

# Apply material
mat = create_material(f"Mat_{name}", color)
mat_name = color.get("mat_name", f"Mat_{name}")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we call this Color_ instead of Mat_ since it's not a material anymore.

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

Successfully merging this pull request may close these issues.

2 participants