Skip to content

Use mesh UVs when exporting displacements#101

Open
wouterpleizier wants to merge 2 commits intobonjorno7:mainfrom
wouterpleizier:displacement-uvs
Open

Use mesh UVs when exporting displacements#101
wouterpleizier wants to merge 2 commits intobonjorno7:mainfrom
wouterpleizier:displacement-uvs

Conversation

@wouterpleizier
Copy link
Contributor

Allows displacements to be exported using the UV coordinates of the original mesh, just like brushes. The previous behavior (auto-generated UVs) is still used when the mesh has no UVs, e.g. the leftmost displacement in this image.
Blender/Hammer comparison

get_texture_size and calc_uv_axes have been moved to a new file as they're now used by displacements and regular brushes alike. The latter has some small changes to account for the fact that it now expects vertex/UV coordinates rather than an object/bmesh/face, but as far as I can tell it should still work the same way for brushes as it used to.

Displacement UVs should now be processed/exported the same way as regular brush UVs. For displacement meshes without UVs, the exporter will fall back to the previous behavior (auto-generated UVs).
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.

1 participant