how to set opacity for my sprites?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 08 August 2008   #1
how to set opacity for my sprites?

Hi! So, I'm wondering about how i can set proper opacity for some sprites. my problem is this:

1: I cannot create sprite images with an alpha channel and use that, because i'm deriving the colours of the sprites from a single filetexture.
2: I cannot just add an opacity attr. per object, because that just sets an equal opacity level for the entire sprite. What i want is to have a circular form, with a completely opaque sprite in the middle with a falloff and 0 opacity at the edges.
3: When I add opacityPP, and try to hook it up to a UVRamp, or any other Ramp for that matter, I don't get desirable results. I don't even get result I can understand at all.

Can anyone help at all?

Thanks.

Dougie
 
Old 08 August 2008   #2
I am not sure why you can't just use an image with an alpha. Why can't you use two file textures? And if not just map it in the hyper shade using the same file texture node going to both the alpha and color channel.
__________________
My Homepage
My Vimeo Channel
 
Old 08 August 2008   #3
Well, I'm using a filetexture on the NURBS plane I'm emitting from, and under the Texture Emission rollout on the emitter, there is an option to inherit the colour of that texture. So, basically the particle (in this case the sprite) gets assigned the particular colour the texture has on the spot where the particle gets created. This is good. But it is just a flat colour, so I am stuck with a bunch of squares that don't really blend in with each other.
One can also choose to inherit the opacity of the texture, but there is no opacity on this texture. I want emission to occur from the entire surface and if I use an alpha channel on this image, then I will end up either not emitting from parts of the surface, or emitting just transparent sprites, which are of no use to me.
What I need is that each sprite gets created with the colours as explained, but doesn't look like an opaque square, but has a falloff in opaqueness/transparency towards the edges. This so that every "sprite-pixel" will blend in with the other particles. And, I've tried to use ramps to do this, but I don't anything near what I want.

Confused.

Dougie
 
Old 08 August 2008   #4
Ahh I see your delima. Well off the top of my head I can think of a quick workaround. You could get the sim you like then bake it out. After you bake it out just put a new file texture on the sprites that represents the alpha you want. Then use that pass as a replacement alpah channel in comp. I know this is a workaround, but thats all I can think of off the top of my head.

Hope it helps,
James
__________________
My Homepage
My Vimeo Channel
 
Old 08 August 2008   #5
If you load your sprite up with a file that has alpha but no image ie white canvas it will inherit the color of your emitter file and multiply that over your white sprite file so still retaining colour emission and have the alpha.
__________________
Vimeo
 
Old 08 August 2008   #6
thank you for the replies, hkspowers and Aikiman.
Sounds like an excellent suggestion Aikiman. I'll try it out as soon as I have time. And I think the workaround can be a useful technique too, but if it works with sprites within Maya, that would be great.

Edit: hmm, just a thought. If my sprite file is not white, but also has colour information, like a regular file texture, will the different colours interact, or will one override the other?

Dougie

Last edited by dougie0047 : 08 August 2008 at 08:06 AM.
 
Old 08 August 2008   #7
Originally Posted by dougie0047: thank you for the replies, hkspowers and Aikiman.
Sounds like an excellent suggestion Aikiman. I'll try it out as soon as I have time. And I think the workaround can be a useful technique too, but if it works with sprites within Maya, that would be great.

Edit: hmm, just a thought. If my sprite file is not white, but also has colour information, like a regular file texture, will the different colours interact, or will one override the other?

Dougie


It will multiply the values over each other so your sprite image will have the color information added on top I believe.
__________________
My Homepage
My Vimeo Channel
 
Old 08 August 2008   #8
Mulitplied I think rather than added.
__________________
Vimeo
 
Old 08 August 2008   #9
Talking

Ahh yeah that's what I meant lol. Good catch.
__________________
My Homepage
My Vimeo Channel
 
Old 08 August 2008   #10
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:38 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.