Archived

This topic is now archived and is closed to further replies.

abit help for a 3d newbie

This topic is 6360 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello i''m new to 3d in windows... could you explain me how i use the rgb since it''s from 0 to 1 and not 0 to 63.. and how about the 3d co-ordinates same as the rgb floats system? thanks arkon qsoft.cjb.net

Share this post


Link to post
Share on other sites
Not sure what you''re talking about... 0..63 is only for 8-bit colors (palettized modes) so if you''re not using that, you dont need to worry about it...

the way RGB works is basically the same in theory as the palettized mode... instead of creating a palette and initializing it with RGB triplets, and then plotting the indecies to those RGBs, you simply plot the RGB value straight to the buffer (which is usually 3 bytes in size, and sometimes 4 if it includes alpha channel).

the only difference is that when using palettes you can only output 256 colors where as with RGB triplets (16-bit, 24-bit, 32-bit modes) a lot more than that.. that''s a good thing the bad thing is that they are very slow, especially 24-bit and 32-bit...

i dont know if that makes any sense.. it doesnt to me.. anyways.. hope it doesnt confuse you more, if it doesnt help any...


..-=gLaDiAtOr=-..

Share this post


Link to post
Share on other sites
I think that your are using floating point numbers to approximate your rgb values. Try using a value between 0 and 1, i.e 0.5f and see if that works. I would prefer using a more acurate Hex representation. By the way are you using OpenGL?

Share this post


Link to post
Share on other sites
Gladiator:
I didn''t say that I don''t know how VESA works or whatever

maybe you both didn''t understand
so i''ll explain it again i asked how to compute the normal floating (float X) to the OpenGL floating...
that''s it
and yes, i''m learning/using opengl

Share this post


Link to post
Share on other sites
there is an opengl glColor something command that accepts 0 to 255 values for the colors. I don't remember the exact command. is this closer to what you're looking for. also, don't be so short with people when you don't properly explain your problem.

JoeMont001@aol.com www.polarisoft.n3.net

Edited by - Julio on July 14, 2000 10:16:48 PM

Share this post


Link to post
Share on other sites
If you'd lookup the GL_float in the gl.h header file, you'd probably find something like:
        
#define GL_float float

or

typedef float GL_float;


I'm just guessing, but I'm certain: - they are the same...!

(ps: Arkon - You are a little confusing -)



Edited by - BasKuenen on July 14, 2000 10:22:41 PM

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I program in OpenGL...
for tha RGB in OpenGL, it''s 0-255 but it''s sorta different
it''s like for a RGB of (23,65,70) it''s glColorf(0.23,0.65,0.70);
it''s just a tenth...that''s why I think you mean 0-1...0 is none and 1 is full...everything inbetween is what u want.

Later,

email - mistercool@mail.com
homepage - www.tf-hq.com
codeStar

Share this post


Link to post
Share on other sites
ok poster answered me...
sorry for being a bit confusing my english isn''t so good...

well so now how do i know how much is 155 in the float??
i can''t just divide it by 100 cuz it will be more than 1...

so how do i calculate it?

Share this post


Link to post
Share on other sites
I programmed a RGB normalizer some time ago. You can download it at: http://www.q3seek.com/digitalys/EnglishDL.htm. Search "RGB Color Normalizer" label. Also, you will be able to find a q3a screensaver, q3a desktop theme, etc.

Share this post


Link to post
Share on other sites
STOP!!

You can better stop with 3D now... If you do not even fully understand 2D!! And you don''t otherwise you would have known that 0..63 is only for 256 color mode. Let me guess... you are new at windows programming? Yep... and you think that you are a real good programmer? Yep... And you have probably never programmed DirectX? Nope... Thrust me... I know what I am saying... start learning DirectDraw then DirectSound then DirectInput... that will cost you a year or so... then read about 1,000,000 pages about general 3D... and start with Direct3D or OpenGL or Glide.

I do not want to pick at you... although it might seem so... I just want to help you.

Greetings from Dark.

mail me at: mitolah@hotmail.com

Share this post


Link to post
Share on other sites
Dark are you talking to me???
if so then shut up
everyone thinks is a genius!
i kick yer ugky hairy ass

and besides i know 3d and i know 2d and i know DS, DI, DM, DD
and learning opengl

so shut up and relax

Share this post


Link to post
Share on other sites
Dark, are you crazy? Learning DDraw, DSound and DInput take about a month, not a year, then you can start on 3d after reading a few documents, you are going way overboard here.

Share this post


Link to post
Share on other sites
Dark has posted similar messages on other threads... apparently he''s a REAL HARDCORE programmer who programs for 10 hours a day (oooh, I''m scared...). He really should shut up, and if he thinks it''s possible to read 1 million pages of anything he''s stupid (a fact that I am beginning to believe).

and for god''s sake, why do people think you need to know 2d before you go onto 3d... it''s not true, just as it isn''t true that you need to know dos programming before you attempt windows.
granted a lot of the concepts used in 2d appear in 3d as well, but they''re not that complicated, and you have to change your way of thinking when you go onto 3d anyway

Share this post


Link to post
Share on other sites
As if 10 hours a day would be something to brag about?

But to the point, what the f**k did mister Dark do yo you? In my opinion he''s completely right in what he says. You hear me? I''m right behind you dark one!

/CMN

Share this post


Link to post
Share on other sites
oK guys, cool down a bit.
My opinion is that you must know how to draw in 2d first before going into 3d.
Some of you might say why?
The simple fact is that 2d is usually made up of two coordinates,
mainly x and y. 3D builds on top of that, so we have a 3rd
coordinate z. SO, you must learn 2d first b4 jumping into 3d or else you will be totally lost in 3d.

Secondly, glColor3f() uses values from 0.0 to 1.0 . Now, after plenty of experiments I have noticed that the values really depend on the number of bits you are using. So, if you were in
32-bit colour mode then your values between 0.0 to 1.0 can be huge compared to 16-bit colour mode.

P.S: I have tried dumping different shades of red in 16-bit mode onto the screen and it took 5-10 seconds to show up on the screen using OpenGL !! And this was on a P3-450 with nVidia TNT.

sig u say?

Share this post


Link to post
Share on other sites