Geometry nodes - Picture Frame
Procedural Frame on Geometry Nodes.
This node setup is applied to a plane with an image, generating a frame around its perimeter. You can customize the moulding profile, width, glass presence, and more. The main settings are displayed in the modifier panel.
> FRAME PANEL:
- Material selection, mesh resolution (count of edge loops), frame offset relative to the image (Moulding Offset), Moulding Width and Height. You can also make Empty Frame and adjust the plane/picture depth relative to the frame.
> UV SETTINGS PANEL:
* If you're using simple/procedural textures without additional patterns (e.g., simple wood texture), you might not need these settings in most cases. They are useful if you need to adjust a specific design/pattern.
Key settings:
- Name UV - name for the UV attribute. A second UV map is created for the frame, and to apply the texture to the correct UV in shaders, use an Attribute node (instead of Texture Coordinate) with the desired UV name.
- Curve UV – enables curve-like UV mapping. This can be useful for solid wood textures, but it stretches the texture on the outer edges of the frame, which may distort patterned textures.
- There is also a setting for rotate UV and specifying the edge for the UV seam (does`t work with Curve UV).
- X\Y Offset and X\Y Scale for vertical and horizontal moulding are displayed in separate panels.
- Flip UV and Flip Offset are needed if the unwrap on opposite moulding is not symmetrical.
The first setting mirrors the scaling of the unwrap, the second one moves the reflected unwrap. The symmetrical scaling depends on how much the unwrap will coincide on the offset.
* Standard UV unwrapping in Geometry Nodes is quite unstable, and symmetry is lost and returned with any changes in geometry — thickness, depth, resolution, etc. Sometimes tweaking these settings can fix the UVs, but if not, the parameters mentioned above allow manual adjustments. I wanted the UVs to be distortion-free, but standard methods led to occasional glitches. If anyone finds a way to stabilize the UVs, write me an email (ne.edwardtodd@gmail.com). I’ll update this setup and credit you!
> GLASS PANEL:
- Here you can enable glass, adjust its depth, thickness, and material.
> THE PROFILE of the frame can be adjusted in the node editor in the Frame Profile block. Unfortunately, I couldn't bring it to the modifier panel, I hope to fix this in the future.