Shininess generator ("vs_shingen"?)

Development directions, tasks, and features being actively implemented or pursued by the development team.
Post Reply
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Shininess generator ("vs_shingen"?)

Post by chuck_starchaser »

We need to quickly generate shininess maps for all game units that don't have them.
I was suggesting to Klauss that we write a tool for this in Python.
The algorithm would be based on the "material_AI" I wrote for the ubershader.
It would additionally fix the diffuse and specular textures, by trying to guess the intended material
and representing it more correctly.
Additionally, it could produce a normalmap, if one isn't present.

If the tool is command-line, I'd suggest it features a settings file that could look like,

nvcompress_path = /usr/bin/nvcompress
source_textures_folder_start_at = ~/vs/masters/units/vessels
target_textures_folder_start_at = ~/vs/data/units/vessels
save_new_masters = true
default_target_texture_prefix = ""
default_target_texture_suffix = ""
default_target_texture_extension = "texture"
default_target_texture_size = same_as_input
default_input_gamma = "auto"
default_output_gamma = "2.0"
overwrite_diffuse_RGB = true
overwrite_specular_RGB = true
overwrite_damage_RGB = true
generate_normalmap = true
overwrite_normalmap = true_but_with_backup
ask_for_bumpmap = false

EDIT:
Would be nice to have a histogram, or histograms based on chroma for colors above a given saturation; and by luma for colors of low saturation. That way I could group colors (in the same cloud) as being just shades of the same material, and give them a common shininess; and use their luma variabilities for normalmapping. Material-material boundaries would then NOT cause normalmap features.
Having a limited number of materials, in like a list or array, I could do something to spread them around in the real materials' spectrum, to produce visual variety; which I can't do on a texel by texel basis...
Post Reply