Posted: Tue Dec 23, 2008 3:23 pm
Hi Cpl.Bator,
Amazing, cool and exactly what i need. Here is a little Example made with my MP 3D Engine and a created normal map from your program.
MP_normal_test.exe:
http://uploaded.to/?id=cemkz2
Code:
best regards,
Michael
Amazing, cool and exactly what i need. Here is a little Example made with my MP 3D Engine and a created normal map from your program.
MP_normal_test.exe:
http://uploaded.to/?id=cemkz2
Code:
Code: Select all
;////////////////////////////////////////////////////////////////
;//
;// Project Title: MP 3D Engine
;// File Title: EarthBumpmap.pb
;// Created On: 2.12.2008
;// Updated On:
;// Author: Michael Paulwitz
;// OS:Windows
;//
;// Demofile Earth Bumpmap
;//
;////////////////////////////////////////////////////////////////
;-
;- ProgrammStart
MP_Graphics3D (640,480,0,3) ; Create Windows #Window = 0
SetWindowTitle(0, "3D Bumpmap Demo, left world / right with created normals") ; Name
camera=MP_CreateCamera() ; Create Camera
x.f=0 : y.f=0 : z.f = -4
MP_PositionCamera(camera,x.f,y.f,z.f) ; Camera position
light=MP_CreateLight(1,90,0,0) ; Light on
earth1=MP_Createsphere(20) ; Sphere 1
earth2=MP_Createsphere(20) ; Sphere 2
Textur=MP_CreateTextureFromFileInMemory (?Earth_map,?Earth_map-?Earth_map_normals)
Textur2=MP_CreateTextureFromFileInMemory (?Earth_map_normals,?Earth_map_normals-?Earth_map_end)
MP_EntityTexture (earth1,textur)
MP_EntityBumpmapTexture (earth1,textur2)
MP_EntityTexture (earth2,textur)
MP_PositionEntity (Earth1,1,0,0) ; Position Earth1
MP_PositionEntity (Earth2,-1,0,0) ; Position Earth2
While Not MP_KeyDown(#PB_Key_Escape) And Not MP_WindowEvent() = #PB_Event_CloseWindow; Esc or close
MP_TurnEntity (earth1,-0.05,0,0) ; Move Earth1
MP_TurnEntity (earth2,-0.05,0,0) ; Move Earth2
MP_RenderWorld () ; Hier gehts los
MP_Flip () ;
Wend
DataSection
Earth_map:
IncludeBinary "c:\earth_map.jpg" ; Mein MP Bild included
Earth_map_normals:
IncludeBinary "c:\earth_map_normals.jpg" ; Mein MP Bild included
Earth_map_end:
EndDataSection
Michael