[Opensim-dev] UpdateTexture or UpdateTextureEntry - OpenSim 0.7

Gajananan Kugamoorthy gajananan_k at yahoo.com
Wed Aug 25 10:18:51 UTC 2010


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
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
_______________________________________________
Opensim-dev mailing list
Opensim-dev at lists.berlios.de
https://lists.berlios.de/mailman/listinfo/opensim-dev


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20100825/0a995119/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Blue.JPG
Type: image/jpeg
Size: 1885 bytes
Desc: not available
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20100825/0a995119/attachment-0002.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Green.JPG
Type: image/jpeg
Size: 982 bytes
Desc: not available
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20100825/0a995119/attachment-0003.jpe>


More information about the Opensim-dev mailing list