colour tint AND light level !!?

Started by don_tomaso, Fri 18/03/2005 23:41:12

Previous topic - Next topic

don_tomaso

a quick question:

is it possible to adjust both the colour tinting and the light level in the same room?  cause in the regioneditor you have to choose between one of them

Goot

Yeah, I think you can only have one at a time. I think it's probably too hard to implement both at the same time, it would just be a whole lot more complicated to program. You can, however, change between having a light level and color tint using SetAreaLightLevel and SetRegionTint.

NiksterG

I'm not an expert or anything (actually, more of a beginner), but maybe you can use one region to change light shade, and then another right on top for color change. (Try ths at your game's risk... It might not work. ::))
Check out my games! (Not all made with AGS)

ZayanM

Sounds reasonable, but you can only have region in an area. You can have regions over other areas though.  :)

GarageGothic

#4
Um, posting without knowing eactly what you're trying to do - couldn't you just tint him a darker shade of the same color? And set all three RGB values to the same number to tint him different shades of gray, thus darkening him without actually changing the color?

don_tomaso

Im having a room where the lightning colour is red, and sometimes blue, and in some areas its very bright, and in some it's very dark, so basicly I want to change the color and the brightness at the same time..
um but I do not quite understand what you mean

Proskrito

i think he means that you can tint, for example, with values like 0,0,20 , and it would tint it with dark blue, or you could use 235,235,255 , and it would tint with light blue. In both cases it would be blue, but one lighter than the other, making the light level unnecessary (sp?)
the higher the number, the lighter the colour, and if you mantain the relationship between r,g and b values, the colour would be similar.
If im not right, im sure someone will know how this works and tell us : )

don_tomaso

hm well that only seems to change the intensity of the colours, not the brightness/darkness ..  so the character only looks more coloured, not brighter/darker

Proskrito

well, you are right, that wasnt the best example, because you would need to add more green to get a light blue : ) . sorry, as i said i wasnt totally sure about that. but the point is the same, you can get the same colour with different brightness by changing RGB values. The easiest way that i can think of would be to pick the colours you want in some paint program, for example, a light blue and a dark blue that you like (or, if you want the same blue, pick one and change its brightness up and down) , and write down their RGB values, and use them in AGS.
That might work (i hope so : ) )

don_tomaso


GarageGothic

#10
Um, it turns out it didn't quite work as I expected. Apparently there's no such thing as luminance for region tinting. However, you can cheat and use another command called SetAmbientTint (or similar, I don't have AGS here). You could either have a "stand on region" trigger for it, or better yet, check the regions in the room's repeatedly_execute_always, so it would also work during blocking events.

Of course this applies to all characters and objects on the screen, so you'd have to check "ignore room lighting" on them, and they wouldn't be able to move through the "tinted" regions.

Khris

You have to make a seperate region for each combination of color tint and light level.
I made a quick example with: dark, dark & blue, blue
Unfortunately, when I tried the same with light & blue, the result wasn't too convincing.

Here's the 'game', including a crappy char :)

Samwise

I see this topic is two years old - is it still not possible to use colour tint & light level at the same time?

I've tried to do that, but no luck yet.

The thing is, I want all the characters (or at least my main character) to become 10% lighter and -15% bluer, without having to import hundreds of sprites again.  Is it possible to achieve that way or another?



Ashen

Take a look at GG's post a few up, and at Character.Tint. Using that in rep_ex(_always) you should be able to adjust the tint AND brightness of a character while they're on a given Region. It shouldn't be too much harder to make it apply to all characters (e.g. use a while loop to check them all).

There's still no way to do it directly in the editor, though.
I know what you're thinking ... Don't think that.

Samwise

#14
Thank you, this is a great feature I wasn't aware of.  I'll try it out.

EDIT:
Well, I applied the tint thing to my main character in the global script.  It works fine, but when I run the game it seems that the light level I previously applied in the regions isn't working anymore (i. e. no shadows/lights).

Ashen

I think that's normal behaviour for this and SetAmbientTint.
I know what you're thinking ... Don't think that.

Samwise

So basically, you can't use shadows and tint for the same character, right?

The thing is, I'm trying to make the character less red, and a little brighter, at the same time.

cOser.Tint(85, 100, 100, 22, 110);  won't work, because for some reason the luminance can't be more than 100.

Is there any way to "trick" the system to do that?

Scorpiorus

I believe you cannot only make it less red with the Character.Tint() function. What it does, is saturating sprite colours towards a specified colour, i.e. it re-colourizes colours to shades of the specified colour (with 100 in saturation it will completely re-colourize them). So it affects all channels, not just the red one.

I would suggest making a GUI with five sliders for R, G, B, Saturation and Luminance. Then make a script to change character colours according to slider values and then run the game and try to pick out the values that suit best for the look you want.

Samwise

I see.  I guess it's the best that can be done.

SMF spam blocked by CleanTalk