shadmar Posted August 6, 2014 Share Posted August 6, 2014 Wasn't sure where to put this since I can't get it to work in the workshop since it needs a big controlscript. Anyway here it is : General Preetham skymodel is used (look up on wikipedia) UnCharted2 tonemap Procedural stars at night Procedural Clouds. Alot of adjustables Install Download at bottom of page here Unzip straight into the projects root folder Use Drag the Sun prefab from the prefab folder You can adjust all sorts of stuff in the script tab of the Sun object It will adjust to the rotation of the Sun (which is a directionallight) when you run (F5/6) Works very well with bloomsettings : luminance=0.11 midgray=0.158 whitecutoff=0.298 Added one small example map as well in the maps folder. Update : Fixed the ATI issue, thanks TattieBoJangle Fixed the cloudscale issue, thanks HaydenMango Skydome now follows the camera (if found) Skydome resizes to the camera's drawdistance (if found) Added adjustable bloom settings (if workshop the bloom is added the scene) Edit: soon inthe workshop. 2 28 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
ChrisV Posted August 6, 2014 Share Posted August 6, 2014 Really great job, shad (and, klepto too, i think?)! !! There's still room for improvement, but what you have already done, is really awesome!! Some godrays coming through the clouds would really be great! *HINT* *HINT* 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...
Josh Posted August 7, 2014 Share Posted August 7, 2014 That is so incredibly cool. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
cassius Posted August 7, 2014 Share Posted August 7, 2014 Suprb, thanks. How can I make the day last longer? 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...
macklebee Posted August 7, 2014 Share Posted August 7, 2014 How can I make the day last longer? marry a woman that nags? great work shadmar. 4 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
cassius Posted August 7, 2014 Share Posted August 7, 2014 I would rather marry a woman who made the nights longer.It takes longer to do everything when you are old. 1 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 August 7, 2014 Author Share Posted August 7, 2014 LOL!! Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
cassius Posted August 7, 2014 Share Posted August 7, 2014 Thanks 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...
cassius Posted August 9, 2014 Share Posted August 9, 2014 If I want a certain event to occur only after dark in my game,is there a way I can tell my game it is nighttime? 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 August 9, 2014 Author Share Posted August 9, 2014 from c++ or lua ? Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
ChrisV Posted August 9, 2014 Share Posted August 9, 2014 from c++ or lua ? Both would be equally usefull. Thanks! 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 August 9, 2014 Share Posted August 9, 2014 from c++ for me. 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 August 9, 2014 Author Share Posted August 9, 2014 Well, either way (havent tested), but in theory you can: 1. store your world objects in an array or list when loaded from the map : http://www.leadwerks.com/werkspace/topic/6386-c-finding-entities-in-a-scene/page__hl__map or http://www.leadwerks.com/werkspace/topic/6887-communicating-from-lua-to-c/ 2. check if entity->GetClassName=="DirectionalLight" && entity->GetColor().x <=0 then it's night. 1 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Haydenmango Posted August 15, 2014 Share Posted August 15, 2014 I finally got around to adding this to my project. It looks sooo amazing. You are the best Shadmar thank you!!! Here is a little preview of what it looks like in game. It is speed up to be 5 times faster so the video wouldn't be super long. 1 2 Quote Check out my game Rogue Snowboarding- https://haydenmango.itch.io/roguesnowboarding Link to comment Share on other sites More sharing options...
shadmar Posted August 15, 2014 Author Share Posted August 15, 2014 Tip for adding fast bloom (good looking) to the sky: 1. Add bloom from the workshop to your scene tab : http://steamcommunity.com/sharedfiles/filedetails/?id=256268930&searchtext= 2. Add a pivot to your map and connect this bloom control script : function Script:UpdateWorld() if self.camera==nil then local world=World:GetCurrent() for i=0,world:CountEntities()-1 do if world:GetEntity(i):GetClass()==Object.CameraClass then self.camera=world:GetEntity(i) tolua.cast(self.camera,"Camera") System:Print(world:GetEntity(i):GetClassName()) break end end else self.camera:SetKeyValue("bloom_Luminance","0.11") self.camera:SetKeyValue("bloom_MiddleGray","0.158") self.camera:SetKeyValue("bloom_WhiteCutoff","0.298") end end Edit: Correction, WhiteCutoff 0.298 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Haydenmango Posted August 18, 2014 Share Posted August 18, 2014 Hey shad just wanted to ask if self.shader:SetFloat("cloudscale",self.cloudheight) -- lesser is bigger is supposed to be self.shader:SetFloat("cloudscale",self.cloudscale) -- lesser is bigger in the UpdateWorld() function. 1 Quote Check out my game Rogue Snowboarding- https://haydenmango.itch.io/roguesnowboarding Link to comment Share on other sites More sharing options...
shadmar Posted August 18, 2014 Author Share Posted August 18, 2014 Ah yes that would be correct. Thanks! 1 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
TattieBoJangle Posted August 18, 2014 Share Posted August 18, 2014 Looks GREAT! I get Failed to compile fragment shader any ideas? Fragment shader failed to compile with the following errors: ERROR: 0:317: error(#160) Cannot convert from: "3-component vector of vec3" to: "highp float" ERROR: error(#273) 1 compilation errors. No code generated Failed to compile fragment shader. Error: Failed to compile fragment shader. Quote Asus Extreme v x99, Intel I7, Windows 8.1 64 Bit, SSD, Geforce GTX 980 4GB, 16GB Ripjaw DDR4 Link to comment Share on other sites More sharing options...
shadmar Posted August 18, 2014 Author Share Posted August 18, 2014 Do you run of an intel integrated card?, they often complains when vecs are converted. Anyhow change line 317 to : float cmix=cloud.x*cloudmix; Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
TattieBoJangle Posted August 18, 2014 Share Posted August 18, 2014 Hi Shadmar no it the ATI R9280x Platinum but i will try that and get back to you Quote Asus Extreme v x99, Intel I7, Windows 8.1 64 Bit, SSD, Geforce GTX 980 4GB, 16GB Ripjaw DDR4 Link to comment Share on other sites More sharing options...
TattieBoJangle Posted August 18, 2014 Share Posted August 18, 2014 where do i change float cmix=cloud.x*cloudmix; as there is only 63 lines in the lua Quote Asus Extreme v x99, Intel I7, Windows 8.1 64 Bit, SSD, Geforce GTX 980 4GB, 16GB Ripjaw DDR4 Link to comment Share on other sites More sharing options...
shadmar Posted August 18, 2014 Author Share Posted August 18, 2014 daynight.shader file. Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
TattieBoJangle Posted August 19, 2014 Share Posted August 19, 2014 Just the same error message shadmar if i changed it right lol this is a video of what i get when adding it http://youtu.be/a8jXXxPrp6s Quote Asus Extreme v x99, Intel I7, Windows 8.1 64 Bit, SSD, Geforce GTX 980 4GB, 16GB Ripjaw DDR4 Link to comment Share on other sites More sharing options...
cassius Posted August 19, 2014 Share Posted August 19, 2014 Before using this shader I got rid o my existing skybox and directional light.Was that the correct thing to do? 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...
TattieBoJangle Posted August 19, 2014 Share Posted August 19, 2014 Got it working many thanks Quote Asus Extreme v x99, Intel I7, Windows 8.1 64 Bit, SSD, Geforce GTX 980 4GB, 16GB Ripjaw DDR4 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.