alphatest-based building

alphatest-based building

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

alphatest-based building

Post by KDR_11k »

A simple idea: Instead of using the normal wireframe building graphic, let modders choose to have it use alphatest instead. That'd work as follows:

During construction, the model is drawn normally instead of wireframed or anything like that, however it is done while setting glAlphaFunc to GL_GEQUAL and the completion percentage of the build job. The source alpha channel could be one channel from the second texture assigned to s3os.

Purpose: This would allow a modder to define exactly how a unit is built. A vertical gradient across the unit would mean a simple buildup as it's today, other variations would e.g. building the torso of a unit first and having the limbs grow from it, a building appearing bit by bit (by having each bit have a single alpha value) or an infection spreading across the land. This could also be applied to ground decals so they don't just pop into existence.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Cool idea, but it needs to come after an abstraction of the unit drawing system, it's too messy already.
Very nice though, never thought about it myself that way.
User avatar
FizWizz
Posts: 1998
Joined: 17 Aug 2005, 11:42

Post by FizWizz »

Wow, awesome concept!
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Post by SinbadEV »

I was thinking of giving the scriptor/or model degfinition some "while building" code would give this type of effect... but this implimentation would give a quick and dirty but functional implimentation... hurray for divergent mental processes.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

You could use the Create() function of the BOS for scripted building as long as the wireframes are disabled (which IIRC is a feature in the next version of Spring).

In combination with this you could have a construction scaffold build up before the actual building appears and have the scaffold disappear bit by bit when the building nears completion. Would probably work well for realism mods.
User avatar
Cabbage
Posts: 1548
Joined: 12 Mar 2006, 22:34

Post by Cabbage »

an infection spreading across the land.
I love it!
User avatar
FireCrack
Posts: 676
Joined: 19 Jul 2005, 09:33

Post by FireCrack »

Ver good idea, as jc said we probably need cleanup first though.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Cabbage wrote:
an infection spreading across the land.
I love it!
Time to unleash the rabbits of doom on that cabbage infestation.


But nice idea, really. Would be cool if the build up could use a scripted animation too, like an animated crane which only appears during construction and then disappears back into the ground and hides.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

They already can despite someone (is it you) continuosly sayign it's impossible.

The onyl reason building startups havent been scritped in any units yet is because the nanoframe makes it look stupid. However i myself added an fbi tag that turns off the nanoframe in the next version so it's once again feasable. Nanospray can be turned off now too.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

It needs cleanup, and actually I don't want you to add new tags that I have to support again when I clean it up.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

No I'm not saying it's impossible, but I haven't done any animation scripting yet thus I didn't know that. Well I guess I do now. :oops:
Post Reply

Return to “Feature Requests”