DOT3 & Lightmap
Blitz3D Forums/Blitz3D Programming/DOT3 & Lightmap
| ||
is this possible to achieve at same time on one mesh? Dot3 with dynamic light and at same time Lightmap in order to make general atmosphere? I try it, but when I apply flag 3 for difuse and flag 4 for Dot3 , lightmap not affecting surface anymore..is there way to have it all at same time? |
| ||
Try putting the textures in a different order? The DOT3 map first, with the lightmap over the top, and mess about with the blending modes for the DOT3 map. Can you post an example of what you got so far? Maybe i could mess about a bit with it. |
| ||
here is the code..I export from Max assigned textures with proper flags /Dot3, difuse color, lightmap)...and dot 3 working just fine in Blitz...when I try to apply lightmap, its same like I didnt apply it at all..I really need this to work...I know that texture order should be Dot3->Lightmap->Difuse texture , but still only dot3 is here, no lightmap at all..huhh Graphics3D 1280,1024,32,1 SetBuffer BackBuffer() ;CREATE LIGHT light=CreateLight(1) pivot=CreatePivot() ;CREATE CAMERA camera=CreateCamera() PositionEntity camera,0,10,50 cube=LoadMesh("nm.b3d") ScaleEntity cube,0.5,0.5,0.5 ;MAIN LOOP While Not KeyHit(1) PointEntity camera,cube TurnEntity cube,0,-0.14,0 ;KEYBOARD EVENTS ;UPDATE DOT3 LIGHTING ;rotate dot3 light TurnEntity light,0,1,0 PositionEntity pivot, 0, -20, 0 RotateEntity pivot,-EntityPitch(light),EntityYaw(light)+270,0 MoveEntity pivot, 0, 0, 1 r#=(EntityX(Pivot)+1.0) * 32 g#=(EntityZ(Pivot)+1.0) * 32 b#=(EntityY(Pivot)+1.0) * 32 EntityColor cube,r,g,b ;UPDATE THE BUFFER UpdateWorld RenderWorld ;UPDATE SCREEN vwait:Flip False Wend End |