Archive for the ‘3D Grahphics’ Category

RealKo Engine updated

Wednesday, November 11th, 2009

Hello you guys.

I have updated RealKo Engine to fix the issues proposed by users at

Aeronautical Radio of Thailand LTD.
There are major 4 issues as follow.
1. Lots of resource being loaded is too large, slow loading process should be avoid
2. Changing the new offset of airport should affect others transportation object (airplane, cars, etc)
3. Be able to flexibly add new type of airplanes.
4. Option to enter the test scene, for fast debugging and testing simulation
I have written the possible solutions into text files which you can download it from the link below.
Issue 2, 3, and 4 are already fixed but left 1 as the long process to tackle down.
If you want to see more detail about how I tackle those issues, please those downloadable file below.
[Brief]: For what I can say to you now is that, RealKo Engine can now flexibly add new type of airplane. In fact, I have changed the name, and internal format of airplane to transportation object to let it be more generic and support wide range of objects in the simulation. So they can be airplanes, cars, helicopter. Ha ha, thus now very flexible to use.

For a little more detail, the transportation object now consists of 3 rotateable meshes, users don’t need to specify them all in the config file, but they are all optional. This way, by becoming more and more generic in the format, the good is given to users. You can see the detail of format of transportation of config file from the same solution file below.

The main problem is the resource management and loading. I have tested it, and it requires at least 2GB to handle those models, airplanes, and etc. Note that those model of airport and airplane is the most complex one that will be really use in the simulation, it’s Suvarnabhumi Aiport. So if I can tackle and find the way of rewriting the content management to be more efficient then it will cover all others airport. :)

And I want to say that from now on, a changelog will be available so you can see what’s updated.

See you next time.

[Download: Solution File
, ChangeLog]

Check out RealKo Video Representation!

Monday, September 28th, 2009

Hey,

after all I have the video representation of RealKo Engine.
Initially this video is presented in OpenHouse 09 at Mahidol University, Payathai, Thailand. Just to show the student how MUICT student capable of something! : )

This video cannot be succeed in produced if I won’t have the best video editing, Mochaz.
You can see his works at http://mochaz.com.

Okay, and dont be worry or curious about the name at first show of the video “Wondersin”. It’s just the fancy name.
It doesn’t relate to any particular company or entity. Just pure pure name, for eye candy and fun voice.
Let me tell you some history about this name, in that time I just love to watching Wonder Girls perform on the stage, love their songs too. So just come out with this name combining with my name “Wasin”.
Now you know what I mean.

I have uploaded it to YouTube.com.

*Please note that the flicker or some crap of graphics in some particular time will be fixed or may already fixed in the later on version that I currently working on. This video is created reasonable time ago.

Just pass the link to your friends and see what’s they say about it. (Let me know too, ;)
http://www.youtube.com/watch?v=pBOCk9Pl67M

