How to not light an object?

Blitz3D Forums/Blitz3D Programming/How to not light an object?

Picklesworth(Posted 2006) [#1]
This must be somewhere...

I have applied dot3 to some of my game's important objects to achieve a very nice pixel-perfect lighting effect, but I still notice some strange slivers popping in from time to time that look like they must be vertex lighting doing its thing.
I would bet that this is two different lighting systems battling with eachother, because I only have one point light in the scene, so it would theoretically only cast one point of light on this flat object. (And definietly not a sliver of it).

The obvious solution is to use EntityShininess, but it looks like that (somewhat thankfully) affects the dot3 lighting as well.
Setting EntityFX FlatShaded to my object also appears to have the same effect to Dot3, so that one is ruled out, too. (Pretty attractive stuff, though... I don't see what people are complaining about anymore; we can still do stuff similar to pixel shaders... we'll just be losing a few extra frames in the process).

So, how can I tell Blitz to turn off its other lighting system on an object?


big10p(Posted 2006) [#2]
EntityFX entity,1? Makes entity fullbright i.e. no DX lights affect it.


Picklesworth(Posted 2006) [#3]
Thanks for the hint... I just tried it, but still no go. Have you had it working with that?
I'm pretty sure that I have applied the dot3 properly, because vertex light can't possibly do what I am seeing here :)

Here are some little chunks of source code that may have something I'm doing wrong.

Creation of platform:
	b.board=New board
	b\obj=Object_Create()
	;#Region Visual
	b\obj\vis\mesh=CreateCylinder(64)
	ScaleMesh(b\obj\vis\mesh,size,0.05,size)
	EntityPickMode(b\obj\vis\mesh,2)
	EntityShininess(b\obj\vis\mesh,1)
	EntityFX(b\obj\vis\mesh,1)	
	
	Texture=CreateTexture(64,64)
	SetBuffer(TextureBuffer(Texture))
	For y=0 To 1:For x=0 To 1
		If ( x + y ) Mod 2 = 0 Color 128,32,128 Else Color 64,16,64 
		Rect x*32,y*32,32,32,1
	Next:Next			
	SetBuffer(BackBuffer())
	ScaleTexture Texture,0.1,0.1
	TextureBlend Texture,2
	
	bump=CreateTexture(64,64,1)
	SetBuffer(TextureBuffer(bump))
	ClsColor(255,255,255)
	Cls
	SetBuffer(BackBuffer())
	TextureBlend bump,4
	
	EntityTexture(b\obj\vis\mesh,bump,0,0)
	EntityTexture(b\obj\vis\mesh,Texture,0,1)
	;#End Region


I am using functions from the Dot3 lighting example by Fredborg. (The one with the head).

Creating the point light:
light = Dot3_CreateLight(2)
PositionEntity(light,0,8,0)
Dot3_LightRange(light,100)


And updating the normal maps:
light = Dot3_CreateLight(2)
PositionEntity(light,0,8,0)
Dot3_LightRange(light,100)



big10p(Posted 2006) [#4]
TBH, I've never played with dot3/bump mapping so I'm no help. :) I just know that fullbright disables DX lighting on a mesh.


Picklesworth(Posted 2006) [#5]
Actually... never mind; it did work. I was just being dumb :)
Thanks!

Any tips on making this thing shiny?
(I'm working on it right now, though, so there's a chance I'll figure it out myself)