POV-Ray : Newsgroups : povray.general : RGB in #VB =3D RGB in POV-Ray? Server Time
31 Oct 2024 10:24:13 EDT (-0400)
  RGB in #VB =3D RGB in POV-Ray? (Message 1 to 2 of 2)  
From: Chrisir
Subject: RGB in #VB =3D RGB in POV-Ray?
Date: 9 Nov 2005 16:15:01
Message: <web.437265bc2df4f91f64e517cb0@news.povray.org>
Hello!

I encounter a weird thing here.

As some of you know I import a image (Bitmap) from #VB as text.

Im import this text as commands in POV-Ray, but the colors are all wrong.

Why? Is the rgb different or the order of rgb??

Thanks

Chrisir



Code in POV-Ray:


#macro MySphere (P1, rgb1 )
sphere {
            <P1.x,P1.y,P1.z>, 1
            pigment { rgb <rgb1.x,rgb1.y,rgb1.z> }
          }
#end

MySphere (<1,90,0>,<3,5,0>)

MySphere (<1,90,0>,<31,15,10>)

.........

Code in #VB:

'loop through the entire image

For y = 0 To image1.Height - 1

For x = 0 To image1.Width - 1


clr = image1.GetPixel(x, y)

Red = clr.R

Green = clr.G

Blue = clr.B


strColor=clr.Name





dbg_tw1.WriteLine( "MySphere (<1," & _

x.ToString & "," & _

y.ToString & ">,<" & _

Red.tostring & "," & _

Green.tostring & "," & _

Blue.tostring & _

">)")




Next


Next


Post a reply to this message

From: Chrisir
Subject: Re: RGB in #VB =3D3D RGB in POV-Ray?
Date: 9 Nov 2005 16:35:01
Message: <web.43726af1118efedf64e517cb0@news.povray.org>
Solved!

#VB delivers RGB values 0..255,
whereas POV-Ray of course ecpects 0.0 to 1.0 values.

Thanks!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.