aiaf Posted May 19, 2018 Share Posted May 19, 2018 Need to draw an image on screen as background and the 3d world be visible on top of that. Any way to do this ? Found some topic in forums but didnt help, with this the background image appear only in places where emitters are drawn.. https://www.leadwerks.com/community/topic/10041-is-it-possible-to-draw-an-image-as-background-and-render-over-it/ Quote I made this with Leadwerks/UAK: Structura | Stacky Desktop Edition Website: Binary Station Link to comment Share on other sites More sharing options...
macklebee Posted May 19, 2018 Share Posted May 19, 2018 so basically a skybox. so create a skybox cubemap texture as your background and render the 3d world as normal. 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...
gamecreator Posted May 19, 2018 Share Posted May 19, 2018 Pretty sure that second example is what helped me create my scrolling background for a platformer before. It should have nothing to do with emitters (his code doesn't include them). If you can confirm that you've tried it and doesn't work, I can find and share my code but it's based off of his. Quote Link to comment Share on other sites More sharing options...
aiaf Posted May 19, 2018 Author Share Posted May 19, 2018 Spent half day trying to make own skybox texture.Tried couple of tools read the forums, created 6x1 tiled textures.But so far no luck creating something that looks ok.So kind of give up and trying to put background image. Code is below: foreground->Enable(); world->Update(); world->Render(); foreground->Disable(); context->Enable(); context->SetBlendMode(Blend::Alpha); context->DrawImage(background1, 0, 0); context->DrawImage(foreground->GetColorTexture(), 0, 0); context->SetBlendMode(Blend::Solid); It doesnt work as i expect , image is transparent and can only see it when camera is above the emitters in my game. Quote I made this with Leadwerks/UAK: Structura | Stacky Desktop Edition Website: Binary Station Link to comment Share on other sites More sharing options...
macklebee Posted May 20, 2018 Share Posted May 20, 2018 Try this with the understanding that it doesn't play well with sprites or particles: --insert before main loop mybuffer = Buffer:Create(window:GetWidth(),window:GetHeight(),1,1) --custom buffer image = Texture:Load("Materials/Developer/bluegrid.tex") --load the background image --in the main loop currentbuffer = Buffer:GetCurrent() --add this mybuffer:Enable() --add this --Render the world world:Render() --this should already be there currentbuffer:Enable() --add this context:SetColor(1,1,1,1) --add this if using std fpsplayer cuz Josh doesn't clean up his context SetColors! context:DrawImage(image,0,0,window:GetWidth(),window:GetHeight()) --add this context:DrawImage(mybuffer:GetColorTexture(0),0,0,window:GetWidth(),window:GetHeight()) --add this --draw text and images etc after if required 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...
aiaf Posted May 20, 2018 Author Share Posted May 20, 2018 Ok tried, doesn't play well.Have same issue as before.Probably the emitters as you say. Any other idea ? Quote I made this with Leadwerks/UAK: Structura | Stacky Desktop Edition Website: Binary Station Link to comment Share on other sites More sharing options...
macklebee Posted May 20, 2018 Share Posted May 20, 2018 A skybox is what you want since it inherently works with sprites and emitters because LE is controlling the order these items get rendered. You should post an example picture that you are trying to accomplish as I am sure someone can help convert it properly to something useable. 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...
aiaf Posted May 20, 2018 Author Share Posted May 20, 2018 This is latest atempt i attached all files , i used https://pragmar.com/qbit/ to generate the 6 images from original. Then imagemagick to montage them: montage -geometry 512 -tile 6x1 s_web_background.left.png s_web_background.right.png s_web_background.up.png s_web_background.down.png s_web_background.front.png s_web_background.back.png output.png Maybe image need to be of certain type or i didnt montage it the right way. Any help is most welcome thanks Quote I made this with Leadwerks/UAK: Structura | Stacky Desktop Edition Website: Binary Station Link to comment Share on other sites More sharing options...
gamecreator Posted May 20, 2018 Share Posted May 20, 2018 This may help: https://www.leadwerks.com/community/blogs/entry/1980-creating-realistic-skyboxes-with-vue/ Quote Link to comment Share on other sites More sharing options...
macklebee Posted May 20, 2018 Share Posted May 20, 2018 I would suggest that if you use qbit then your initial picture probably needs to be seamless to begin with or you will end up with the hard transitions that these images show. If the individual images have these hard transition lines then of course the cubemap will have them too. 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...
aiaf Posted May 20, 2018 Author Share Posted May 20, 2018 Yes your right but still dont know how to do this for my image Ill try to add a black border on all sides of each picture ... Gimp has one filter Make seamless but doesnt look like what i need. Quote I made this with Leadwerks/UAK: Structura | Stacky Desktop Edition Website: Binary Station Link to comment Share on other sites More sharing options...
Solution macklebee Posted May 20, 2018 Solution Share Posted May 20, 2018 Have you tried other skybox generators out there? Or ChrisV has put out skybox packs in the workshop: https://steamcommunity.com/workshop/browse/?appid=251810&searchtext=&childpublishedfileid=0&browsesort=trend§ion=readytouseitems&requiredtags[]=Texture http://wwwtyro.github.io/space-3d/#animationSpeed=0&fov=143.1660557755857&nebulae=true&pointStars=true&resolution=1024&seed=3unwfq950v60&stars=true&sun=false https://www.nutty.ca/webgl/skygen/ 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...
aiaf Posted May 21, 2018 Author Share Posted May 21, 2018 Got it working with space3d website, horray. Thank you very much for help and patience. I'll come back with a devblog if i manage to make a skybox from scratch with gimp. Quote I made this with Leadwerks/UAK: Structura | Stacky Desktop Edition Website: Binary Station Link to comment Share on other sites More sharing options...
aiaf Posted May 21, 2018 Author Share Posted May 21, 2018 Got it working with space3d website, horray. Thank you very much for help and patience. I'll come back with a devblog if i manage to create a skybox from scratch with gimp. 1 Quote I made this with Leadwerks/UAK: Structura | Stacky Desktop Edition Website: Binary Station 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.