[Solved][ModulateColor] How to make a colorizable image?

Discuss everything related to custom data creation.

Moderator: NADEO

Post Reply
User avatar
Darkminus
Posts: 228
Joined: 05 Jun 2012, 20:54
Location: Dans mon monde.
Contact:

[Solved][ModulateColor] How to make a colorizable image?

Post by Darkminus »

Hello!

I've got a question about how to use images with modulatecolor. (I'm noob at design, be kind with me.)

Let's say I have a 32px x 32px square with a color gradient in it. My goal would be to get an image which can be colorized with "any" color (because I want to use it with team/clublink color)

Is it possible to do this?

Sry if this is bad explained..

Thank you in advance for your answers! :thx:

Law.
Last edited by Darkminus on 13 Jun 2015, 12:37, edited 1 time in total.
Professor Law
ShootMania-addict since June 2012.
Arena Duel, Duel Elite V2, MidAir V2 and SDPro Developer

System Specs:
OS: Windows 10 Professionnal x64
CPU: Intel i5-4670
GPU: MSI TwinFrozr GTX 760 OC
Motherboard: Asus Z87-C
RAM : 10Gb
User avatar
undef.de
Posts: 2095
Joined: 06 Apr 2011, 21:57
Location: Germany, North Sea Coast
Contact:

Re: [ModulateColor] How to make a colorizable image?

Post by undef.de »

Image
Link: http://static.undef.name/ingame/info-ba ... layers.png

And then you can modulate it with "RRGGBB" to whatever you want.

EDIT: Code example:

Code: Select all

<quad posn="1.6 -1 0.03" sizen="5.25 5.25" modulatecolor="00AAFF" image="http://static.undef.name/ingame/info-bar/icon-players.png"/>
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org


Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name

You like what I do? Then award a ManiaStar.
User avatar
Darkminus
Posts: 228
Joined: 05 Jun 2012, 20:54
Location: Dans mon monde.
Contact:

Re: [ModulateColor] How to make a colorizable image?

Post by Darkminus »

Hello :)

Thank you for your answer!

However that's not really the answer I was waiting for. I already used modulate color but with "nadeo" images which colorizes correctly.

In my case it is a small square, with a gradient (vertical, darker to brighter)

When I try to colorize it with modulatecolor, it goes all black. I wanna get it colorized with my team colors.

Here's an example of what I have :

http://i.imgur.com/iw3Iz3r.png

Here I use 2 images, my goal is to get one "generic" image to make it colored as I want. :)

I hope I explained it better!

Thank you :thx:
Professor Law
ShootMania-addict since June 2012.
Arena Duel, Duel Elite V2, MidAir V2 and SDPro Developer

System Specs:
OS: Windows 10 Professionnal x64
CPU: Intel i5-4670
GPU: MSI TwinFrozr GTX 760 OC
Motherboard: Asus Z87-C
RAM : 10Gb
User avatar
undef.de
Posts: 2095
Joined: 06 Apr 2011, 21:57
Location: Germany, North Sea Coast
Contact:

Re: [ModulateColor] How to make a colorizable image?

Post by undef.de »

For my "Tachometer" Plugin in UASECO i use this image Image
and modulate it with "FFF700" into yellow.
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org


Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name

You like what I do? Then award a ManiaStar.
User avatar
Darkminus
Posts: 228
Joined: 05 Jun 2012, 20:54
Location: Dans mon monde.
Contact:

Re: [ModulateColor] How to make a colorizable image?

Post by Darkminus »

Interesting, this works correctly.

To make a "multi usage" image, I made a 1px width 500px height image, so I can make squares, rectangles, etc... with "any" width. But when I change color modulation, it goes black. Have you got an explaination for this? Maybe do I do something bad?
Professor Law
ShootMania-addict since June 2012.
Arena Duel, Duel Elite V2, MidAir V2 and SDPro Developer

System Specs:
OS: Windows 10 Professionnal x64
CPU: Intel i5-4670
GPU: MSI TwinFrozr GTX 760 OC
Motherboard: Asus Z87-C
RAM : 10Gb
User avatar
undef.de
Posts: 2095
Joined: 06 Apr 2011, 21:57
Location: Germany, North Sea Coast
Contact:

Re: [ModulateColor] How to make a colorizable image?

Post by undef.de »

Hmmm... maybe your PNG is not a PNG-24?
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org


Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name

You like what I do? Then award a ManiaStar.
User avatar
Dommy
Translator
Translator
Posts: 1866
Joined: 25 Aug 2011, 21:45
Location: Poland
Contact:

Re: [ModulateColor] How to make a colorizable image?

Post by Dommy »

You should create an greyscale image, where elements to be coloured are pure green (HUE must be green, saturation can be any).

When in script just use Vec3 CMlQuad::Colorize to change color of green elements (can modify to any color, even white).
Ryzen 7 2700X, GTX 1070 Ti, 16 GB RAM, Windows 10 Insider Build
FORUM MODERATOR • CREATOR OF SHOOTMANIA GALAXY & TRACKMANIA² PURSUIT

Contact me via GALAXY & PURSUIT DISCORD
User avatar
Darkminus
Posts: 228
Joined: 05 Jun 2012, 20:54
Location: Dans mon monde.
Contact:

Re: [ModulateColor] How to make a colorizable image?

Post by Darkminus »

Hello :)

I used the colorize attribute and now everything is ok.

Thank you for your help guys :thx:
Professor Law
ShootMania-addict since June 2012.
Arena Duel, Duel Elite V2, MidAir V2 and SDPro Developer

System Specs:
OS: Windows 10 Professionnal x64
CPU: Intel i5-4670
GPU: MSI TwinFrozr GTX 760 OC
Motherboard: Asus Z87-C
RAM : 10Gb
Post Reply

Return to “Title Pack & Custom Data Creation”

Who is online

Users browsing this forum: No registered users and 1 guest