Page 1 of 4

CEG's got me beat

Posted: 09 Apr 2011, 22:36
by SanadaUjiosan
As I briefly stated in the WIP thread, I've started trying to unlock the secrets of CEG to give Conflict Terra some cell-shaded/cartoony looking effects. I decided to start with muzzle flares, as it appeared the easiest, and I figured I could begin with the easy stuff to get a handle on this new spring territory.

I failed.

What I'm wanting is something like this:

Image

This is a quick, crude mock-up of what i'm thinking about. Snoop and I determined some kind of outline will be important for the look we're going for.

Of course, it appears the CEG system does not like black. Accursed light. So my question is, is this possible, if possible, how would I do it. I am not well-versed in the parts of digital imagery dealing with channels, RGB, alpha, and whatnot.

I at first tried targas, all black with white sections for the actual effects, then I tried .pngs with alpha around a black-outlined section of white.

Suggestions?

Re: CEG's got me beat

Posted: 10 Apr 2011, 21:06
by SanadaUjiosan
No one knows!

Re: CEG's got me beat

Posted: 10 Apr 2011, 21:17
by knorke
SanadaUjiosan wrote:So my question is, is this possible
Image
i once got this by accident when i tried to do a "projectile hits metal and sparks fly off" effect. so black is possible but i have no idea how. (i did not save the files as it did not look like what i wanted at the time)

Re: CEG's got me beat

Posted: 10 Apr 2011, 21:23
by SanadaUjiosan
That looks like when you set the Alpha to too high of a value. It would be good, but the square image totally doesn't work. I need something where black and the alpha channel can co-exist.

Re: CEG's got me beat

Posted: 10 Apr 2011, 21:39
by KiviTheBird
Use just thin white stripes from white to yellow. it will look more like sparks. 30% to the cannon 20 degrees spread 50% to the ricoshet direction 30 degrees spread. 20% spread at all direction hemishere on contact plane. also add 10% "stars" and flash and smoke on hit
Image

Re: CEG's got me beat

Posted: 11 Apr 2011, 01:35
by Beherith
This may or may not be of assistance:

Image

Re: CEG's got me beat

Posted: 11 Apr 2011, 03:57
by SanadaUjiosan
This isn't a matter of "what should it look like?"

Its a matter of "how do I do this?"

The goal is to get the black outline visible when the CEG triggers.

If someone could provide an example sprite, example script, even a "yeah I've done this" or "Nope, can't do it", I'd appreciate it.

If no one's really sure what I'm going for, I can try and photoshop what I'm wanting.

Re: CEG's got me beat

Posted: 11 Apr 2011, 04:35
by bobthedinosaur
try these
you just make the image you want to see 100% alpha and the other parts non alpha.. unless I am missing the point? or do you want the blakc part only, and no inside?

Re: CEG's got me beat

Posted: 15 Apr 2011, 06:34
by SanadaUjiosan
Image

That's what happens when I use that .tga from your upload. As you can see, what was black becomes alpha and is transparent.

To be clear, this is like what I want:

Image

Here is the ceg file, if that helps any.

Code: Select all

return {
	["ct_machinegun_muzzle"] = {
		bitmapmuzzleflame = {
			ground             = true,
			air                = true,
			water              = true,
			class              = [[CBitmapMuzzleFlame]],
			count              = 1,
			underwater         = 1,
			properties = {
				colormap           = [[1 0.9 0 0.01	    1 0.7 0 0.01     1 0.5 0 0.01]], --Colour map progress from one to next. Colors in RGBA
				dir                = [[dir]],
				frontoffset        = 0,
				fronttexture       = [[ct_machinegun_front]],
				length             = 12,
				sidetexture        = [[ctflare]],
				size               = 4,
				sizegrowth         = 1,
				ttl                = 3,
			},
		},

		groundflash = {
			air                = true,
			ground             = true,
			water              = true,
			circlealpha        = 0.6,
			circlegrowth       = 0,
			flashalpha         = 0.2,
			flashsize          = 10,
			ttl                = 17, --Time To Live
			--Red Green Blue
			color = {
				[1]  = 1,
				[2]  = 0.8,
				[3]  = 0,
			},
		},
	},
}

Re: CEG's got me beat

Posted: 16 Apr 2011, 00:33
by Forboding Angel
Use png

I will yell this a zillion times. Use PNG!

Now, how do do it. Aww fuckit I'll do it for you. Gimmie a few minutes.

http://evolutionrts.info/random/sanadaceg.png << right click, save as.

Now. If yer doin it rite, it will work correctly out of the box. If yer doin it rong... YER DOIN IT RONG! :-)

Re: CEG's got me beat

Posted: 16 Apr 2011, 00:59
by knorke
If yer doin it rite, it will work correctly out of the box.
so how did you do it.

Re: CEG's got me beat

Posted: 16 Apr 2011, 01:11
by SanadaUjiosan
I must be doing it wrong. Same result.

Was the right way to do it save as, put in bitmaps/projectiletextures, make sure its properly cited in resources.lua and then make sure the CEG is calling the right texture?

Re: CEG's got me beat

Posted: 16 Apr 2011, 01:44
by oksnoop2
Forboding Angel wrote:Use png

I will yell this a zillion times. Use PNG!

Now, how do do it. Aww fuckit I'll do it for you. Gimmie a few minutes.

http://evolutionrts.info/random/sanadaceg.png << right click, save as.

Now. If yer doin it rite, it will work correctly out of the box. If yer doin it rong... YER DOIN IT RONG! :-)

Pics or it did not happen.

Re: CEG's got me beat

Posted: 16 Apr 2011, 01:54
by Forboding Angel
Gah, gotta update ct svn. What is the unit your trying to use this on? I didn't realize you guys were doing it that way (didn't look at the ceg posted), so that explains a little bit.

Edit: Bad news, my idea/way won't work QQ

Black is seen as transparent in cegs, even on png (which is retarded and is technically a bug).


Edit: Also, LOL. Maek implement: http://springrts.com/phpbb/viewtopic.php?f=23&t=21835

Re: CEG's got me beat

Posted: 16 Apr 2011, 02:42
by SanadaUjiosan
Image

Should I post this... somewhere... for the devs to know to fix, or is it already on a to-do list (maybe a dusty one?)

Re: CEG's got me beat

Posted: 16 Apr 2011, 02:48
by Forboding Angel
Well, technically it isn't broken. Black = transparent on pngs ins't real clever and imo is a bug, but that won't really help you out much.

CEG's on muzzle flashes and things like that aren't really designed to display black on the edges. Pick any other color and it's doable, but muzzle flashes are designed to follow the colormap.

Edit: I know how you cna do it. Add a piece to your models that is shaped like that. Texture it using that, and show/hide when the unit fires (it's what OTA did for muzzle flares).

Re: CEG's got me beat

Posted: 16 Apr 2011, 04:44
by knorke
if there is an alpha channel spring should just use that transparency instead of the color black

Re: CEG's got me beat

Posted: 16 Apr 2011, 05:58
by SanadaUjiosan
Forboding Angel wrote:Edit: I know how you cna do it. Add a piece to your models that is shaped like that. Texture it using that, and show/hide when the unit fires (it's what OTA did for muzzle flares).
Ugh, I'm not going to go back and redo every unit for that.

Well, drats. Looks like we'll have to pursue an alternate look.

Re: CEG's got me beat

Posted: 16 Apr 2011, 06:03
by bobthedinosaur
did you try it with a near black?

Re: CEG's got me beat

Posted: 16 Apr 2011, 06:37
by knorke
will probally be near transparent