unknowncheats uc-forum.com ucdownloads ucdownloads.com

Go Back   UC-Tutorials - Multiplayer Game Hacking and Cheat Tutorials > Programming > OpenGL

- Sponsored Advertisement -
http://www.myfpscheats.com/


Reply
 
Thread Tools Display Modes
  #1  
Old 12-24-2006, 07:33 AM
zero_tolerance zero_tolerance is offline
Senior Member
 
Join Date: Dec 2006
Posts: 289
Default Coloring models

By m0d hipp„

I originally posted this on agerage, however I think this is a very handy tutorial that easily explains how to color models any color you want. This is meant for educational purposes and is very self explanitory. here you go:

when you color models the most basic coloring is
Code:
1 0 0 //red
0 1 0 //green
0 0 1 //blue
but what happens if u want to add a touch to ur coloring? cause the stock colors above are sooo dark and hard to see in games, you want to be able to color your models as neon as possible, so I came up with a little tut to help you work this out.
tools needed:
-calculator
-design program (I will use adobe photoshop)
-and thats it.

1. open up photoshop, and using the pallatte, choose any color of your choice.
For ease of use, I will be doing the colors of the rainbow, however I will make the colors neon bright, so when used for coloring models in games you will easily be able to identify the models.

Before I begin into the techy stuff I want to clarify a few things.
In ogl when you color models its based upon a color code of 1 - on and 0 off
1 meaning that the color in the rgb section is brightest.. if all are 1's (1 1 1) produces white, if all are 0's they produce a lack of color which is black ( 0 0 0 )
in most design programs when u look at the color pallatte, you will see the rgb palatte have numbers as high as 255, which is a higher value than ogl supports so it wont work.
in design progs the color code is as follows:
Code:
(255 0 0) //red
(0 255 0) //green
(0 0 255) //blue
sooo what we have to do is divide each number by 255 to bring our values to those that would work in ogl..

here are a few examples
Code:
neon red
(255 0 6) -- in photoshop
divide each value by 255
(1 0 0.023529411764705882352941176470588)
^^ this would be the value to use for ur ogl code to color the model bright red.

Using the very same technique as above here are the other colors of the rainbow:


1,0.35294117647058823529411764705882,0 -orange

1,0.96470588235294117647058823529412,0 -yellow

0.023529411764705882352941176470588,1,0 -green

0,0.023529411764705882352941176470588,1 -blue

0.98823529411764705882352941176471,0,1 -purple
Hope you find this helpfull, and give me credit if you decide to use this technique for coloring your models. Have fun!
:agerage p
Reply With Quote
Reply

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit

Tags
coloring, models

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 03:13 PM.