shadmar Posted August 21, 2013 Share Posted August 21, 2013 Hi Here one way to do a skybox in 3.0 without interfering with editing in the editor: --Create a camera camera = Camera:Create() camera:Move(0,5,-15) --Create skybox sky = Model:Create() --just render a plane and project cubemap onto it local surface = sky:AddSurface() surface:AddVertex(-0.5,-0.5,0, 0,0,-1) surface:AddVertex(0.5,-0.5,0, 0,0,-1) surface:AddVertex(0.5,0.5,0, 0,0,-1) surface:AddVertex(-0.5,0.5,0, 0,0,-1) surface:AddTriangle(2,1,0) surface:AddTriangle(0,3,2) --position in front of camera but far out to near camera clip plane sky:SetPosition(camera:GetPosition()) sky:Move(0,0,camera:GetRange().y-50) sky:SetScale(camera:GetRange().y*10) sky:SetParent(camera) -- and paint it skymat=Material:Create() shader=Shader:Load("Shaders/Cubemap/sky.shader") skymat:SetShader(shader) skytex=Texture:Load("SkyBox/grimnew.tex") skymat:SetTexture(skytex) sky:SetMaterial(skymat) Shader and example texture attached below : 7 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
ChrisV Posted August 22, 2013 Share Posted August 22, 2013 Awesome work, as usual, shad! Downloading now! Will have a look at it, see how it works, and make a few skyboxes for the asset store. 1 Quote My Artwork. ZBrush 4R7 64-bit - 3DCoat 4.5 BETA 12 - Fl Studio 12 64Bit - LE 3.2 Indie version - Truespace 7 - Blender 2.71 - iClone 5.51 Pro - iClone 3DXChange 5.51 pipeline - Kontakt 5 - Bryce 7 - UU3D Pro - Substance Designer/Painter - Shadermap 3 - PaintShop Photo Pro X7 - Hexagon - Audacity - Gimp 2.8 - Vue 2015 - Reaktor 5 - Guitar Rig 5 - Bitmap2Material 3 Link to comment Share on other sites More sharing options...
cassius Posted September 3, 2013 Share Posted September 3, 2013 That skydrome seems to work ok. Not a very exiting sky but ok fornow. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
shadmar Posted September 3, 2013 Author Share Posted September 3, 2013 It is a skybox, not dome and you can replace the cubemap with any cubemap you like. Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
shadmar Posted September 3, 2013 Author Share Posted September 3, 2013 Here are som extra skyboxes The two first ones are ChrisV skyboxes converted to LE3 format and ready to use with the code above ; 4 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.