Closed nyue closed 9 years ago
The vertex struct doesn't require anything special for normals - couple of questions:
The normals are not identical but visually the seems more 'aligned' in groups so I thought it might be related to normals not being interpolated within each ptex face.
Here is the raw csv file I dump out, you can use Houdini table import on the file
https://dl.dropboxusercontent.com/u/21295005/PixarOpenSubdiv/default.csv
The refiner is uniform (I adapted the code from glStencilViewer)
// Instantiate a FarTopologyRefiner from the descriptor
this->_refiner =
OpenSubdiv::Far::TopologyRefinerFactory<Descriptor>::Create(desc,
OpenSubdiv::Far::TopologyRefinerFactory<Descriptor>::Options(i_type, options));
// Uniformly refine the topolgy up to 'maxlevel'
// note: fullTopologyInLastLevel must be true to work with face-varying data
{
OpenSubdiv::Far::TopologyRefiner::UniformOptions options(i_maxlevel);
options.fullTopologyInLastLevel = true;
this->_refiner->RefineUniform(options);
}
How do I enable bi-cubic stencil ? or how do I enable or ensure there are patch-tables ?
Meanwhile, I'll poke around for the information.
Cheers
Answering my own question, I have now implemented the code closer to the glStencilViewer example and the visual faceting is not there anymore
// note: fullTopologyInLastLevel must be true to work with face-varying data
if (this->_bilinear)
{
OpenSubdiv::Far::TopologyRefiner::UniformOptions options(i_maxlevel);
options.fullTopologyInLastLevel = true;
this->_refiner->RefineUniform(options);
}
else
{
OpenSubdiv::Far::TopologyRefiner::AdaptiveOptions options(i_maxlevel);
options.fullTopologyInLastLevel = true;
options.useSingleCreasePatch = false;
this->_refiner->RefineAdaptive(options);
}
Thanks for the observation Manuel.
Cheers
So the stencils were in "bilinear" mode then - glad you were able to figure this out. I just looked at the stencil tutorial, which does the same uniform refinement. I'll try to add a few comments in there or spin an adaptive tutorial to show how to get proper limit stencils. We really need to flesh out this documentation...
Otherwise : ok to close this as resolved ?
Yes, please close as resolved.
Hi,
Using the glStencilViewer as a starting point, I modified it to printout the limit surface position and it's normal.
When I visualize them, the look faceted.
Is that to be expected or have I missed out implementing normal handling in the Vertex struct ?
Cheers