Cycles Standalone: Expose vertex normals and tangent space attributes in XML API #9

Merged
Brecht Van Lommel merged 1 commits from howetuft/cycles:tangents into main 2024-02-09 12:12:04 +01:00
Contributor

The vertex normals and tangent space attributes are not currently exposed by
the XML API, in the Mesh node. This notably prevents the XML API user
from applying normal maps to meshes in tangent space.

To overcome this situation, this commit adds three attributes to the Mesh node:
VN: vertex normals
T: tangents
TS: tangent signs

Nota: at the moment, these attributes are only available for non-subdivided
meshes.

The vertex normals and tangent space attributes are not currently exposed by the XML API, in the Mesh node. This notably prevents the XML API user from applying normal maps to meshes in tangent space. To overcome this situation, this commit adds three attributes to the Mesh node: VN: vertex normals T: tangents TS: tangent signs Nota: at the moment, these attributes are only available for non-subdivided meshes.
howetuft added 1 commit 2024-01-25 19:46:57 +01:00
The vertex normals and tangent space attributes are not currently exposed by
the XML API, in the Mesh node. This notably prevents the XML API user
from applying normal maps to meshes in tangent space.

To overcome this situation, this commit adds three attributes to the Mesh node:
VN: vertex normals
T: tangents
TS: tangent signs

Nota: at the moment, these attributes are only available for non-subdivided
meshes.
howetuft requested review from Brecht Van Lommel 2024-01-25 19:48:04 +01:00
howetuft requested review from Thomas Dinges 2024-01-25 19:48:04 +01:00
Author
Contributor

@brecht @thomasdinges

Hello guys,
Just in case you missed it... Many thanks in advance!

@brecht @thomasdinges Hello guys, Just in case you missed it... Many thanks in advance!
howetuft changed title from Expose vertex normals and tangent space attributes in Cycles XML API to Cycles Standalone: Expose vertex normals and tangent space attributes in XML API 2024-02-08 07:11:39 +01:00
Brecht Van Lommel requested changes 2024-02-08 15:27:08 +01:00
Brecht Van Lommel left a comment
Owner

For the XML attributes, can you use the same names as Attribute::standard_name?

For mesh->attributes.add, leave out the name, it should be filled in automatically to the standard name.

For the XML attributes, can you use the same names as `Attribute::standard_name`? For `mesh->attributes.add`, leave out the name, it should be filled in automatically to the standard name.
Author
Contributor

For the XML attributes, can you use the same names as Attribute::standard_name?

Sure! A question however: should I apply it to existing UV attribute as well? Attribute's standard name is uv (lower case) whereas current name is UV (upper case...).
It's been UV for years and may break some existing user's code, but you may find it more consistent with your request: just let me know...

> For the XML attributes, can you use the same names as Attribute::standard_name? Sure! A question however: should I apply it to existing `UV` attribute as well? Attribute's standard name is `uv` (lower case) whereas current name is `UV` (upper case...). It's been `UV` for years and may break some existing user's code, but you may find it more consistent with your request: just let me know...

For UV, you could support reading both the lowercase and uppercase perhaps?

For UV, you could support reading both the lowercase and uppercase perhaps?
howetuft force-pushed tangents from fe633936ab to 82b7c730c5 2024-02-09 06:41:05 +01:00 Compare
Author
Contributor

For UV, you could support reading both the lowercase and uppercase perhaps?

Yes, that's the best idea, thank you!

I've updated (squashed) the commit to meet your requested changes, it is at your disposal for merging if it's ok for you, or do not hesitate if you have any other request.
Many thanks in advance!

> For UV, you could support reading both the lowercase and uppercase perhaps? Yes, that's the best idea, thank you! I've updated (squashed) the commit to meet your requested changes, it is at your disposal for merging if it's ok for you, or do not hesitate if you have any other request. Many thanks in advance!
Brecht Van Lommel approved these changes 2024-02-09 12:10:53 +01:00
Brecht Van Lommel left a comment
Owner

Thanks.

Thanks.
Brecht Van Lommel merged commit bcea05423c into main 2024-02-09 12:12:04 +01:00
Brecht Van Lommel deleted branch tangents 2024-02-09 12:12:04 +01:00
Author
Contributor

Thanks to you!

Thanks to you!
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: blender/cycles#9
No description provided.