Monday, March 27, 2006

Normal Map + Specular Map

Another old stuff from last year~^^ After i finished the HLSL cartoon effect, i found out i was not really familiar with using lights. So i desided to spend sometime to get to know more about the basic lighting effect, especially the difference bewteen Diffuse, Ambient, and Specular. In old games, people only calculated per vertex light and it was not graphically impressived, but in now days, per pixel lighting is almost a must and can greatly improve the lighting result. I wont lose a chance to try the shaders so i went for per pixel lighting. Talking about per-pixel lighting, normal map was the basic thing i had to know. And i think normal map wasnt as hard as i thought once i got to know the tangent calculation. Yea, if you know the meaning of tangent and know how to use it, then you pretty much know the whole thing~ ^_*

Pictures below were the result i made using a normal map plus a specular map to improve the specular effect. It seemed not bad XD This technique is used in many games i think and yea, it is graphically impressive =P~

P.S. Oh btw, this creature is made by my brother Louis too, hehe, so gonna advertise for him one more time~ thx Louis!

Sunday, March 12, 2006

Stylish Silheouette?!

I brought Oogami demo disk back from Tokyo Game Show 2005. After I tried it, I had to say I really admired Japan's talent of game producing. Especially that chinese drawing-like rendering effect, how did they do that? I tried to look for such information but I couldnt find any useful one. Somehow I heard it used a way to change the texture of the silheouette depending on the camera's position. I didnt know its true or not, so I made a small demo to see how it worked. The result are the pictures above. I used several kinds of textures to replace the silheouette. The result seemed ok...But if i want to do the chinese drawing-like rendering, how do I change textures base on camera position?_?; Oogami's Chinese drawing-like rendering effect, if anyone knows how to do it, please let me know~~ @_@;

HLSL Image Processing Cartoon Effect

A While ago( Jan 2005 I think =P ) I was playing Naruto on PS2. I found they had something more than just toon shading on their models. I could see slash lines easily on the shadow part of their toon shading; made the models look very similar to the ones in manga. I think the publisher called it "Naruto Shading" lol. And yea, not just Naruto Shading, there was also Dragon Ball Shading and others during that time to emphasis how special their toon shaing were. I thought that was some mysterious effect at the begining, but after some study and research and I realized it was not as hard as it sounded. All those fancy names were all from one effect called "Tone Shading" and its not hard to implement it too. All I had to do was combine the toon shading with a slashing line texture then I could make the slash lines only appear on the shadow part of the toon shading~.

During that time, DirectX9.0 + HLSL were released also, so I used tone shading as a chance to practice how to use HLSL. I used HLSL to write my shader codes and used Image Processing to re-do my cartoon effect. And wow, Image Processing was one very good technique!! With Sobel Silheouette filter, I can find perfect silheouette. Unlike those crappy lines I did before, this Silheouette is smooth and nice. And plus the tone shading, I can make the same effect as that Naruto game lol. Really, Image Processing can really make some nice effect and I think there are more and more games using this technique now like Glow, Blur...etc. I guess Image Processing will become a required technique in the future game industry. ^_^

HLSL Image Processing + Toon + Tone + Silheouette!!XD

Wednesday, March 08, 2006

George's Demo Review3~

GEditor.This demo should be count as "not-finished"=P. I thought about this demo in a short period of time after I finished GDemoEx. When I was writing GDemoEx, I met some problems like; where should I put these enemies? What do I put here in this map? or something like how my enemies should do to interact with my main character...etc(finally became all random =P ) At the same time, I was playing this famous game called "WarCraft3". It has a tool called map editor. You not only can decide which thing goes where, you can also write a script to make the scene become a complete game stage so other players can play it. Yeah, this editor is hell strong. So I decided right away that I was gonna make a similar one without thinking how hard it could be.XD
Although I had the experience from GDemoEx, this project still gave me a headache. A lot of new problems came. For instance; how do I match the point on my screen to the actually position in my 3D world? Or how do I move multiple objects at once?...etc. After the research and my friends' help( thank you again guys XD ), I conquered most of the problems. My demo could now load a field map, add objects, and you can select them to move or delete and some other actions.

I thought I was doing ok but at the same time I found a deadly mistake I didnt consider(*_x); this demo did not have any data base or any data handlers. I couldnt save my scene or load it. And dont even think about restore. The UI was not convenient also. So this demo could only let you load some models and fields, let you put them around doing all the decoration. And thats all. ; ; Under this sad situation, I had to stop contiuing this demo until I was more experienced about datas.
But recently I was reading a book about data structures and I did found out some methods to handle data saving and restore and others. Yea, George, you need to learn more programming skills besides graphics~XD I hope one day I can unfreeze this demo and finish it as I planned before. ^_^

Tuesday, March 07, 2006

George's Demo Review2~

GDemoEX. This is the demo I spent alot of time in after I graduated. Although I studied many game programming books, I never really made something using those techniques. I did learn many graphic related courses in school but I was still not satisfied. So I promised myself I had to make something using what I learned. Where did the idea of this demo come from? I remember there was a game called "Dinasty worrior3"published by Koei. It was kind of famous in eastern area. During that time, there were not many games that could let you kill thousands of people in a battle ground and I was very depressed at that time also(RL problems), so I always liked to play it to relax myself(especially when there were too many bugs...kill!kill!!) Thats the idea of this demo.

I met alot of troubles when I was writing this demo. Yeah, reading books and writing codes are 2 totally different things. There were many situations the books couldnt taught me. I had a enough problems already when I first started to write the 3DMax model exporter.(*'3')

Oh, by the way, the earliest verion of this demo was using OpenGL. Later on I wanted to put Shaders in my demo so I rewrote it to DirectX version. Shader was another hell to me during that time;silhouette, shadow volume were all pretty hard techniques to me when I tried to put them in my demo. Finally I finished it without giving up XD. Thanks to those experienced programers for giving me advices and supports. And thank my brother Louis for helping me with the models.

This demo is not very good actually=P and the techniques I used in this demo can be found everywhere now. But I still want to introduce the techniques I used=P
-All models are exported from 3DSMAX using my owned expoter. I named it Gexporter...<=)
-Terrain is generated using Octree terrain rendering.
-Toon effect and silhouette using shaders.
-Shadow volume using shaders.
-Model animation blending using shaders.
-Basic AI(stupid AI) and collision detection

Below are some pics from the OpenGL version. Bad isnt it XD

Yea, if there is enough time, I really really want to do demos like this again ^_^