Model Tranparencies...

For developmental things relating to the graphics of the game.
Post Reply
User avatar
Misery
Round Winner
Posts: 285
Joined: Thu Dec 30, 2004 12:37 pm

Model Tranparencies...

Post by Misery »

I think (in a modeling standpoint) that transparencies on cycle models would be a wonderful thing! :) I know as of now, it is not supported. But are there any plans in the future to make it so? Or would it be possible? Take for instance... Someone is making a model of say.. a skeleton. You COULD model all the ribs and such individually, but depending on hardware, that could seriously hurt the frame rate of the game. It also can be done by making a low poly cage for the ribs and making a rib texture. But without transparencies, it looks like a black block painted with ribs. With transparencies, you could model the ribs in the same way so it would actually look like a skeletons rib cage.

I'm sure this has been touched on before, but I think it would also be a nice idea to have a roster of different cycles. Something like choosing your player models in <insert FPS game name here>, or any other game like that.

Wishful thinking aside... model transparencies WOULD be awesome! Possibly? Maybe? :)
"Music can name the unnameable and communicate the unknowable."
~Leonard Bernstein
User avatar
sinewav
Graphic Artist
Posts: 6413
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Re: Model Tranparencies...

Post by sinewav »

Could you conceivably make a cycle model with a somewhat transparent canopy? Alpha channel on cycle wheels drums up interesting possibilities too... I support this idea! Too bad I can't support it with code.
User avatar
Misery
Round Winner
Posts: 285
Joined: Thu Dec 30, 2004 12:37 pm

Re: Model Tranparencies...

Post by Misery »

Ooooo.. OOooooo.... Animated models! More than just rotating wheels. Just another though...
"Music can name the unnameable and communicate the unknowable."
~Leonard Bernstein
User avatar
sinewav
Graphic Artist
Posts: 6413
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Re: Model Tranparencies...

Post by sinewav »

While were at it, animated textures too! :P
Word
Reverse Adjust Outside Corner Grinder
Posts: 4258
Joined: Wed Jan 07, 2009 6:13 pm

Re: Model Tranparencies...

Post by Word »

glowing, mirror/reflexion effects, reliefs, fog, global illumination, diffusion, fresnel refraction....everything! :)
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Re: Model Tranparencies...

Post by Jonathan »

Let's start with fitting this sort of thing on the 'engine' without too much duct tape:

Code: Select all

// texture contents compared to typical rgba: rgba' = vec4(a*r, a*g, a*b, 1-a)
uniform sampler2D texture;
uniform vec3 color;

void main()
{
	vec4 sample = texture2D(texture, gl_TexCoord[0].st);
	gl_FragColor = vec4(sample.rgb + sample.a * color, 1);
}
ˌɑrməˈɡɛˌtrɑn
User avatar
Misery
Round Winner
Posts: 285
Joined: Thu Dec 30, 2004 12:37 pm

Re: Model Tranparencies...

Post by Misery »

C'mon Word, let's not be greedy. Baby steps, man... Baby steps. lol

Jonathan, as for that code... I haven't the slightest clue what that is for. Have a good idea, but that's about it. :P

/me programming dummy.
"Music can name the unnameable and communicate the unknowable."
~Leonard Bernstein
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Re: Model Tranparencies...

Post by Jonathan »

It's a simple pixel shader that blends the cycle texture over a cycle's color. Because right now, every cycle gets its own texture with its color baked in. My shader does it on the fly, and it's dirt cheap at that.

Basically, get shaders going! Also a subliminal message to use premultiplied alpha, the undivided approach to alpha blending.
ˌɑrməˈɡɛˌtrɑn
User avatar
Misery
Round Winner
Posts: 285
Joined: Thu Dec 30, 2004 12:37 pm

Re: Model Tranparencies...

Post by Misery »

So can/will that code thingy (Yes, I said 'thingy'. heh) be implemented in future releases?
"Music can name the unnameable and communicate the unknowable."
~Leonard Bernstein
User avatar
Phytotron
Formerly Oscilloscope
Posts: 5041
Joined: Thu Jun 09, 2005 10:06 pm
Location: A site or situation, especially considered in regard to its surroundings.
Contact:

Re: Model Tranparencies...

Post by Phytotron »

text
Attachments
B&Bthingy.jpg
B&Bthingy.jpg (51.34 KiB) Viewed 7706 times
User avatar
MrsKsr
Shutout Match Winner
Posts: 807
Joined: Fri Feb 20, 2009 2:37 am
Location: Paris
Contact:

Re: Model Tranparencies...

Post by MrsKsr »

B&B <3 (Though when that was still on tv I wasn't really supposed to watch it but still)
"You may say I'm a dreamer but I'm not the only one;
I hope some day you will join us, and the world can live as one"


“Too often we underestimate the power of a touch, a smile, a kind word, a listening ear, an honest compliment, or the smallest act of caring, all of which have the potential to turn a life around.”

I believe that to truly love is the ultimate expression of the will to live.
Post Reply