Author Topic: vertex colors for skyboxes and shading  (Read 3440 times)

0 Members and 1 Guest are viewing this topic.

Offline fightermedic

  • 29
  • quite a nice guy, no really, i am
vertex colors for skyboxes and shading
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
>>Fully functional cockpits for Freespace<<
>>Ships created by me<<
Campaigns revised/voice-acted by me:
Lightning Marshal 1-4, The Regulus Campaign, Operation: Savior, Operation: Crucible, Titan Rebellion, Fall of Epsilon Pegasi 1.1Aftermath 2.1,
Pandora's Box 2.2, Deep Blood

Other Campaigns I have participated in:
The Antagonist, Warzone, Phantoms & Echo-Gate

All the stuff I release is free to use or change in any way for everybody who likes to do so; take whatever you need

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: vertex colors for skyboxes and shading
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.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline fightermedic

  • 29
  • quite a nice guy, no really, i am
Re: vertex colors for skyboxes and shading
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...
>>Fully functional cockpits for Freespace<<
>>Ships created by me<<
Campaigns revised/voice-acted by me:
Lightning Marshal 1-4, The Regulus Campaign, Operation: Savior, Operation: Crucible, Titan Rebellion, Fall of Epsilon Pegasi 1.1Aftermath 2.1,
Pandora's Box 2.2, Deep Blood

Other Campaigns I have participated in:
The Antagonist, Warzone, Phantoms & Echo-Gate

All the stuff I release is free to use or change in any way for everybody who likes to do so; take whatever you need

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Re: vertex colors for skyboxes and shading
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.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: vertex colors for skyboxes and shading
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.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline fightermedic

  • 29
  • quite a nice guy, no really, i am
Re: vertex colors for skyboxes and shading
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
« Last Edit: July 14, 2014, 04:24:27 pm by fightermedic »
>>Fully functional cockpits for Freespace<<
>>Ships created by me<<
Campaigns revised/voice-acted by me:
Lightning Marshal 1-4, The Regulus Campaign, Operation: Savior, Operation: Crucible, Titan Rebellion, Fall of Epsilon Pegasi 1.1Aftermath 2.1,
Pandora's Box 2.2, Deep Blood

Other Campaigns I have participated in:
The Antagonist, Warzone, Phantoms & Echo-Gate

All the stuff I release is free to use or change in any way for everybody who likes to do so; take whatever you need

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: vertex colors for skyboxes and shading
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.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline fightermedic

  • 29
  • quite a nice guy, no really, i am
Re: vertex colors for skyboxes and shading
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!
>>Fully functional cockpits for Freespace<<
>>Ships created by me<<
Campaigns revised/voice-acted by me:
Lightning Marshal 1-4, The Regulus Campaign, Operation: Savior, Operation: Crucible, Titan Rebellion, Fall of Epsilon Pegasi 1.1Aftermath 2.1,
Pandora's Box 2.2, Deep Blood

Other Campaigns I have participated in:
The Antagonist, Warzone, Phantoms & Echo-Gate

All the stuff I release is free to use or change in any way for everybody who likes to do so; take whatever you need

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: vertex colors for skyboxes and shading
this and multiple uv coordinants are features fso has long needed. a generic vertex formmat is the real answer here I think.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Re: vertex colors for skyboxes and shading
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.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: vertex colors for skyboxes and shading
I must be overlooking the crowd of content creators that are all lined up to make use of this feature.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Aardwolf

  • 211
  • Posts: 16,384
    • Minecraft
Re: vertex colors for skyboxes and shading
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.