how to achieve color effect ?

Software: Away3D 4.x

datouaizi, Member
Posted: 10 February 2012 11:39 AM   Total Posts: 98

accroding to the numerical display color on a plane.
how to achieve color effect ?
how to set gradient color use AS3?

 

   

Avatar
theMightyAtom, Sr. Member
Posted: 10 February 2012 12:21 PM   Total Posts: 669   [ # 1 ]

You would read the color from the bitmapData of the BitmapMaterial assigned to the Plane using ordinary getPixel().

   

Avatar
theMightyAtom, Sr. Member
Posted: 10 February 2012 12:26 PM   Total Posts: 669   [ # 2 ]

Ah, you mean how do you create the gradient, rather than how to read it?
The proper way would be to write a shader, the easy way is to make a small bitmap with the values, and scale it with “smoothing” true. That way Flashes own rendering engine will do the transitions from pixel to pixel for you.
Hope this gives you an idea in any case,

Good Luck!

   

datouaizi, Member
Posted: 10 February 2012 12:54 PM   Total Posts: 98   [ # 3 ]

thanks!
this pic shows Temperature Monitoring System.it has many points.point tempture changes also colors fllowed changes.

   

Avatar
theMightyAtom, Sr. Member
Posted: 10 February 2012 01:16 PM   Total Posts: 669   [ # 4 ]

Interesting.
So it might not be accurate enough to just interpolate between sensor readings, even if it looks pretty smile
For example walls will have large impact.

   

datouaizi, Member
Posted: 10 February 2012 01:25 PM   Total Posts: 98   [ # 5 ]
theMightyAtom - 10 February 2012 01:16 PM

Interesting.
So it might not be accurate enough to just interpolate between sensor readings, even if it looks pretty smile
For example walls will have large impact.


i don`t care walls.just care how to set a Plane with that color.

   

Avatar
theMightyAtom, Sr. Member
Posted: 10 February 2012 02:43 PM   Total Posts: 669   [ # 6 ]

OK, then my original answer was right, just draw into the bitmapData of the BitmapMaterial

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X