[Opensim-dev] UpdateTexture or UpdateTextureEntry - OpenSim 0.7
Marck
marck00 at nexgo.de
Wed Aug 25 10:46:04 UTC 2010
Hello Gajananan,
R=142, G=255, B=142 is a light green color.
R=142, G=142, B=255 is a light blue color.
If OpenSim shows you in world RGB=<142, 255, 142> as a light green color then this is the expected behaviour.
If you are seeing a light blue with your external application, then this external application apparently swaps the values for G and B. Seeing yellow as pink is another hint that the values for G and B are swapped.
Gajananan Kugamoorthy wrote:
> Hello
>
> Thank you for your reply.
>
> Please see the attached images , I am using some external data to create
> prims in the world . When I use the color information in 1 -255 range
> e.g. <142, 255, 142> (with the color light blue I see in the external
> data) from external data and use that color information to create a prim
> in the world, I get the light green prim. There are more example like
> (yellow is seen as pink). In my case, maintaining the color information
> is vital.
>
> I thought , there should not be any changes in the color format. I agree
> that middle one is strongest. But what I dont get is that why there is a
> change in color.
>
> Best
> Gajan
>
>
> *From:* Melanie <melanie at t-data.com>
> *To:* opensim-dev at lists.berlios.de
> *Sent:* Wednesday, August 25, 2010 9:14:47
> *Subject:* Re: [Opensim-dev] UpdateTexture or UpdateTextureEntry -
> OpenSim 0.7
>
> This works as designed. The middle (green!) component is strongest,
> so the prim WILL be light green. Why you would expect light blue is
> beyond me.
>
> Melanie
>
> Gajananan Kugamoorthy wrote:
> > Hello OpenSim Developers,
> >
> > I am using UpdateTexture function in SceneObjectPart class of
> OpenSim. I have
> > RGB values in 1-255 scale, then I convert it to 0 - 1 scale in my code
> >
> > For example :
> >
> > Primitive.TextureEntry tex = p.Shape.Textures; ( p
> > is a 'SceneObjectPart')
> > Color4 texcolor;
> > float r = 142, g = 255, b = 142
> >
> > texcolor.R = Util.Clip(r, 0.0f, 1.0f);
> > texcolor.G = Util.Clip(g, 0.0f, 1.0f);
> > texcolor.B = Util.Clip(b, 0.0f, 1.0f);
> >
> > tex.FaceTextures[k].RGBA = texcolor;
> > p.UpdateTexture(tex);
> >
> >
> > When I used the color combination <142, 255, 142>, I expected a light
> blue
> > color , however what I can see in the world for the prim that I set
> the color is
> > light green.
> >
> > I noticed this problem in earlier versions of OpenSim as well.
> >
> > Does anybody face problem like this ? I would greatly appreciate if
> someone
> > could share their experience.
> >
> > Best
> > Gajan
More information about the Opensim-dev
mailing list