Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Pages: 1 2 [All]

Author Topic: decoration regions with more than 1 color  (Read 18257 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!

Jeroen

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 51
  • I'm a llama!
    • View Profile
Re:decoration regions with more than 1 color
« Reply #15 on: May 16, 2003, 08:46:12 AM »

I have to agree with Jerrot here. The concept and big advantage of SceneEdit is that a lot of actions can be performed real time: placing the actor, looking at the animations in the scene, scaling/rotating, z-order, even the sounds work there already, etc.
A lightmap layer would break this concept a bit and cost memory (perhaps not much but still) - I prefer the linear/radial idea. Yes, this could be difficult to do...I think it's up to Jan to measure the pros and cons :)
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 #16 on: May 16, 2003, 09:53:05 AM »

I have to agree with Jerrot here. The concept and big advantage of SceneEdit is that a lot of actions can be performed real time: placing the actor, looking at the animations in the scene, scaling/rotating, z-order, even the sounds work there already, etc.
A lightmap layer would break this concept a bit and cost memory (perhaps not much but still) - I prefer the linear/radial idea. Yes, this could be difficult to do...I think it's up to Jan to measure the pros and cons :)

I lost you here. Can't we have both two methods and choose the best in a case by case matter (this sentence reminds me of something... I can't remember :) ). What would a new method could harm? And why a lightmap layer can't be shown in the preview panel at real-time when we place an actor, like with the decoration regions?

PS. I am following "our still unamed project joe" since the beginning. I am one of the oldest and biggest fans. Keep up the good work. :)
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 #17 on: May 16, 2003, 10:34:52 AM »

Quote
lost you here. Can't we have both two methods and choose the best in a case by case matter (this sentence reminds me of something... I can't remember  ). What would a new method could harm? And why a lightmap layer can't be shown in the preview panel at real-time when we place an actor, like with the decoration regions?

Let me be a bit more clear :) Adding a method doesn't hurt indeed, that I agree on. With the real-time thingie I was referring to: real time editing. With the radial and linear stuff I can imagine the user being able to select two colors, being able to move the centre point with radial gradients and so on. The whole thing happens in SceneEdit. Now the layer would mean I have to switch to Photoshop or something and adjust the layer until it's okay in SceneEdit. Okay, it's not THAT bad, it's merely that I prefer the radial/linear thing.

Quote
PS. I am following "our still unamed project joe" since the beginning. I am one of the oldest and biggest fans. Keep up the good work.  


Thanks :) Always good to hear :) Thanks to WME this project is alive and kicking! (euh and because o all the other teammembers ofcourse!) Where can I find of your work btw?
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 #18 on: May 16, 2003, 10:35:42 AM »

Quote
Can't we have both two methods and choose the best in a case by case matter
Agreed. The best way will be to have both ways :)
I'm still not sure how to define the gradient decoration regions. They will have two colors, that's for sure. For radial ones, there must be a center point and a radius. For linear ones, there must be... what? Two points, and a direction? I'll limit the direction to straight lines (i.e. 0 degrees or 90 degrees).
Should be enough, nah?
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 #19 on: May 16, 2003, 10:36:03 AM »

(damn, I'm late again! :))
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 #20 on: May 16, 2003, 10:46:19 AM »

Let me be a bit more clear :) Adding a method doesn't hurt indeed, that I agree on. With the real-time thingie I was referring to: real time editing. With the radial and linear stuff I can imagine the user being able to select two colors, being able to move the centre point with radial gradients and so on. The whole thing happens in SceneEdit. Now the layer would mean I have to switch to Photoshop or something and adjust the layer until it's okay in SceneEdit. Okay, it's not THAT bad, it's merely that I prefer the radial/linear thing.

Oh...ok... I understood. I too prefer the radial/linear vector regions. But every new method is a good thing

Quote
Thanks :) Always good to hear :) Thanks to WME this project is alive and kicking! (euh and because o all the other teammembers ofcourse!) Where can I find of your work btw?

Well, there are 2 screenshots in the "anouncement forum". just check the one post there that is started by me. The first demo (with about 20-25 backgrounds and a few VERY simple puzzles) will be ready in 2 weeks from now.
« Last Edit: May 16, 2003, 10:48:15 AM by odnorf »
Logged
fl*p

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 #21 on: May 16, 2003, 10:59:16 AM »

For linear ones, there must be... what? Two points, and a direction? I'll limit the direction to straight lines (i.e. 0 degrees or 90 degrees).
Should be enough, nah?

I am not sure I understood you. What I am thinking for the linear gradients. Is to just define the direction (by degrees as you said). And just place that gradient inside that vector region. That way you wouldn't need to care if the vector is a square, a cyrcle, etc. This is the way both Illustrator and CorelDraw work.

Two suggestuins for the second way (with bitmaps).
1)I think you could make the bitmaps stretchable, so that we could just create a gradient in photoshop and then stretch it as we like in real-time in the preview panel.
2) You can make the vector regions to contain bitmaps. This way the vector region should work like a mask for the bitmap. So we can limit the bitmap in the regions we like in real-time again.
Logged
fl*p

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 #22 on: May 16, 2003, 11:00:15 AM »

(damn, I'm late again! :))

(ok...ok... I was kidding when I said to you to "slow down". :))
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 #23 on: May 16, 2003, 12:29:37 PM »

Hmmm....okay I officially agree with everyone's last post now.

 ;D
« Last Edit: May 19, 2003, 02:51:56 PM by Jeroen »
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 #24 on: May 16, 2003, 12:37:18 PM »

Hmmm....okay I officially agree with anyone's last post now.

 ;D

I didn't quite unterstand what you are saying here. Is it my poor english or the fact that I am drunk now? ;D
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 #25 on: May 16, 2003, 01:24:18 PM »

I am not sure I understood you. What I am thinking for the linear gradients. Is to just define the direction (by degrees as you said). And just place that gradient inside that vector region.
Yes, you are right, of course. The boundaries are given by the region's bounding box.
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 #26 on: May 24, 2003, 09:55:12 AM »

Hmmm....okay I officially agree with anyone's last post now.

I didn't quite unterstand what you are saying here. Is it my poor english or the fact that I am drunk now? ;D

He supports everything that everybody wrote in his last post here. And yep, you were drunk! ;)
Logged
Mooh!
Pages: 1 2 [All]
 

Page created in 0.022 seconds with 23 queries.