Jump to content

Dynamic Texture on every side of skybox?


Cytexx
 Share

Recommended Posts

Heya everyone,

it seems like a simple problem, but I can't get it working for me. 

I have a dynamic texture and i would like to apply that on each side of my skybox. 

var dyntexture = new BABYLON.DynamicTexture("dynamic texture", 512, scene, true);

When I simply try to put it as:

new BABYLON.CubeTexture(dyntexture , scene); 

It doesn't work. 

Is there a way to "split" the CubeTexture and set everyside of it on my own when i only have my dyntexture as source? 

Or any other preferable approach?

Greetings,

Cytexx 

Link to comment
Share on other sites

You could manually define 6 planes or change the uv of the skybox to achieve this.

There is no easy and performant way to achieve this currently.

Adding a playground would help us understand your use case better and chose the best solution.

Link to comment
Share on other sites

@Cytexx

If you need to capture a webcam from IOS in real-time, then there's a few lines of code I can provide to make this work. I didn't crack the problem, but I do post the code, I'll give full credit to who did. I just can't remember right now.

DB

Link to comment
Share on other sites

The whole capturing process is already done by me, as a shot explanation what I am planning to do: Im doing an AR-Application and I am trying to accomplish a more realistic look. For that I take a picture with the front-camera of the device on load and after that i will compute the image onto a invisible skybox to have more "realistic" lighting, ambient color and reflections. 
If you are interested i can share my results at the end @dbawel

Greets, 
Cytexx

Link to comment
Share on other sites

@Pryme8

Because, a web image wrapped around a shpere kinda sucks cubes are much more fun... - unless it's just for testing. I added this to an app, and no one got it. You decide for yourself... by the way, I didn't write this PG scene, just modified it a bit. 

I'm stepping up, my friend. and again, charge your cellphone. We should talk.

https://www.babylonjs-playground.com/debug.html#CHQ4T#116

DB

Link to comment
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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...