Please login or register.

Login with username, password and session length
Advanced search  

News:

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

Author Topic: Saturation  (Read 3294 times)

0 Members and 1 Guest are viewing this topic.

Birdline

  • Supporter
  • Occasional poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 57
    • View Profile
    • Birdline Web Site
Saturation
« on: November 23, 2008, 12:59:11 AM »

Hi all,
I wonder if it is possible to change the saturation of an object (or even the whole scene).
I mean to change it from color to grayscale (B&W).
Using the MakeRGBA or MakeHSL, only give me a color tint not a greyscale effect.

Best regards,
Spyros

sychron

  • Wanderer zwischen den Welten
  • Global Moderator
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 223
  • There is no spoon. The enemy gate is down!
    • View Profile
Re: Saturation
« Reply #1 on: November 23, 2008, 10:26:48 AM »

Hmm, you're not alone with this problem: http://forum.dead-code.org/index.php?topic=2995.0
Logged
... delete the inner sleep ...

sychron

  • Wanderer zwischen den Welten
  • Global Moderator
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 223
  • There is no spoon. The enemy gate is down!
    • View Profile
Re: Saturation
« Reply #2 on: November 23, 2008, 10:30:55 AM »

Hmm, both topics read as if the Engine uses HSV instead of HSL:
http://en.wikipedia.org/wiki/HSL_and_HSV
Logged
... delete the inner sleep ...

Birdline

  • Supporter
  • Occasional poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 57
    • View Profile
    • Birdline Web Site
Re: Saturation
« Reply #3 on: November 23, 2008, 01:23:09 PM »

As I understand it by making some tests,
The L value must be <255 to have any difference (so you will have always less brightness).
The S value must be >0 (so you can never have desaturation).
The H value sets the coloring (I think it is 0-360).
The image is made using
var SomeEntity = Scene.GetNode("book");
SomeEntity.AlphaColor = MakeHSL();



Best regards,
Spyros
 

Page created in 0.031 seconds with 19 queries.