Posts Tagged ‘specular texture’

RealKo Engine: Apply textureset with airplane

Friday, June 12th, 2009

Hey, we meet again.
I hope to come back in a while and post something in progress about my RealKo Engine.
Okay, this time I will show you the real stuff of airplane applied with diffuse/specular/normal mapp.

I have found out by myself, get the feeling that only the diffuse map is not enough in this modern day. Every models, if possible, should have all the basic textureset that is diffuse/specular/normal as the base. For other maps, it’s up to the implementation. That textureset can enhance the visual-feeling of the material for each of the different model in the game in the great amount. By combining it with the deferred shading, you can get most the visual quality (along with performance at the same time).

For what I gonna show you now is the demo scene, consists of 2 boeing classes which are Boeing 100 with master texture, and Boeing 400 with Thai Airways texture. Also with the preset 3 lights which are 1 directional light (sun light which point straight downward), and 2 pointlight which one of them is located near the airport tower, and another is located infront the tower on the runway-floor, both of point light just be a bit higher from the ground.
Note that one of the point light has Coral color, another has white color.

The demo scene demonstrates the effect of light, particles scene integrated with deferred shading process (in fact it’s just drawed after the deferred shading result), textureset applied for model (boeing in this case). And you can see other minor features by yourself in the gallery below.

Before I show you the gallery of this demo scene, let’s see the textureset applied with the airplane itself first. Just to get some feeling of how important the diffuse/specular/normal can enhance our scene and overall visualization.

Textureset applied with airplane

Diffuse Map

Diffuse Map

Specular Map

Specular Map

Normal Map

Normal Map

Those are textures used and applied with the airplane model.

Note: The reason I tell my artist to do the gray scale format for specular map for me is that, my shader code will get the data out from the specular map in one whole scalar value, not color. So by choosing the gray scale, we can just read the red channel of the map and that’s it, just furthur apply with the lighting algorithm then we’re done.

See my excerpt shader code for that part.

if(specularTextureEnabled)
{
output.Color.a = tex2D(specularSampler, input.TexCoords).r * specularIntensity;
}
else
{
output.Color.a = specularIntensity;
}

Let’s see the result of all we are talking about.

I also included a couple of images that aren’t applied with textureset.

Okay, it’s late now haaah!!
Until next time my friends.

Water reflection testbed (working gallery)

Saturday, April 11th, 2009

I want to show some of my screenshots taken from the recent testbed on “Water reflection”, from the ground up, it includes the diffuse texturing, specular texturing, specular highlighting, reflection, and ripple (or perturbation texturing).

Below you will find the screenshots from the start of the testbed’s process.

I am so sorry that I cannot include any in-depth detail here, due to I have no time at all right now. So I decide to post my progress in screenshots instead. If you visit my blog site, you will find that most of the posts are about the showcase.

But I can give you brief detail about all of this.
In order to do the more realistic (at least close enough to realistic) reflection water on the floor, road or anything shinny. You have to create the reflection plane first, then draw the reflected scene into it. In which case, you can blend it with the prior floor below it as I did here. You should set the appropriate renderstate correctly to give you out the most realistic scene (also consider performance.).

After that,  you add more realistic effect, to make it looks more like the water. It’s the ripples, or technically called “perturbation of texture”. This case, you need a bump map, to represent your randomness of the way the reflected scene you drawed will look like. In this case, the bump map is the water’s wave, it represents the flatness of each pixel in the water in which you drawed it into the reflected plane recently.

Finally, you come close to the natural look of water. Note that I am not don’t yet with the “fresnel term”. In which it will need one more texture to be added its color with, it’s refraction map.

Afterall, enjoys the following gallery.!

Texture mapping techniques

Sunday, April 5th, 2009

The testbed I have recently done so far, this time I focus on the mapping of different set of texture on the model.
The boeing model is mapped with the normal diffuse texture, thus give the result of the night, that only windows are litted.

For the floor, I have applied with diffuse texture, along with cool specular texture that give out the result you see the most bottom, but keep in mind this result will be given when you set up the light source’s position and its power, color, and direction of looking properly, in this case I use the direction light (but no shadow at this case).