ferat

Fixed Scene Background

Recommended Posts

Hi, 

I have an application that uses BabylonJS: http://rapidmockup.topempresas.net/

As you see, i have a skybox with 3D backgrounds and a ArcRotateCamera in my scene. This works well, but i need a second behavior in my scene. When the user select an option, i need to rotate only the object and the plane in my scene, but not the background. It is because i need a option to user add your own backgorund image, but users will upload only one texture, and the background skybox must be fixed to see only one face. 

Is it possible? How to make it?

 

Thanks by the support!

Share this post


Link to post
Share on other sites

Hiya @ferat!  Welcome to the forum!  I am a little rushed at the moment, but maybe you are looking for a background "layer".  It's easy to use.  Let's take a playground search for the term "layer"...

http://doc.babylonjs.com/playground?q=layer&page=1&max=500&bf=all

Oooh, we got a crap-wagon full of returns!  I'll help ya find a good one...

http://www.babylonjs-playground.com/#UUXLX#15

Yeah, whoever made that playground was a definite mad-man.  Lines 19-22 are the part YOU care-about.  Line 22 shows that the background has ALL the power of Babylon.Texture and Babylon.BaseTexture classes, so you have plenty of knobs to twist (such as background.texture.wAng or maybe background.texture.vOffset), should you desire to twist knobs.  Hope this helps.  Holler if not.

Share this post


Link to post
Share on other sites

Is there any way to save a screenshot with this layer of background? I am using BABYLON.Tools.CreateScreenshot but always creates an image with a transparent background. For now, I'm using canvas.toDataURL ("image / png"), keeping the preserveDrawingBuffer to true to be able to save the full picture.

Thanks

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.