Odd 'facetted' anisotropic reflection

   1626   10   3
User Avatar
Member
379 posts
Joined: Aug. 2018
Online
Can anyone educate me as to why I'm getting this 'facetted' shading effect? It's the absolute minimum scene - just a standard poly sphere with normals and UV's in Karma - with a basic anisotropic material as shown in the screenshot. Scene attached if you want to take a look - stick any HDRI in the domelight.





Image Not Found
Edited by Mike_A - March 3, 2025 16:59:12

Attachments:
anisotropic.hiplc (928.4 KB)
Screenshot_2025-03-01_203205.jpg (375.0 KB)

User Avatar
Member
14 posts
Joined: Feb. 2023
Offline
Hi

Add a PolyFrame before the output in obj.
Change the style to TextureUv
copy the "tangentu"

go into the shader

create an "USD primvar reader"
Change from float to float3
paste the "tangentu" into var name.

connect this into the mtlxstandard_surface's tangent (its in the geometry under the normal)
User Avatar
Member
379 posts
Joined: Aug. 2018
Online
Ai-Fusion,
Thanks for the response. I'm slightly embarrassed TBH as I've been intending to 'self-respond' to my post for about a week, as I found the solution after some more investigation and trial and error - pretty much exactly as you suggest. I think I used a 'geompropvalue' rather than 'primvar reader' - but essentially the same. I wasn't sure that my solution was the 'technically correct' - but it worked, so it's good to have your confirmation of the same. Many thanks!
Edited by Mike_A - March 10, 2025 15:43:12
User Avatar
Member
650 posts
Joined: Aug. 2014
Offline
You can also further improve the result by slightly blurring the tangents.
Mike_A
(...) I think I used a 'geompropvalue' rather than 'primvar reader' - but essentially the same.
IIRC, tangents loaded with geompropvaluewill work only on Karma CPU. Last time I checked, this was the case.
Edited by ajz3d - March 10, 2025 16:53:30

Attachments:
anisotropy.hiplc.tar.gz (72.9 KB)

User Avatar
Member
379 posts
Joined: Aug. 2018
Online
Interesting - I think the geompropvalue worked for me with XPU - but I'd need to check.
User Avatar
Member
9276 posts
Joined: July 2007
Offline
Id expect the generated auto Tangent as well as MtlX Tangent to be able to create useful tangents or at least to have an option to do smooth tangents perpendicular to smooth N rather than just to geometric N

It works well on Subd Surface but then there seem to be issues on seams

So I'd consider it a bug unless there is another reason for it to look like that
Passing additional primvar that is literally just doing what default tangent or MtlX Tangent should be doing seems like a workaround rather than intended workflow
Edited by tamte - March 10, 2025 20:56:11
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
379 posts
Joined: Aug. 2018
Online
Thanks Tomas. l'll drop a report and this sample file to support and report back.
Edited by Mike_A - March 11, 2025 05:03:16
User Avatar
Member
379 posts
Joined: Aug. 2018
Online
I raised this with support - asking if it was a bug, or expected behaviour. Here's the reply:

From our developers:
Yes, it is expected behaviour. The default tangent vectors are defined as change in position with respect to change in UV, but if the geometry itself has facetting due to lower poly nature (you can check geometry normals (Ng) AOV to check), then the tangent vector will be discontinuous as well and thus the highlights will also be discontinuous. By using Polyframe SOP and averaging the tangents across shared vertices (or using point attributes), it's no longer "tangents" in the geometric sense, but allows you to have smooth/continuous tangent vectors.


This seems rather bizarre to me - although typically Houdini. While I can understand the 'technical accuracy' of this approach, I really can't understand it from a user experience perspective. The whole approach to polygon modelling / rendering is one of (relatively) 'low polygon' meshes + normal smoothing, so it seems bizarre to me that this result is based on geometric rather than smoothed normals...

Maybe there are users who actually want this 'facetted shading' effect (????), or maybe there are users who just enjoy the extra work the current setup involves...
Edited by Mike_A - March 12, 2025 13:30:13
User Avatar
Member
9276 posts
Joined: July 2007
Offline
That seems like a pedantic response

Pure eometric normals are mostly useless for shading that's why renderers support smooth normals either automatic or custom

In the same sense they should be able to compute smooth tangents, and I bet most renderers do

But regardless, with Poly frame tangents I still see issues on seams when Subd is on
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
1 posts
Joined: June 2022
Offline
Thanks for this solution, it seems to help with setting up shaders with high anisotropic values for shiny effects.
This is one of those things where it works just fine in Blender, but the moment you port it over to Houdini via a USD or FBX file, you get that facetted problem. That this is something to be mindful of at all is very frustrating.
User Avatar
Member
379 posts
Joined: Aug. 2018
Online
I would suggest you send an 'RFE' - a 'request for enhancement' - via this form to mark this as an area for improvement:
https://www.sidefx.com/bugs/submit/ [www.sidefx.com]
Edited by Mike_A - Sept. 23, 2025 09:17:40
  • Quick Links