# face resolution scaling

62 views

### Don

Jun 16, 2011, 3:08:47 PM6/16/11
to ptex
Im just implementing varying face resolutions in my ptex baking code
and want to implement the 1 / max (dP/du) scale factor mentioned in
the paper. The partial derivative of P is a tangent vector along u
right? What is the max operator in this case?

Thanks
Don

### brentb

Jun 20, 2011, 10:58:23 AM6/20/11
to ptex
The max refers to the max of the length of the partial derivatives.
Also, I think the scale factors should not have been inverted. The
scale factors, su and sv,represent object-space-units per face, and
the global texel density, rho, represents texels per object-space-
unit; the product is texels per face. Sorry for the confusion.

Brent

### Lixuan Zhu

Nov 10, 2014, 12:31:31 PM11/10/14
http://disney-animation.s3.amazonaws.com/technology/opensource/ptex/ptex.pdf
The inversion is mentioned in your paper (section 5) above.

It is used to compensate the stretching of control surface on the final limit surface( caused by subdivision rule ).

Could you please explain the reason behind choosing max norm of derivative? Because I find it not very obvious to me.

Best regards,
Tyler

### Brent Burley

Nov 10, 2014, 1:02:26 PM11/10/14
It's not the max norm but the max of the length (L2 norm); the max is over all the points being sampled.  The point where the derivatives are the largest represents the point where the texture parameterization is the most stretched and this is the point where the texture resolution is calculated.  Does that answer your question?

Brent

### Lixuan Zhu

Nov 10, 2014, 1:53:21 PM11/10/14

There are many ways to choose sample points and do the calculation.

You found that you mentioned in the previous post:
One possibility would be to subdivide the surface some number of times
and then measure the length of each edge.  The edges will naturally be
"U" or "V" edges aligned with the Ptex texture parameterization.  You
want to size the texture for each face based on the longest of the U
and V edges.

I will just use this method.

Best regards,
Tyler