Показать сообщение отдельно
Старый 23.11.2011, 18:38   #10
Gector
Легенда
 
Аватар для Gector
 
Регистрация: 14.10.2007
Сообщений: 3,878
Написано 2,012 полезных сообщений
(для 5,072 пользователей)
Ответ: сливаеца цвет модели

cubeface=LoadTexture("data\cars\glassesspheremap.p ng",12
SetCubeFace cubeface,0
EntityTexture t\gtr_mesh,cubeface
SetCubeFace cubeface,1
EntityTexture t\gtr_mesh,cubeface
SetCubeFace cubeface,2
EntityTexture t\gtr_mesh,cubeface
SetCubeFace cubeface,3
EntityTexture t\gtr_mesh,cubeface
SetCubeFace cubeface,4
EntityTexture t\gtr_mesh,cubeface
SetCubeFace cubeface,5
EntityTexture t\gtr_mesh,cubeface


Пример использования кубмапы для динамических отражений.
Function Texture(Resolution,Mesh,layer,blend)
        VP\Texture=CreateTexture(Resolution,Resolution,128)    
        TextureBlend VP\Texture,blend
        PositionEntity FxCam,EntityX#(Mesh,1),EntityY#(Mesh,1),EntityZ#(Mesh,1)
        CameraViewport FxCam,0,0,Resolution,Resolution
        ShowEntity FxCam
        SetCubeFace VP\Texture,0 
        RotateEntity FxCam,0,90,0 
        RenderWorld 
        CopyRect 0,0,Resolution,Resolution,0,0,BackBuffer(),TextureBuffer(VP\Texture)
 
        SetCubeFace VP\Texture,1 
        RotateEntity FxCam,0,0,0 
        RenderWorld 
        CopyRect 0,0,Resolution,Resolution,0,0,BackBuffer(),TextureBuffer(VP\Texture) 

        SetCubeFace VP\Texture,2 
        RotateEntity FxCam,0,-90,0 
        RenderWorld 
        CopyRect 0,0,Resolution,Resolution,0,0,BackBuffer(),TextureBuffer(VP\Texture) 

        SetCubeFace VP\Texture,3 
        RotateEntity FxCam,0,180,0
        RenderWorld 
        CopyRect 0,0,Resolution,Resolution,0,0,BackBuffer(),TextureBuffer(VP\Texture) 

        SetCubeFace VP\Texture,4 
        RotateEntity FxCam,-90,0,0 
        RenderWorld 
        CopyRect 0,0,Resolution,Resolution,0,0,BackBuffer(),TextureBuffer(VP\Texture) 

        SetCubeFace VP\Texture,5 
        RotateEntity FxCam,90,0,0 
        RenderWorld 
        CopyRect 0,0,Resolution,Resolution,0,0,BackBuffer(),TextureBuffer(VP\Texture)
        EntityTexture Mesh,VP\Texture,0,layer
End Function
Меняй слой и бленд. Если кубмап статичный то можно вообще в максе наложить.
З.Ы. Наспех выдрал. Забыл убрать типы.
__________________
Ибо как сказал Бгдн:
(Offline)
 
Ответить с цитированием
Эти 2 пользователя(ей) сказали Спасибо Gector за это полезное сообщение:
Colossus (16.01.2012), Mr_F_ (23.11.2011)