lightcolor

Blitz3D Forums/Blitz3D Programming/lightcolor

Paulo(Posted 2004) [#1]
Im cycling a lightcolor command in order to change colours on a mesh.

Im loading a "textured mesh" and it doesnt respond to the change in lightcolor. But when i create a blank cube, with createcube() and do the same thing, the cube shows the cycling colour, (very similar to the blitz3d help example for lightcolor)
Ive tried setting EntityFX mymesh,2 but these doesnt fix it.
What am I doing wrong please?


Paulo(Posted 2004) [#2]
sorry if it's not very clear... perhaps if i paste this in..

os.screenoption = New screenoption
os\screen = CopyEntity(menu)
PositionEntity os\screen,0,0,0
EntityTexture os\screen,optionsmenu

box = Createcube()
PositionEntity box,0,0,-4

cycler = CreateLight()
PositionEntity cycler,5,0,-30

PositionEntity camera,0,0,-8

While Not KeyHit(1)

If col1 => 255 Then cycle = -1

If col1 <= 0 Then cycle = 1

col1 = col1 +cycle


RenderWorld :Flip

LightColor cycler,255,col1,0

Wend

The colors change on the cube, but not on the new type of mesh. why not on the mesh? thanks again.


Ross C(Posted 2004) [#3]
Try EntityFx entity,0?

If it's small code, you code email me it and i'll try and help from there :o) Or even just the mesh and texture in question.


big10p(Posted 2004) [#4]
Also, you're only altering the green component of the light color: if the mesh texture doesn't contain any amount of green then you won't see any change.


Paulo(Posted 2004) [#5]
thanks guys.. Ross, sorry my codes a right mess and comes with a 7megs of files :/ But im fumbling through, thanks for the offer, I'm going to be tidying it all up over the weekend, perhaps then you could take a look? I've found a work around - If I apply my texture to a cube created within blitz it works, the mesh I was using was .b3d and is simply a rectangle made up of 2 triangles.

big10p, you can alter the colour of the light by just changing one of the RGB variables. Whilst you dont get mutlicolours, with just the green pinging up and down it goes from red to yellow, through orange, looks quite nice. :) Im using it one a white texture.

I've since been playing with it - all 3 colours and its nothing visually stunning, but its progress for me :)