PixarAnimationStudios / OpenUSD-proposals

Share and collaborate on proposals for the advancement of USD
92 stars 25 forks source link

Autodesk: Update Text proposal according to comments #62

Open erikaharrison-adsk opened 2 weeks ago

erikaharrison-adsk commented 2 weeks ago

Description of Proposal

Update the proposal according to the comments.

We will focus on the schema in the proposal, not the implementation. So I removed the part about the Rprims, and also the plugins.

Add more detail about the SimpleText and MarkupText schemas. Add how the extents should be implemented.

Add the language tag for the textData in SimpleText and markup in MarkupText, and refer to the language proposal.

Add the "plain" tag for markup which is an alternate string when the markup can not be identified.

Remove the renderer property in SimpleText and MarkupText.

Change the name of the properties in TextStyle. Add altTypeface property which is used when the main typeface can not support some characters. Add details about the font weight.

The TextLayout and TextLayoutAPI are merged into one schema. The new TextLayoutAPI not only contains the character directions, but also contains the direction how the lines are stacked.

Modify the name of the properties in ColumnStyle. Remove the direction and linesFlowDirection property in ColumnStyle. Instead, you can apply a TextLayoutAPI to a ColumnStyle to specify the directions.

In the part of "Some implementation details", discuss the extrusion, the missing characters, the layout for complex script and the billboard.

Finally there is a big part of four examples.

Link to Rendered Proposal

Supporting Materials

Previous PRs:

Contributing

PierreWang commented 1 week ago

@meshula @dgovil @tcauchois @spiffmon This is the updated text proposal. I hope that all your suggestions are included. Please give me more comments if you have any concern. Thank you.

The biggest change is that I removed the detail about the rendering method. In original proposal we put most of the fragment shader code into getOpacity function, and the function is implemented together with a surface shader. It seems it is not the purpose of the material shader. So do you think that we should directly add a default and complete implementation in text.glslfx, and if the user would like to use a different implementation, they will modify the text.glslfx and add their own implementation?

meshula commented 1 week ago

Thanks for the update Pierre!

It seems it is not the purpose of the material shader. So do you think that we should directly add a default and complete implementation in text.glslfx, and if the user would like to use a different implementation, they will modify the text.glslfx and add their own implementation?

Yes, this is what I personally would hope for. The reason I want this (speaking from an end-user perspective) is that I personally would prefer to have exact control of text shading and rendition, with opacity and color being computed jointly in order that I may perfectly control aliasing.