Sledge Posted December 3, 2014 Share Posted December 3, 2014 In a similar way to how you can render a screenshot, it would be handy if Leadwerks could render out a skybox. It would mean you'd be able to set up skybox scenes within the editor and use them to generate skybox assets without having to look to an external source. 2 Quote Link to comment Share on other sites More sharing options...
Olby Posted December 3, 2014 Share Posted December 3, 2014 That would be really handy for pre-rendering environment maps. I used to use Gile for that back in the days. Quote Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64) Link to comment Share on other sites More sharing options...
macklebee Posted December 3, 2014 Share Posted December 3, 2014 In LE2, I had made a scripted object for personal use that also used the old 'nvdxt.exe' to make the cubemap and I believe shadmar posted his version of a scripted object in the old download section at one point. The new LE3 editor no longer has a realtime scripting aspect to it like the old editor, so you would probably just have to run your program to create the images but it can be done fairly easily. Depending on my schedule this weekend or unless shadmar beats me to it, i will post a scripted object for use. 1 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...
shadmar Posted January 1, 2015 Share Posted January 1, 2015 Here is a quick and dirty way : 1. Install ImageMagick ( I used windows portable version ) http://www.imagemagick.org/script/binary-releases.php#windows 2. Mod app.lua to be square : self.window=Window:Create(self.title,0,0,System:GetProperty("screenwidth","1024"),System:GetProperty("screenheight","1024"),windowstyle) 3. Disable your ingame camera 4. Add a pivot or something where you want to create an envmap and attach this script. function Script:Start() taken=0 self.camera=Camera:Create() self.camera:SetPosition(self.entity:GetPosition()) self.camera:SetFOV(90) end function Script:UpdateWorld() self.world=World:GetCurrent() local context = Context:GetCurrent() taken=taken+1 --PZ if self.camera and taken==1 then self.camera:SetRotation(0,0,0) end if self.camera and taken==3 then context:Screenshot("./1.tga") end --NZ if self.camera and taken==5 then self.camera:SetRotation(0,180,0) end if self.camera and taken==7 then context:Screenshot("./2.tga") end --PY if self.camera and taken==9 then self.camera:SetRotation(-90,-90,0) end if self.camera and taken==11 then context:Screenshot("./3.tga") end --NY if self.camera and taken==13 then self.camera:SetRotation(90,-90,0) end if self.camera and taken==15 then context:Screenshot("./4.tga") end --PX if self.camera and taken==17 then self.camera:SetRotation(0,-90,0) end if self.camera and taken==19 then context:Screenshot("./5.tga") end --NX if self.camera and taken==21 then self.camera:SetRotation(0,90,0) end if self.camera and taken==23 then context:Screenshot("./6.tga") end end 5. Run your app 6. Use imagemagick montage from commandline montage -geometry 512 -tile 6x1 1.tga 2.tga 3.tga 4.tga 5.tga 6.tga out.tga 7. Resave out.tex as cubemap in LE texture editor. 8. voila... but there are small artifacts in the seams. 1 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.