New ASEToBin version (0.6)

Published March 25, 2007
Advertisement
In the past two weeks, I've been quite busy on various topics: experimenting the player-custom colors in shaders, and releasing a new ASEToBin version.

Misceallenous map

I wrote a lengthy post about player-custom colors, so I won't enter into details here. You can still see the thread here.

The idea is to use a "misceallenous" map ( for lack of a better name ) that encodes, in the red channel, pixels that are affected by the primary custom color; in the green channel, pixels affected by the secondary custom color; and finally, in the blue channel, an intensity saying how much dirt there can be at most on this pixel.

The player will be able in-game to select ( when he re-paints his ship, or acquires a brand new one ) a primary and secondary custom color. The dirt amount will be based on how old the ship is, how often it entered into dusty environments/atmospheres, etc.. The dirt map is not meant to replace aging, which can still be done with a separate set of texture maps.

Everything gets combined in the pixel shader.

Ambient occlusion

Last week, I added support for ambient occlusion. Usually, AO must be set up via render-to-texture in 3ds Max ( or equivalent software ), but it's still tricky to set the good parameters and to share the textures. So I've added AO to ASEToBin.

The algorithm works by using an UV map coordinate set ( same than for skinning / unique UV mapping ), and for each triangle, rasterize the triangle in the AO map. For each pixel, a certain amount of rays are cast on the hemisphere about the triangle surface. The amount of AO is based on the percentage of rays that hit back the object, versus the amount of rays that do not hit anything. So areas that are very occluded get a lower AO value, resulting in a darker pixel; while areas that are on a roof, with nothing above / near, get a white AO pixel.

This AO map is then multiplying with the diffuse and specular maps, giving a much more realistic feeling ( although subtle ) to the objects.

In the last ASEToBin, AO only works if your object uses unique UV mapping. If that isn't the case ( for example you are using tiling / generic textures ), it will not work.

New ASEToBin version

This new version can be downloaded here:

ASEToBin 0.6 ( 12.4 MB )

Main changes:
- fixed the stretching of the viewport when resizing the window
- fixed crashes when trying to load/export models, when a model is already loaded
- added an option to fix T-Junctions ( experimental )
- added an option to generate ambient-occlusion maps. There are 5 parameters that can be changed: the number of rays cast per pixel ( the higher, the better quality ) ; the strength of the AO ( the higher, the stronger the AO map will be ) ; the resolution of the AO map ( the higher, the better quality ) ; and the minimum and maximum distance at which rays should be cast ( default values are usually fine for small models, increase them for larger ones ).
- gave default textures when some of the material chunks were used in shaders, but not filled by the user at export time or in the .ASE.
- reviewed all the shaders: many shaders were useless. The remaining shaders allow to see the diffuse, misc and ambient maps; the vertex normals and the texture coordinates; or the final shader with or without optimized textures ( depending on if you checked the option in the converter tab ). All shaders use backface culling, and the final ( non-optimized ) shader uses the alpha channel of the diffuse map as an alpha mask. There's currently no alpha mask for the optimized shader.
- added a set of parameters in the viewer tab to customize the shaders; from top to bottom: the primary custom color; the secondary custom color; the dirt amount in 0-1; the specular power; a slider for the light direction; a slider for the light altitude (set it to the left and lighting will come from the underside; set it to the right, and lighting will come from the very top); the light color; the ambient color; the specular highlights color. Note that all colors are in high-dynamic range, so you can use values above 255. For example, (512 512 512) is a white twice brighter than standard white (255 255 255).
- added an option to set the camera speed
- added an option to change the skybox. The default one is gray, but if you go in Data/Textures/ you can select Skybox0_0.tga for a space-type ( ICP style! ) skybox.

A video of the new ASEToBin viewer can be seen here:

ASEToBin 0.6 video (14.9 MB).

It's sometimes a bit boring, but shows the new shaders and the parameters.


0 likes 6 comments

Comments

jbadams
Very nice results, I like how the ship turned out with the customised colouring.
March 26, 2007 04:02 AM
Gaheris
Very interesting, thanks a lot for sharing!

Do you have any good articles on setting up nice AO maps for (UV mapped) models in 3DS MAX 8 (using mentalray)? I've been having some trouble with it.
March 26, 2007 06:57 AM
dgreen02
The ship textures / color variations look great.

Good work as usual.
March 28, 2007 06:15 AM
venzon
How many texture units are you using for all of your texturing? I'm curious to see how you've organized all of the various maps (diffuse color, gloss, shadow map, this new misc map, etc). By the way, having read your journal from the beginning, I have to say Nice Work (with capitals). I really like how you're balancing excellent visuals with efficiency.
March 31, 2007 03:01 PM
MARS_999
Ysaneya, how many different texture files are you going to have for this game? :) I mean wow, from what I seen you got to be swamped with different textures. How large is the texture directory for this game.

April 02, 2007 06:57 PM
Ysaneya
Quote:How many texture units are you using for all of your texturing? I'm curious to see how you've organized all of the various maps (diffuse color, gloss, shadow map, this new misc map, etc).


Hum, let me see:

Artist-made textures:
- diffuse map (RGB)
- opacity map (grayscale)
- specular(gloss) map (grayscale)
- self-illumination map (grayscale)
- bump map (grayscale) or normal map (RGB), artist choice
- ambient occlusion map (grayscale)
- misc map (RGB) for custom colors masks and dirt mask
Note: RGB and grayscale maps get combined into a single RGBA texture whenever possible.

Engine textures:
- shadow map (depends on shadow technique), from 1 to 4.
- reflection cube map
- ambient cube map
- anisotropic lighting lookup texture

Quote:Ysaneya, how many different texture files are you going to have for this game? :) I mean wow, from what I seen you got to be swamped with different textures. How large is the texture directory for this game.


I can't say, textures are not placed in a separate directory; the data files are organized per object, so for example, for the stargazer starship, i've got a "Stargazer" directory that contains both the 3D model and textures for the stargazer.

The total amount of data so far is around 10 GB, but it includes uncompressed textures, many versions of those textures, temporary files, 3D models in various formats, zip archives, etc.. so it's really hard to say.
April 03, 2007 06:42 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement