The tangent and bitangent are derived using a calculation like this:
http://www.terathon.com/code/tangent.html
Male
Posted by Eric Lengyel
on 04 May 2013 - 11:32 PM
The tangent and bitangent are derived using a calculation like this:
http://www.terathon.com/code/tangent.html
Posted by Eric Lengyel
on 22 April 2013 - 11:51 PM
another alternative is the transvoxel algorithm by E. Lengyel, though I am not sure if it's patented, it is iirc
The Transvoxel algorithm is not patented. More information here:
http://www.terathon.com/voxels/
In general, a correctly implemented Marching Cubes algorithm generating a mesh with a single LOD will only produce cracks if it doesn't have a consistent way of choosing polarity for the so-called "ambiguous cases". This can be solved by using a fixed polarity based on corner states or some face-level choice function as used in the MC33 algorithm. See Section 3.1.2 of my dissertation at the above link for some discussion of these. Using fixed polarity is easy, and it never generates any holes in the resulting mesh.
A good MC implementation will generate a smooth mesh to begin with if the data at each voxel location has a range of values instead of just a binary in or out state. The ugly stair-stepping only shows up if you're forced to put each vertex right in middle of each isosurface-crossing edge because you don't have enough information to do anything more intelligent.
Posted by Eric Lengyel
on 29 January 2013 - 01:44 PM
You could do this, but I don't recommend it:
void pushback_function()
{
char storage[sizeof(some_class)];
some_class *temp = new(storage) some_class;
array.push_back(*temp);
}
Posted by Eric Lengyel
on 20 January 2013 - 08:00 PM
Are you scaling after the rotation, so as to cause a skew? This would cause the tangent and bitangent to no longer be perpendicular, so calculating the bitangent as the cross product between the normal and tangent won't quite work. Instead, if you calculate the bitangent in terms of tan1 just like you calculated the tangent in terms of tan0, you'll get the right vector. But then you can no longer assume that the inverse of the TBN matrix is just its transpose when you do your shading.
Posted by Eric Lengyel
on 14 January 2013 - 07:48 PM
If you're looking for an engine that teaches the proper techniques and general theory of game programming, then you'll probably want an engine that includes source code, and that eliminates Unity and UDK.
Please check out the C4 Engine, which has been used in game programming classes at many universities for several years. Here is an example of a specific course that uses the C4 Engine:
http://web.cs.wpi.edu/~gogo/courses/imgd3000_2011c/
http://web.cs.wpi.edu/~gogo/courses/imgd3000/projects/final/
You can see the feature list here:
http://www.terathon.com/c4engine/features.php
If you have any questions, please feel free to post in the C4 Engine forums:
http://www.terathon.com/forums/
Posted by Eric Lengyel
on 31 December 2012 - 04:59 PM
Posted by Eric Lengyel
on 04 December 2012 - 09:33 PM
Posted by Eric Lengyel
on 20 May 2012 - 10:19 AM
Aren't those both line-line tests and not line segment-line segment tests?
Posted by Eric Lengyel
on 20 May 2012 - 08:46 AM
Posted by Eric Lengyel
on 01 April 2012 - 03:40 PM
Posted by Eric Lengyel
on 31 March 2012 - 12:36 PM
Posted by Eric Lengyel
on 16 March 2012 - 06:51 PM
Posted by Eric Lengyel
on 23 February 2012 - 06:10 AM
Posted by Eric Lengyel
on 07 October 2011 - 09:09 PM
Posted by Eric Lengyel
on 22 September 2011 - 10:40 PM
Find content