[*EDIT: I cut out the flash object here due to slow of loading the page. Just go to above link, it's the same.]

Enjoy!

RealKo Engine: Map 07 updated

Friday, July 17th, 2009

After a prolong working time of RealKo Engine.
Now it’s in the final state to release it to my client, Aeronautical Radio of Thailand.

Below is the very mess talk of mine for today closes to morning (not even check the grammar). Many things will be exposed in talkative way in some forms. You may enjoy those topics and get some idea from my working experience with RealKo Engine.

At first, the Suvarnabhumi Airport model is now updated to version 7. Slightly improvements of model-optimization and little-by-little adding the mesh-by-mesh into the big model come in each version. I mention my great artist of all time again, P.Yod (as you may be familiar by now. :).

Lots of the detail can be packed into one big airport model whose the size is accumulated up into about 41 MB for now.

Airport Model
It’s easier to create the airport model which includes everything important with it into one model file. Its children can be ranged from trees, runways, taxi way, buildings, towers, skydome/clouddome, and others. As they are all initially set as static mesh, they should be packed together for convenient use, and also with the specification for the usage of engine that must be able to support all other airport model as well. Consequence of these will give you pile of papers designing about the system to handle its meshes and other supporting component too.

Some of the meshes inside the model can be treated differently such as tree, light on the runways, and fog mesh must be drawed with alpha-enabled. Thus the mesh management comes to play with the important role. Note that I used deferred shading for my rendering pipeline.

Now with 2 big categories to be handled, opaque mesh and alpha mesh.
This links into another aspect of something called “Entity and Type ID”, in which each mesh of the airport model must have its own ID and TypeID to identify each mesh from another and to tell the engine to handle it properly.

In fact as I have choosed “Deferred Shading” as the main driving force for my engine, many other supporting components will come into consideration without any invitation. We have to manage the mesh type, update them, draw them properly, and handle light calculation correctly as well.

If I talk too much, the subsection of Airport model will go too far, so I will limit myself to only I intend to talk here.

Actually as the generic engine that support all other airport model purposed in the specification, it gives much the flexibility for modifying each mesh, separating content from logic code, add/remove each mesh with different type easily without modifying any line of code, the config-file system comes in handy and very flexible.

Shadowing System

At the current state, it need to be fixed in the future. Due to the shadow algorithm that can support the large area is called “Cascaded shadow maps” need some time to implement. I cannot accomplish adding this feature into the engine due to lack of time to implement as it closes to the final release time. Can you guest, how do I solve this problem anyway? I solve it by using only the small to medium area of shadow. Only partially part of the area on the airport’s ground can be shadowed, not all. This limits to some kind of light source that can cast shadow which are spot light and directional light. It gives the acceptable and mid-quality of shadow, realistic at enough range but if too close it can pose some jaggy pixel. The situation to use my solution shadowing system is to find some objects that can cast shadow and adding the spot light into it, then place them around the tower or airport map. This can give out the feeling at some point but not that realistic.

I can say something here that the engine itself need to render huge amount of number of airplanes at one frame.
The maximum that I have heard from some guys in the Aeronautical Radio of Thailand is 400 at once!
Imagine that one airplane’s triangles are counted as about 2700 tris. Then for 400, its’ 400 * 2700 = 1080000 tris.
So it makes sense right that the shadowing system need not to be that complex, hmm, may be I am a little bit of myself  now! (Sorry for that, :)

Anyway it’s too huge to be processed, in fact the realistic number of airplanes that will be in the simulation at once is 125. Thus 125 * 2700 = 33.7k tris. It’s more reasonable to handle those data along with some simple culling from view frustum.

But nontheless, the shadow the need to be coverred all the area of airport will be implemented and integrated into the engine in some days in the near future, but not that close for now as I am very busy for taking the mid-term exam here, quite a shame again.

As I plan for future, I will implement “Cascaded shadow maps” with about 1-2 pieces of shadow map each with 1024 * 768 to cover all of my airport’s area. May be I need more that 1-2 pieces, it can be 3-4 pieces.

Rainy day

Some sort of the special effect that I have found the funniest time to work with is “rainy day”.
To create the rainy atmosphere, you need many small subsystem of many small special effect added together and give the final look and feel result.
They are

- rain drop
- rain splash
- rainy textureset (diffuse, normal, and specular)
- rainy and realistic sky/cloud
- lightning
- lighting flashes

By integrated all of above into the rainy scene, the small flaw of each one will never come out to the eye of viewer (or at least say little chance.) as the overall result will take the focus and blend them well altogether.

For my scene (as I will show you some of the rainy screenshots later on), I use 8000 raindrops falling at the negative y direction falling down to earth, 10000 rain splashes to simulate the feeling of rain drops hit the ground, rainy textureset for all the airport’s meshes that expose the feeling to the viewer,  sky’s color is set to black as to suit for the other rainy scen algorithm such as lightning, lighting flashes, cloud’s movement and its looking much be some kind of shurbbly and less organized, ligntning is calculated in realtime and use the benefit from the mathematics to simulate the natural of brachning along the way of point, lighting flahses should be in natural and only some areas are affected by the lighting flashes, not the whole sky.

From my test bed, the cpu peaks when the lightning need to be drawed next frame. Also when the rainy scene starts the cpu peaks again as it need to initialize all of the particles of each particle system of rain drop, and rain splash. The lighting flashes run properly without any immediately flicker at the framerate.

The overall look and feel of the rainy scene can be achieved in this way. I personally believe that the rainy scene can be created from many small systems added together and produce the state-of-art visual graphics with less flaw noticed by any viewers.

I would like to talk about my idea on implementing the lightning and lighting flashes natural algorithm which will show less and less pattern to the viewers.
But  it’s time for now, I should go back to sleep and read some books preparing for the mid-term exams as it only 1 weeks left.
Before we part, let’s see some of the screenshot from my map 07 below.

Thanks for your time reading the messy article above, :)

RealKo Engine: Updated Map 3

Wednesday, June 24th, 2009

Hey, nice to be here again.

Now the map is updated (current code is 3), you will see quite of improvement stuffs in the scene.
The map now included with buildings, highways, trees, lots of texture lights, the emissive map (which you can see the building turns on its own lights in the night),  and more and more detail on textures.

My artist has done quite a great job here. Lots of the time which he spent on the detailing the textures for each mesh. Diffuse, normal, specular, and emissive map and others too, when integrated with RealKo Engine, can give nice and virtualized both in feeling and actual quality in the scene.

I have captured a lot of screenshots here so I dont want to waste any time now, just see them below.

Last 13 screenshots (before last 2) of above gallery are the most recently updated from my experiment with light’s properties.
I have changed the position, color, specular intensity, radius, etc of the light itself just to see the different in variety in the scene. There are 1 directinal light for sun, and other 10-13 for point lights in the scene you just saw above.

Sorry for my english this time, it’s quite late now and I feel blurry. But I really want to finish the post to show you the improvement right away, so please don’t mind this thing :)

Til next time my friends.
Thanks for coming by.

RealKo Engine: Update working gallery

Saturday, June 20th, 2009

Hey, my friends.

After having a good long rest, I decide to come back quickly and start to work again!!

Programmer should have some naps right? If energy is too low, or some of the motivation has gone, it’s the time to refresh thing up by doing anything that not involving with code. That the couple of days for my day-off, but please do not worry because this time I also have something to show you again.

It’s the working gallery from my lastest testbed on the airport map. The map is updated from my professional artist, P.Yod. As I have said to you last post about the power of texture lights. They come in handy and we will put them to use again for the lights of airport. They’re cheap, nice to look at, and they’re alpha stuff that need to be cared if used in deferred shading process.

I did the same as I did for my alpha scene stuff, just draw them on top of the deferred shading scene. Thus everything gonna be in our control.

You will see the 2 types of light again. One for static light the same as what you already saw from the airplane’s head light. Another for signal light, blinking all the time in the night. The different this time is that we gonna apply lights for building, runway, taxi way, and ground under building. No matter where’s the position they’re located, the algorithm behind the scene is the same for airplane’s alpha stuff (for both types of light).

In the scene we can control all the lights (to turn it on/off, and blinking which depend on the type of light), in which the lights are brought into the engine via config file. Currently 2 types are allowed.

Also note that the map is not fully updated, some of the assets are not finished and put into the scene yet. But it’s quite close now.

Now don’t waste time, let’s see the gallery below.