Here is the teapot model used in the above images.
http://cggmwww.csie.nctu.edu.tw/courses/cgu/2002/prog1/teapot.obj
Seams will appear when you use the mesh manipulator to calculate "smooth" normals. or to generate a smooth tangent space using the code I posted previously. http://irrlicht ...
Search found 15 matches
- Wed Sep 05, 2007 5:22 pm
- Forum: Code Snippets
- Topic: Better Collada and OBJ support...
- Replies: 10
- Views: 5224
- Wed Sep 05, 2007 5:08 pm
- Forum: Code Snippets
- Topic: Better Collada and OBJ support...
- Replies: 10
- Views: 5224
- Tue Sep 04, 2007 11:08 pm
- Forum: Code Snippets
- Topic: Better Collada and OBJ support...
- Replies: 10
- Views: 5224
- Tue Sep 04, 2007 5:42 pm
- Forum: Code Snippets
- Topic: Better Collada and OBJ support...
- Replies: 10
- Views: 5224
- Tue Sep 04, 2007 2:32 pm
- Forum: Code Snippets
- Topic: Better Collada and OBJ support...
- Replies: 10
- Views: 5224
Better Collada and OBJ support...
Hi all,
Here's an update to the OBJ loader, to preserve smoothing groups. This is necessary for proper normal-mapping. Also an update to the Collada loader, which preserves smoothing groups AND adds support for meshes in the Collada 1.4 format.
http://www.ryanclark.net/irrlicht/S3DVertex.h ...
Here's an update to the OBJ loader, to preserve smoothing groups. This is necessary for proper normal-mapping. Also an update to the Collada loader, which preserves smoothing groups AND adds support for meshes in the Collada 1.4 format.
http://www.ryanclark.net/irrlicht/S3DVertex.h ...
- Tue Aug 07, 2007 11:31 pm
- Forum: Code Snippets
- Topic: Angle-weighted normals for nice-looking meshes.
- Replies: 0
- Views: 1805
Angle-weighted normals for nice-looking meshes.
Hi all,
Here's code to create mesh normals using the "Mean Weighted by Angle" method, which looks better than the default Irrlicht method.
http://ryanclark.net/irrlicht/CMeshManipulator.cpp
You can compare methods by toggling #define USE_ANGLE_WEIGHTED_NORMALS
Here is the relevant bit from ...
Here's code to create mesh normals using the "Mean Weighted by Angle" method, which looks better than the default Irrlicht method.
http://ryanclark.net/irrlicht/CMeshManipulator.cpp
You can compare methods by toggling #define USE_ANGLE_WEIGHTED_NORMALS
Here is the relevant bit from ...
- Tue Aug 07, 2007 5:24 am
- Forum: Code Snippets
- Topic: A patch to improve normal mapping
- Replies: 11
- Views: 5507
- Mon Aug 06, 2007 5:27 am
- Forum: Code Snippets
- Topic: Another patch to improve normal mapping!
- Replies: 8
- Views: 3851
- Sat Aug 04, 2007 7:27 pm
- Forum: Code Snippets
- Topic: Another patch to improve normal mapping!
- Replies: 8
- Views: 3851
- Sat Aug 04, 2007 7:10 pm
- Forum: Code Snippets
- Topic: Another patch to improve normal mapping!
- Replies: 8
- Views: 3851
- Sat Aug 04, 2007 12:59 pm
- Forum: Code Snippets
- Topic: Another patch to improve normal mapping!
- Replies: 8
- Views: 3851
If you're curious to see just the new code, click here: http://ryanclark.net/irrlicht/CD3D9Norm ... nderer.cpp
It's basically the same as the 1.1 shader except that all the vectors get normalized at every pixel. This results in brighter and more accurate lighting.
It's basically the same as the 1.1 shader except that all the vectors get normalized at every pixel. This results in brighter and more accurate lighting.
- Sat Aug 04, 2007 12:21 pm
- Forum: Code Snippets
- Topic: Another patch to improve normal mapping!
- Replies: 8
- Views: 3851
Another patch to improve normal mapping!
Hi all,
I've written a PS 2.0 shader for normal mapping in DirectX 9. It calculates lighting more accurately, and makes a better-looking image.
Here's an illustration.
http://ryanclark.net/irrlicht/NewShader.png
Here's a patch containing this shader along with the tangentspace fix that I ...
I've written a PS 2.0 shader for normal mapping in DirectX 9. It calculates lighting more accurately, and makes a better-looking image.
Here's an illustration.
http://ryanclark.net/irrlicht/NewShader.png
Here's a patch containing this shader along with the tangentspace fix that I ...
- Sun Jul 22, 2007 11:34 pm
- Forum: Code Snippets
- Topic: A patch to improve normal mapping
- Replies: 11
- Views: 5507
- Sun Jul 22, 2007 10:08 pm
- Forum: Code Snippets
- Topic: A patch to improve normal mapping
- Replies: 11
- Views: 5507
- Sun Jul 22, 2007 9:15 pm
- Forum: Code Snippets
- Topic: A patch to improve normal mapping
- Replies: 11
- Views: 5507
A patch to improve normal mapping
Hi,
This code preserves the artist's original normals when calculating tangent space. This way, normal-mapped models should look closer to the artist's intent. Smooth surfaces will stay smooth, and flat surfaces will stay flat.
Here's an illustration:
http://ryanclark.net/irrlicht/BeforeAfter ...
This code preserves the artist's original normals when calculating tangent space. This way, normal-mapped models should look closer to the artist's intent. Smooth surfaces will stay smooth, and flat surfaces will stay flat.
Here's an illustration:
http://ryanclark.net/irrlicht/BeforeAfter ...