08 2012 档案
摘要:This program is ParallaxOcclusionMapping Sample from D3D samples. I touch this technology because I found some one use DXT5 format as normal maps. DXT5 means the texture still keep full range of al...
阅读全文
摘要:Today, I found this very interesting program when I was surfing on the Internet. Occlusion culling, that is a big topic on Computer Graphic industry. The original passage come from here: http://ww...
阅读全文
摘要:This demo shows how D3D hardware instance works. HW Instance means call DrawIndexedPrimitive on time, but with a group of geometry rendered. Those geometries could be positioned in different place ...
阅读全文
摘要:This demo shows how to apply the render to texture target feature with D3D API. The whole content of the Quad geometry was rendered into a texture, and after a cube mesh take this texture as it’s d...
阅读全文
摘要:This demo shows how to using d3d alpha blend. Before you switch on the alpha blend operation, you should specify where this alpha value come from. We could specify this alpha value come from the ma...
阅读全文
摘要:This demo come from book <Direct3D Graphic Programming introduction>. It show mirror effect and shadow effect, both of them using stencil buffer. In the mirror effect, the stencil buffer used to fi...
阅读全文
摘要:The demo how to use D3D vertex shader and pixel shaders. The difference between GPU API rendering and shaders one is not so hurge. While using shaders, you need to create vertex declaration instead...
阅读全文
摘要:This demo shows the D3D lighting + texture. More accurately, you should name such texture as diffuse map. There are a lots of map exist, not only diffuse map. Like specular map, cube map or environ...
阅读全文
摘要:Based on the previous D3D Frame work demo, I write a simple program that using D3D hardware lighting. HW lighting means just use some D3D lighting API to create the lighting effect instead lighting...
阅读全文
摘要:This is a simple D3D frame work. I write this simple program just to avoid start from beginning such as creating window, d3d device when I want to write some D3D demos. I do not want to repeat this...
阅读全文
摘要:3D Free Form Deformation Demo Free-form deformation (FFD) is an important tool in computer-assisted geometric design and animation. Well, there are many methods that could be used to deform object...
阅读全文
摘要:I write this demo just to go though some key concepts of computer graphics. The following features are implemented in this demo: 1) t...
阅读全文
摘要:In the last few years or months, I have made a lots of technology learning plans. Every time, I want to learn a new kind of technology, I always want to learn from the ZERO. That means I will copy or ...
阅读全文
摘要:doc2pdf How to convert the web pages and word document to PDF files with text / image format kept? Sometimes, I will do some research on the internet and save some pages locally for afterward review...
阅读全文
摘要:Get start to write Maya Plug-in with Maya VCWizard. A pdf document included to details how to write a Maya Plug-in with Maya VC Wizard, how to use this plug-in in the Maya software, and also a “H...
阅读全文
摘要:This sample program shows us how to write a Maya static mesh exporter with c++. At first, I planed to write some additional features on the skin animation, but Maya C++ API seems very complicated f...
阅读全文
摘要:This program originally come from an Android OpenGLES sample. It display a cube with texture. What I did is I pull the hard code cube mesh data out of the code, and save as an external file “cube.m...
阅读全文
摘要:This example shows us how to write a FBX file parser with FBX SDK. The mainly parts are how to retrieve vertexes, uv, normal, polygons, polygons' material, textures, skin animation data and so on. ...
阅读全文
摘要:1) Install gcc on ubuntu: sudo apt-get install gcc g++ sudo apt-get install build-essential 2) Write a Hello.c with VIM like this: #include <stdio.h>int main() { printf(“Hello, gcc\n”); ...
阅读全文
摘要:1) Use zip command to compress files: zip -r hello.zip hello 2) 寻找.h头文件所在的包, sudo apt-file search XXX.h sudo apt-file search Xf86vmode.h
阅读全文
摘要:1) Create a new, empty mercurial repository: hg init myproject 2) Add some files into the current repository: hg add <file name>|<dir_name> 3) Commit files into the repository: hg commit -m “mess...
阅读全文
摘要:NeHe Productions_ Prep_ The Graphics Pipeline This article gives us a brief idea on how does OpenGL make your triangles display on the screen. Well, it is simplified one, and some information mi...
阅读全文
摘要:Some ideas about calculating tangent space for meshes are cleaned here. It is very easy to calculate the tangent basis vectors if the vertex normal and diffuse uv sets were provided for each triang...
阅读全文
摘要:This program shows how to play video with OpenGL & OpenAL. The .avi file that could be supported should be an old AVI file format, that no video & audio data compress happened here. This kind of AVI ...
阅读全文
摘要:This sample shows how to Pick some objects from the screen and move an object on the screen. This style is a bit similar to the 3D content creator, like Maya, 3D Max. You could drag some objects to s...
阅读全文
摘要:A good start to learn OpenGL Shading language. This simple program was built under Ubuntu OS. The process that OpenGL using shading language is the much similar as D3D. Some difference exists l...
阅读全文
摘要:Here is a simple tutorial for the dynamic software light maps for OpenGL. This program was built on Ubuntu OS. The project management tool is CMake. In this program, a light map will be created ...
阅读全文
摘要:NeHe Productions_ Matrices Some basic ideas about the matrix and matrix operation listed here. Such as Identity matrix, rotation matrix, translation matrix, scale matrix, storage of matrix, how to ...
阅读全文
摘要:This sample program shows us to use pre-compressed dds file with OpenGL. With pre-compressed textures, on the one hand we could reduce the file size on the disk; on the other hand we could improve th...
阅读全文
摘要:This is a very good article that clean up my way to get close to OpenGL. This article address the issue about how glColor, glMaterial, glLight and glTexture works together to get the final effect tha...
阅读全文
摘要:When you come across this compiling error in Visual Studio, you could re-save the source file with “Advanced Save Options” setting. To address this issue, switch to “File“->”Advanced Save Options“, Se...
阅读全文
摘要:I started learn NeHe OpenGL lessons in university, but I never went though all of his lessons. I wish this time my blog will go though all of content, and figure out all of the OpenGL technology poin...
阅读全文
摘要:NeHe OpenGL Lesson02 – Your First Polygon. This lesson shows how to draw polygons with OpenGL API. The following lines are source code that used to draw a triangle. As you see, it is very easy and ...
阅读全文
摘要:This sample shows how to add color to your primitives. The main idea used here is that specify the vertex color for each vertex or the next all vertexes. And the vertex color was added by the functio...
阅读全文
摘要:This program shows how to make the objects rotated. OpenGL API is kind of so low level graphic API that allows the user create some separate matrix components. Here this sample just give some basic...
阅读全文
摘要:This programs show how to build 3d objects and render them with OpenGL. Those shapes displayed here are very primitive, they were hard code in the source code. When you come to some games, you wil...
阅读全文
摘要:This program shows us how to apply texture mapping with OpenGL. Well, texture mapping increase the visual effect significantly. And also until now, the texture mapping was vastly used. Those textures...
阅读全文
摘要:This sample shows us how to bring texture mapping, different texture filtering, lighting and Widget keyboard control together. Keyboard ‘page up’ or ‘page down’ to zoom out or zoom in. Key ‘L’ tog...
阅读全文
摘要:This sample shows us how to use blending operation with OpenGL API. Blending, I guess, may be the only way to access the destination pixels from the current color buffer. In the previous lesson, we c...
阅读全文
摘要:So Cool! Well, I would like to say that this sample shows us the beautiful and the magic of mathematic. The programming knowledge or OpenGL API involved in here are not too much or just a very lit...
阅读全文
摘要:This sample shows us a small proto-type how to write a game with OpenGL. This is the first lesson that abandon using hard code game world. It seems like a engine, a small one. What is an engine? An e...
阅读全文
摘要:This demo shows us how to wave texture though vertex position changing at the running time instead of moving texture coordinated. You could get such cool effect with the method used here. But obvious...
阅读全文
摘要:This lesson shows us how to use the OpenGL display list. Display list is a special feature with OpenGL, that D3D does not have. A Display list is an OpenGL commands optimized cache. Some of it’s c...
阅读全文
摘要:This demo shows us how to display some characters on the screen with OpenGL bitmap fonts. This is a very useful feature that we could used to display some text, debug information, fps or even menu co...
阅读全文
摘要:This sample program show us how to display 3d characters on the screen. Those characters are called outline fonts. They are different from the bitmap fonts that are 2d only. Outline fonts are creat...
阅读全文
摘要:This sample program shows us how to texture mapping outline fonts. It seems the outline fonts does not generate 3d font object texture coordinates for us. And luckily, OpenGL provide some interfac...
阅读全文
摘要:This sample shows us how to use OpenGL fog feature. we will learn how to use 3 different fog filters, how to change the color of the fog, and how to set how far into the screen the fog starts and how...
阅读全文
摘要:This sample show us how to display 2D texture font on the screen with OpenGL. This 2d texture font is just an image painted with characters instead of windows fonts. The mainly workflow for 2D text...
阅读全文
摘要:This sample will introduce us to the wonderful world of quadrics. With quadrics you can easily create complex objects such as spheres, discs, cylinders and cones. These object can be created with jus...
阅读全文
摘要:Here is a simple particle engine. The particle effect is a very important element in game. It could be used simulate an explosion, water fountain, flaming star and so on. Generally speaking, a par...
阅读全文
摘要:This sample shows us how to implement masking effect with OpenGL using blend operation instead of alpha testing. Masking is an important effect, that could be used build tree leaves, some complicated...
阅读全文
摘要:This sample shows us a simple 2d game with only basic OpenGL knowledge: draw lines, timing, ortho view. Draw Lines The way to draw lines is the same as draw other primitives, just set GL_LINES o...
阅读全文
摘要:This sample shows how to do bump mapping with OpenGL. The bump mapping technology used here for approximating diffuse lighting. The concept behind this article was Embossed bump mapping. The frag...
阅读全文
摘要:This sample shows us how to do a Sphere Mapping when work with auto-generate texture coordinates in OpenGL. For sphere mapping, you need a sphere map. What you need to do in PS is selecting distor...
阅读全文
摘要:This sample shows us how to extract the OpenGL extensions into tokens and scissor testing. In the masking example, I already wrote some code of loading TGA textures. But here, another TGA loading ...
阅读全文
摘要:This sample shows us how to do vertex morphing and load objects from text files. For vertex morphing, you could apply such technology to transform smoothly object A to object B, like transform a h...
阅读全文
摘要:This sample shows us how to display a reflection effect with stencil buffer and plane clipping in OpenGL. The stencil buffer usually goes with the depth buffer in the display card, and also called ma...
阅读全文
摘要:This sample shows us how to create dynamic volume shadows with OpenGL. The main technology used here are, create the shadow volumes, figure out the shadow area in the stencil buffer. The first pr...
阅读全文
摘要:Well, this samples shows us how to create Bzeier Patches based on some math ideas. And OpenGL used to just display those patches. The main idea underneath the Bzeier Patches math is how to calcula...
阅读全文
摘要:This samples shows us how to load raw texture (or customized texture format file) and image alpha blend, image copy operations (namely Blitter function). When I got into the source code, I found s...
阅读全文
摘要:This sample shows us how to work with collision detection and response. At first, it provide some ideas about how to determine whether a intersection happened between a ray and a plane, a ray and a c...
阅读全文
摘要:This sample shows us how to parse, load and display texture mapped Milkshape3D models. Milkshape3D is a free modeling package. Of course it is not popular as Maya or 3D Max. If you want to save mone...
阅读全文
摘要:This simple game shows us how to do something funny that already detailed as in the title. 1) Screen mouse picking: We could emit a 3D ray from the current viewer position and do intersection tes...
阅读全文
摘要:As the title describes, we could learn how to load TGA images as texture from this sample. Nothing special to advance about this lesson. The only thing that need to mention may be that refactoring an...
阅读全文
摘要:This sample shows us how to create a landscape by means of height mapping. As the word height mapping means that the height of the landscape come from a gray image. Of course, you could apply other ...
阅读全文
摘要:This sample shows us how to play AVI files with OpenGL. In addition to get AVI files frame animation images, the author used windows native AVI playing library instead of re-writing his own AVI file ...
阅读全文
摘要:This sample shows us how to implement a radial blur effect with OpenGL render into a texture technology. To render objects into a texture: 1) set the view port size with the texture size; 2)...
阅读全文
摘要:This sample shows us how to do Cel-Shading with OpenGL. The cel-shading contain two part: one is the color grading on the object surface; the other one is the outline effect. To get the color grad...
阅读全文
摘要:This sample shows us how to load the texture data from the .exe file instead of external image files on the disk. The method was based on the Visual Studio resource data. That means you need to use V...
阅读全文
摘要:This sample gives us some basics information about Physical Simulations. Some terminologies like Mass, Force, acceleration, velocity, time, position and the relationships among them are described h...
阅读全文
摘要:This sample provides us an ArcBall module that we could use to rotate object along the screen with mouse. The underneath idea is mapping a 2d screen position into a 3d sphere coordinate. A rotation...
阅读全文
摘要:This samples us how to apply Cg vertex shader in OpenGL. Shader is a kind of short c-like code that could run on the GPU. One the one hand, we could get much flexibility while rendering our-own vis...
阅读全文
摘要:This sample shows us how to switch on the MSAA (Multiple sampling Anti-Aliasing) on windows. I remember some material that I read before. The MSAA just sample several pixels instead of only one pix...
阅读全文
摘要:This samples shows us how to put the mesh render data such as the vertex position, texture coordinates and even more vertex data upload into the video hardware. The samples what saw before that ver...
阅读全文
摘要:This samples shows us how to render a 3D lens flare with OpenGL. A lens flare effect go with a light source. Before divide into the render part, there are several things that need to be addressed f...
阅读全文
摘要:This samples shows us how to create anti-aliased font. The WGL font bitmap saved with binaries image, that means only one bit per pixel. This will cause some aliased problem as you zoom in the font...
阅读全文
摘要:This sample shows us how to implement a complete physics simulation. The key point to build a simulation is to create a group of physics settings properly. During the simulation update, solve all ...
阅读全文
摘要:This samples shows us how to create multiple views in one window. With OpenGL command glViewport, we could place our scene into any rectangle area on the window. Usually, we will set the view p...
阅读全文
摘要:This samples shows us how to create some fog effect that does not fall off by the distance between the viewer and vertex position. With OpenGL command glFogCoordf, we could specify a fog densi...
阅读全文