Gajananan wrote:
You can see a topic called "PN-Triangles" in the following link:
http://castano.ludicon.com/blog/2009/01/10/10-fun-things-to-do-with-tessellation/Is this what you meant by N-Patches?
Yep, that looks like it. They talk about it as a built in feature of DirectX11, but as I said you can implement it in DirectX10 using geometry shaders. In fact, I believe you can do it in DirectX9 but only with certain ATI graphics cards. In case you didn't notice, there was also this link:
http://www.cise.ufl.edu/research/SurfLa ... /00ati.pdfGajananan wrote:
Unfortunately I can hardly see any change when I switch between those parameters. It will really be helpful if you can look into that code.
I've just been doing some terrain rendering and so I wanted smooth normals as well. I used the computeNormalsForVertices() function and it does appear there is a problem with it. Actually, I remember I was making some design changes and it looks like I didn't finish. I will fix this over the next couple of weeks, but it will probably involve other changes to PolyVox.
Gajananan wrote:
Regarding building smooth normal, further I would like to know if it is possible to access the information of triangle faces (which vertices form a face). According to my friend in our lab, it is possible to build smooth normal if we can have the information that we can get from an "OBJ" file. I believe you know the "OBJ" format.
Your friend is correct, but it doesn't work very well in the case of PolyVox. Although it appears that you have a single mesh, remember that PolyVox has actually generated a number of meshes (one for each 'region'). It does this so that when you modify part of the volume, only the meshes corresponding to the part of the volume that was modified have to be regenerated.
Your friends approach will work for vertices in the middle of the mesh, but those on the edge are not surrouned by triangles (there are only triangles on one side). The same vertex in the adjacent mesh will have triangles on the other side. Hence two adjacent meshes can have different normals for a vertex in the same position. This means visible seams can appear between the two meshes. I hope that makes sense...
Instead, the normal at any given position is calculated directly from the volume data.
Gajananan wrote:
In the mean time I would like to see if it is possible to do real time modification to voxel data and If I can see the changes in surface in real time.
Yes, you can look at that while I sort out the normal smoothing issues. Good luck!