D3DXTessellateNPatches what does it do ?

I'm trying to figure out how to tessellate mesh...

I see many function in the microsoft site about this, but not much code sample...

http://msdn.microsoft.com/library/ url=/library/en-us/directx9_c/dx9_graphics_reference_d3dx_functions_mesh.asp frame=true

If I have 2 triangle that represent a square in a mesh
And that I use this function what will be the result

Will it cut both triangle into 2 more

I read about Tru-form that ATI use, it look like tessellate but hardware...

Nurbs, Rectangular patch, Surface Spline, Tessellate...is there any tutorial about this

it look promising for modeling rounded shape...

but not much help exist on the web...





Answer this question

D3DXTessellateNPatches what does it do ?

  • JorgeV

    Thank a lot for your answer

    That is exactly what I needed,

    I didn't understand what the number N was suppose to do

    So N=2 make 2 pieces of the edge, so only one vertex in the center of the edge

    I draw the N=2 and I see the 4 new triangle

    For the N=3, I need to add one vertex in the center of the base triangle...to get to 9
    It's probably Ok, I will try it this week end to see the result

    As for Tru-Form, it's ATI specific and I'll check if I can use it on my card or not

    Thank you very much


  • galwacco

    I read about Tru-form that ATI use, it look like tessellate but hardware...


    TruForm was only supported in hardware on the 8500. They went in a different direction with the R300 and up (9500+).

    Will it cut both triangle into 2 more


    I find the documentation to be reasonably clear. It will cut each edge into N pieces, where you can specify N (I don't know what will happen if you set N to a non-integer :-)

    Thus, if you specify N=2, each triangle will be cut into 4 triangles. If you specify N=3, each triangle will be cut into 9 triangles, etc.



  • D3DXTessellateNPatches what does it do ?