Posted: 27th Jun 2007 17:59
Why is it that scaling an object alters its color? For instance, if I make a cube of size ten and of color RGB(255, 0, 0) it will look a vibrant red. However, if I then scale the object by 10, (for each dimension) the objects color dulls? Is there a way to prevent this?
Posted: 27th Jun 2007 19:23
Another thing I noticed is that an object's color brightens as the object is scaled-down, or shrunken.
Posted: 28th Jun 2007 3:12
I answered this the other day.
http://forum.thegamecreators.com/?m=forum_view&t=108949&b=1
Posted: 28th Jun 2007 8:02
I noticed something like this when I used vertexdata to scale my object rather than the normal scaling function, and the colors were alot brighter. I like it better like this.
Posted: 28th Jun 2007 12:52
I'm almost sure that Set Normalization On can fix the problem.
Posted: 28th Jun 2007 13:37
can you create a code snippet to demonstrate please, mathy math math, I like knowing new things.
Posted: 28th Jun 2007 13:50
+ Code Snippet
Sync On
Sync Rate 60


Make Object Sphere 1,10,32,24

Set Directional Light 0,1,-1,1

onOff$ = "On"

Do

	rem toggle normalization
	If spaceKey()
		If space = 0
			space = 1
			normals = 1 - normals
			If normals = 1
				Set Normalization on
				onOff$ = "Off"
			Else
				Set Normalization off
			 	onOff$ = "On"
			Endif
		EndIf
	ELse
		space = 0
	EndIf

	rem text
	Text$ = "Press space to set the normalization "+onOff$
	ink 0,0 : Center Text Screen width()/2+1,33,text$
	ink -1,0 : Center Text Screen width()/2,32,text$

	rem scaling
	Size# = 150*abs(cos(timer()/20.0))+50
	Scale Object 1, size#,size#,size#


	Sync
Loop
Posted: 28th Jun 2007 14:11
thats sexy my little frog, luvin it
Posted: 28th Jun 2007 20:14
Does anyone else like to scale their objects like this?

+ Code Snippet
obj = 1
scalex# = 1
scaley# = 1
scalez# = 1

   perform checklist for object limbs obj
   lnum = checklist quantity()-1
   for l = 1 to lnum
         lock vertexdata for limb obj,l
         num = get vertexdata vertex count()

         for n = 0 to num-1
            x# = get vertexdata position x(n)
            y# = get vertexdata position y(n)
            z# = get vertexdata position z(n)
            set vertexdata position n, x# * scalex#, y# * scaley#, z# * scalez#
         next n
         unlock vertexdata
   next l