Sunday, April 02, 2006

HLSL Soft-Edged Shadow Map

Because of this demo, I found out my graphic card doesnt support float point texture @_@; ( Damn you GForceFX5900XT, I shouldnt have trusted you!!! ) In this demo, I rendered the depth value from the light's point of view as the shadow map into a floating point texture. ( used D3DFMT_R32F to keep the precision of the data...GForceFX5900XT doesnt support this format...damn it (\_/)q ) After the shadow map was done, used it as the texture and did the depth comparison with the pixel from the camera's point of view and rendered the shadowed portions into another texture. And finally blurred the texture from the depth comparison to get the soft-edged shadow map~

Shadow Map is easy to generate but it has some limitations. It doesnt work well with point light sources and may create some artifact due to the limited precision of depth values. But comparing to Shadow Volume, I still like Shadow Map better~ ^^



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 ^_^

Sunday, February 26, 2006

George's Demo Review1~

Huuu~finally found this old dusty demo(in a folder named"very very old shit" lol). I made this when I first started to learn game programming when I was studying in UCDavis(2001?forget=P). I remember i was reading this book called "Tricks of the Game Programming Gurus"(written by Andre' LaMothe, and really a good book actually) and I started making this demo after the first 2 chapters(too excited hehe...). And because of that, this demo uses all predefined window functions; there is no DirectX or OpenGL at all(that's why it can still run without version errors...lol). Of course all the pictures in this demo are made from predefined functions also. Although there isnt anything good about this demo, I learned lots of things when i was writing it. Mmm~ memories. Oh, one thing I really regret is that there is no pause button in this demo, so it gave me a tough time trying to take the pictures below@_@; Try it out when you feel really bored^_^


very shitty graphic..btw there is a boss, becareful hehe

Click here to download TheBees.rar

Wednesday, February 22, 2006

Taiwan's Air...What the Hell!!!

In my opinion, riding scooter to work every morning is the most painful thing to me in Taiwan. Within that 25mins, I can absorb plentiful Dioxin and CO2...nice isnt it?....NO!!!Think about it, during summer time, if you are riding a scooter under the scary temperature ( hot enough to melt a tire!) and there is an old scooter blowing shity smoke on you on your left hand side; and some coughing old man keeps smoking on your ride hand side, and there are also trucks and bus in front of you sending you all the fresh dust and dioxin, how will you feel? Its...its hell! But thats not scary, the scary thing is that people on the street seem pretty comfortable under that situation...I remember last time I saw a couple riding a scooter, they could chat and laugh happily inside the dark smoke the bus blew on them. I guess their lungs are probably made of iron or something@_@ Wake up people, that shitty smoke is poisonous!!

Oh, by the way, I posted last time I was going to share my demos here but it seemed not so easy. Why? Because I can't upload data files using blog@_@. So i still have to find a free space to put my files...stupid blog...I think I over-estimated you (*'3')

George

Monday, February 20, 2006

Grand Opening~

wow~ It only took me less than 5min to make this website-like thingy. All I can say is "blog...You are the Man!" But why is my 'g' (from george's blog) not capitalized!! (T_T)

I soon found out I am really not the type of person who can write dairy or essay; I had alot of ideas in my mind before i started wrting and now my brain is blank and blank. I dont even know what to write lol. What do people usually write in their first post? Ah~dump brain, you are so dump. (*'3')

Anyway, "George's Blog" is opened~Ya. What will be posted here? mmm...so far I will post my game experience and share some demos I programmed. Maybe you will find something useful here...eh, I hope.

Hope you will like it ^^
George

P.S. Oh!Oh!Let me advertise my chinese version blog here also. Interested in Chinese? Come!Come! XD
http://www.gpower-ch.blogspot.com/