Gouraud shading - Hardware based
Blitz3D Forums/Blitz3D Programming/Gouraud shading - Hardware based
| ||
I'm looking for solutions on implementing the technique known as Gourand shading. The purpose of this is to reflect a more retro type of art style in regards to 3d graphics. I'm finding little about it but the effect can even be faked I don't really care. So is anyone familiar with this technique or has any examples they can share? Sources: http://www.blitzbasic.com/Community/posts.php?topic=37258 http://www.blitzbasic.com/Community/posts.php?topic=25291 https://en.wikipedia.org/wiki/Gouraud_shading http://autodesk-maya.wonderhowto.com/how-to/smooth-shade-gouraud-objects-maya-287539/ |
| ||
Seek no further; Blitz3D already uses gouraud shading. Fixed-function Direct3D and\or OpenGL can render meshes with either smooth gouraud-shaded or flat-shaded triangles. When you're using the EntityFX 4 ("make the object flat-shaded"), you're changing the shade model being used. - - - - - Artistically speaking, if you want your graphics to look more retrograde you can disable the bilinear filtering of textures. This, coupled with low-resolution textures (64x64, 128x128), will give you that "3D DOS game", Quake-ish look. This feature is not available natively but is explored here: http://blitzbasic.com/Community/posts.php?topic=95702#1104692 |
| ||
To see the effect better, you can also set the colour of the individual vertices:Graphics3D 1024,768,32,1 Global Camera = CreateCamera() Global Mesh = CreateSphere() EntityFX Mesh, 1+2 ; full bright and vertexcolours on s = GetSurface( Mesh, 1 ) For v = 0 To CountVertices(s)-1 VertexColor s, v, Rand(64,255), Rand(64,255), Rand(64, 255) Next PositionEntity Mesh, 0,0,2 While Not KeyHit(1) TurnEntity Mesh, 1, 0, 1 RenderWorld() Flip Wend |
| ||
Thanks guys!!! :) |
| ||
If you want to tweak DX7 lights as you want, (light color, light intensity, light fall off), you can use this lib : http://www.blitzbasic.com/Community/posts.php?topic=75711 |