Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Pages: [1] 2  All

Author Topic: decoration regions with more than 1 color  (Read 18258 times)

0 Members and 1 Guest are viewing this topic.

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
decoration regions with more than 1 color
« on: May 01, 2003, 06:17:16 PM »

I have a very dark corner in my game and I want when the character goes there to be darker. I know that I have to create a decoration region and give it a color (a dark one in this case). The problem is that I don't want my character to become dark in 1msec, I want him to be darker and darker as he approaches the dark spot. So I have created 5 different decoration regions. I don't know if it's possible to implement this, but what I'd like to be able to do is what I described but with only 1 region (give a color to the two opposite sides and the engine determines the colors between).
Logged
fl*p

Jeroen

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 51
  • I'm a llama!
    • View Profile
Re:decoration regions with more than 1 color
« Reply #1 on: May 02, 2003, 09:18:10 AM »

Yes, I suggested this a while ago too, but my guess it's rather hard to make a lineair/circular gradient with polygon regions.

A tip that works, but certainly isn't ideal:
Place a TGA file on top of the character/scene nodes. This TGA file is the gradient, e.g make it 20% transparent in the middle, and 0% transparant at the borders.
Logged

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re:decoration regions with more than 1 color
« Reply #2 on: May 02, 2003, 09:22:14 AM »

Quote
Place a TGA file on top of the character/scene nodes. This TGA file is the gradient, e.g make it 20% transparent in the middle, and 0% transparant at the borders.

Thanks Jeroen, I should try this   (but as you said it's not ideal).
Logged
fl*p

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:decoration regions with more than 1 color
« Reply #3 on: May 02, 2003, 10:26:19 AM »

Yes, I suggested this a while ago too, but my guess it's rather hard to make a lineair/circular gradient with polygon regions.

The only way I can think of is to define a center point and a radius for the region. Then you'd define a color for the center and a color for the outer edge of the circle, and the actual color within each point of the region would be an approximation between those two colors...
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re:decoration regions with more than 1 color
« Reply #4 on: May 02, 2003, 11:08:06 AM »

Since the regions are vectors can't they contain gradients (like for example illustator files, coredraw files, vector EPS.. etc)? I guess that you have to change their format a little for this to work (are any of the above vector files have any documentation?)
Logged
fl*p

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:decoration regions with more than 1 color
« Reply #5 on: May 02, 2003, 12:45:17 PM »

I think the gradient *should* be circular, so that it doesn't matter from which direction does the actor approach the "darkest spot".

And I believe the gradient in graphics programs do work approximately the way I described above, don't they? Center point, direction, two colors?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re:decoration regions with more than 1 color
« Reply #6 on: May 02, 2003, 09:02:17 PM »

I think the gradient *should* be circular, so that it doesn't matter from which direction does the actor approach the "darkest spot".

And I believe the gradient in graphics programs do work approximately the way I described above, don't they? Center point, direction, two colors?

No exactly. Gradients could be "radial" (like what you described) but can also be "linear" (that is from one edge to another and NOT in the middle). And about the colors: they could contain more than 2 colors. For example, white in one edge that goes to blue in the middle that goes to red to the other edge. So a gradient could have as many colors as someone wants. If you like when I get home (that is in 1-2 days) I can create some examples for you.
Logged
fl*p

Jeroen

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 51
  • I'm a llama!
    • View Profile
Re:decoration regions with more than 1 color
« Reply #7 on: May 13, 2003, 11:27:46 PM »

Yes, I agree that both radial and linear would be ideal.
But...if I had to choose, I'd choose "radial".

But how are you going to do that with polygons, Jan?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:decoration regions with more than 1 color
« Reply #8 on: May 14, 2003, 09:15:37 AM »

Well, they will behave like radial, but they will only affect the actor when he's inside the polygonal region. That's my idea.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

obleo

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 18
  • Hail to the King baby!
    • View Profile
Re:decoration regions with more than 1 color
« Reply #9 on: May 15, 2003, 12:39:16 PM »

You could always do something similiar to what SLUDGE does.  That is, have a "LightMap" layer in the scene which is nothing more than an invisible image that describes the brightness/colorizing of the actor.  The brightness and color of the lightmap pixel at the point the actor is standing is used to adjust the brightness/color of the actor.  
Logged

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re:decoration regions with more than 1 color
« Reply #10 on: May 15, 2003, 12:49:11 PM »

You could always do something similiar to what SLUDGE does.  That is, have a "LightMap" layer in the scene which is nothing more than an invisible image that describes the brightness/colorizing of the actor.  The brightness and color of the lightmap pixel at the point the actor is standing is used to adjust the brightness/color of the actor.  

That's a very good idea! Well... what do you thing mnemonic?
Logged
fl*p

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re:decoration regions with more than 1 color
« Reply #11 on: May 15, 2003, 01:25:39 PM »

You could always do something similiar to what SLUDGE does.  That is, have a "LightMap" layer in the scene which is nothing more than an invisible image that
That's a very good idea! Well... what do you thing mnemonic?

UH - I don't like these map layers...  :( I prefer the existing region concept added by radial and maybe linear gradient possibilities. Although I have to admit there are more possibilities with a map, but this should be optional in my opinion...
Logged
Mooh!

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:decoration regions with more than 1 color
« Reply #12 on: May 15, 2003, 01:26:39 PM »

Indeed! And easy to implement too :) The only disadvatage is that it would take up much more memory that the decoration regions. On the other hand, the image could be 256 colors... Hm, I think I'll do this. Thanks :)
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:decoration regions with more than 1 color
« Reply #13 on: May 15, 2003, 01:32:14 PM »

Is it just me or is the forum slow today :-( I was sending my post befor Jerrot's reaction.


UH - I don't like these map layers...  :( I prefer the existing region concept added by radial and maybe linear gradient possibilities. Although I have to admit there are more possibilities with a map, but this should be optional in my opinion...
I think it would be very suitable for the actors' shading, very easy to create gradients. Of course, it would be optional; the regions have other important tasks. For example, you can easily turn them on/off, change their color etc. Something that would be impossible with the color-map image.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re:decoration regions with more than 1 color
« Reply #14 on: May 15, 2003, 02:16:16 PM »

Is it just me or is the forum slow today :-( I was sending my post befor Jerrot's reaction.

Yes, it seems to become slower daily... but not only the forum, the whole server reacts very slowly, it took me 15 minutes to send the last post...

I think it would be very suitable for the actors' shading, very easy to create gradients. Of course, it would be optional; the regions have other important tasks. For example, you can easily turn them on/off, change their color etc. Something that would be impossible with the color-map image.

Yes, that's what I was thinking about (thinking of that blinking light in the demo).
Ok, you're right, for a global shading it's great!

Anyway it would be helpful if the regions understood gradients, too. Think of some item in the scene, that drops a large shadow - and you take this item or it moves or whatever.
Removing the shadow can only work with regions here.
Logged
Mooh!
Pages: [1] 2  All
 

Page created in 0.02 seconds with 24 queries.