Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: fightermedic on July 14, 2014, 04:46:46 am
-
does fso currently support vertex colors?
because they can be awesome for skyboxes (and maybe ships too, did anyone say tilemapped ships that have their AO shading through vertex colors?), homeworld2 did it that way, you know:
http://simonschreibt.de/gat/homeworld-2-backgrounds/
shading example:
http://www.blitzbasic.com/Community/posts.php?topic=90523#1029305
-
No, vertex coloring is not supported. Doing so would mean revising the .pof format, and applying it to existing models would require remaking them all, this does not sound very practical to me.
-
ah damn, i feared the .pof could be a problem :(
maybe one of these days fso will be able to support another (not replacing pof!) format than pof...
-
I believe you can still achieve the same effect with shaders if you craft the texture appropriately. You can sample the texture in the vertex shader after all.
-
shading example:
http://www.blitzbasic.com/Community/posts.php?topic=90523#1029305
I would like to point out that the example used there from Super Mario Sunshine was more born from the limitations of the GameCube hardware than anything else. They wanted to do shadowing, but the hardware couldn't pull off shadow mapping or stencil shadowing, and there wasn't enough texture memory available to do baked shadow maps on the terrain (as these require UV mapping). None of these limitations actually apply to us.
-
well, doing something that helps performance never hurts
in case of the skyboxes you can save something like 6 4k textures at the price of 30k polies, that's quite a bit
edit: especially on skyboxes, where dds compression artifacts can be a real problem if you have very colorful nebula backrounds
for those that might be interested, there is a new blog entry on the enemy starfighter page concerning skyboxes and how they can help orientation in 3d space in general, and using veretx colors especially: http://enemystarfighter.com/blog/2014/7/6/you-are-here
-
Sorry, but the big hurdle here is still the fact that at this time, there is no way to get vertex coloring into the engine without adding other model formats. Then there's the small issue of there not being a user-friendly pipeline to create vertex backgrounds that I'm aware of.
Also, please read the article you linked to carefully. Vertex-based backgrounds are perfect for the visual style Enemy Starfighter (and Homeworld 2 before it) shoot for, but for the kind of visuals FSO-based mods are using, bitmapped backgrounds are probably a better way to go.
-
yea sure, just throwing around ideas and links that i think are interesting
baking the homeworld skyboxes to a sphere in blender worked surprisingly well, after i had figured out how to do it (and after i had written a specific .obj to .ply converter, since stupid blender can't read vertex color in .obj files, especially not the buggy way that the homeworld tools create those *sigh*)
i think i'm going to try my hands on creating a vertex color skybox in bleder the next days, let's see what can possibly be done with projection-paint and some cloud brushes!
-
this and multiple uv coordinants are features fso has long needed. a generic vertex formmat is the real answer here I think.
-
And I'll reiterate that unless I'm missing something, it'd be simple enough to achieve an identical visual look already. Create your skybox model, UV it by relaxing everything so all vertices are as spaced apart as possible, then bake your vertex colors into a texture, which can be pretty small. After that, all you need is to 1) modify the vertex shader so that for all skybox models, the shader samples the texture at the vertex position and sets a varying, and 2) modify the fragment shader so that for all skybox models, it uses the aforementioned varying to color the pixel with.
-
I must be overlooking the crowd of content creators that are all lined up to make use of this feature.
-
There are some interesting things that could be done with a genetic vertex format, but this particular application is probably not going to be the one that ultimately results in someone getting off their butt to code it.