from gl import Render from obj import Obj, Texture from shaders import gooch, static, phong, toon, normalMap, sand, moss # 3840 × 2160 bitmap = Render(3840, 2160) # bitmap.glViewPort(0, 0, 3840 , 2160) background = Texture('./background.bmp') bitmap.pixels = background.pixels # bitmap.lookAt((0, 0, -5), (2, 2, 0)) bitmap.active_texture = Texture('./Models/Textures/Stormtrooper.bmp') bitmap.active_normalMap = Texture('./Models/Textures/Stormtrooper_N.bmp') bitmap.active_shader = normalMap bitmap.loadObjModel('./Models/stormtrooper2.obj', (2600, 200, 0), (150, 150, 150), (0, -110, 0)) bitmap.active_texture = Texture('./Models/Textures/Body_Diffuse.bmp') bitmap.active_shader = moss bitmap.loadObjModel('./Models/bb-unit.obj', (900, 300, 0), (1.5, 1.5, 1.5), (0, 30, 0)) bitmap.active_texture = Texture('./Models/Textures/arc170fighter.bmp') bitmap.active_shader = gooch bitmap.loadObjModel('./Models/Arc170.obj', (2300, 1700, 0), (0.5, 0.5, 0.5), (0, 210, 30)) bitmap.active_texture = Texture('./Models/Textures/XWing2.bmp')
#r.glVertex_coord(960,540) posModel = ( 0, 0, -5) r.lookAt(posModel, (0,0,0)) #rocketModel Texture r.active_texture = Texture('./models/planespace.bmp') r.active_shader = toon #rocketModel r.loadModel('./models/space-shuttle-orbiter.obj', (3,-1,-4), (0.002,0.002,0.002),(0,130,0)) #astro texture r.active_texture = Texture('./models/suit.bmp') r.active_normalMap = Texture('./models/normal_suit.bmp') r.active_shader = normalMap #Astro r.loadModel('./models/astronaute.obj', (-1,1,-5), (0.5,0.5,0.5),(0,0,0)) #mars r.active_texture = Texture('./models/metal.bmp') r.active_shader = unlit #si no es pura sombra #Mars robot r.loadModel('./models/marsRobot.obj', (-4,0.75,-5), (0.0025,0.0025,0.0025),(0,90,0)) #r.lightx, r.lighty, r.lightz=1,0,0 #( 3, 0, *profundidad y direccion con -*5)