Shader Effect

  • #1, by ke4Saturday, 25. October 2014, 11:12 10 years ago
    Hi,

    Can i use the shader effect only for the character?
    e.g. when is dark outside, change the lightness of the character.

    Thanks

    Key Killer

    810 Posts


  • #2, by afrlmeSaturday, 25. October 2014, 11:50 10 years ago
    You can already do that with lightmaps or the CharacterTint data structure table which allows you to tint the character. Or do you mean in a more dynamic way where character lighting is affected based on characters position from a light source?

    The latter would probably be done via normal maps/depth maps which we currently don't support.

    I suppose you could use the shader spotlight effect to place multiple light sources around a room which will render the rest of the scene darker in places that the light does not extend which would also affect your character as he passes through light & darkness.

    I've not tried doing anything like that yet, but I assume it would probably look ok.

    Imperator

    7278 Posts

  • #3, by ke4Saturday, 25. October 2014, 12:02 10 years ago
    No, just simple non-dynamic effect, i've done shadows on the scene like PNG images with alpha, which affects the character. Where can i find options for those Tints in visionaire?

    Key Killer

    810 Posts

  • #4, by afrlmeSaturday, 25. October 2014, 12:21 10 years ago
    http://wiki.visionaire-tracker.net/wiki/Data_Structure under Characters. There's no proper example though.


    From the wiki:

    Color the character will be drawn with. If the most significant byte is not 0 then this color will be ignored (default) and the lightmap (if present) and scene brightness will be used for the tint of the character. Otherwise the three lower bytes are used for the tint the character will be drawn with. The least significant byte specifies red, then green and the third byte specifies blue. E.g. with 0xFF0000 the character would be drawn with a blue light.


    Characters["character_name"].CharacterTint = 0xFF0000 -- blue tint
    

    ...tint & lightmaps affect the whole character.

    Imperator

    7278 Posts

  • #5, by ke4Saturday, 25. October 2014, 12:31 10 years ago
    Okay, thank you, i'll try it out.
    EDIT: Works nice :-)

    Key Killer

    810 Posts

  • #6, by afrlmeSaturday, 25. October 2014, 13:17 10 years ago
    shame you can't apply rgba values (at least I don't think you can) as we would be able to control the opacity of the tint. Here's a link to a list of hex codes: http://www.nthelp.com/colorcodes.htm

    Imperator

    7278 Posts

  • #7, by ke4Saturday, 25. October 2014, 13:27 10 years ago
    But actually it looks really good, i used grey 424242 and it looks like the character is in dark. And white FFFFFF to take off the Tint.

    Key Killer

    810 Posts