Cytexx Posted June 20, 2018 Share Posted June 20, 2018 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 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted June 20, 2018 Share Posted June 20, 2018 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. Quote Link to comment Share on other sites More sharing options...
dbawel Posted June 21, 2018 Share Posted June 21, 2018 https://rawgit.com/wpdildine/webCAMbabylon/master/index.html Cytexx 1 Quote Link to comment Share on other sites More sharing options...
Cytexx Posted June 25, 2018 Author Share Posted June 25, 2018 Perfect @dbawel, that was exactly what I was looking for! Thanks Quote Link to comment Share on other sites More sharing options...
dbawel Posted June 25, 2018 Share Posted June 25, 2018 @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 Quote Link to comment Share on other sites More sharing options...
Cytexx Posted June 26, 2018 Author Share Posted June 26, 2018 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 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 26, 2018 Share Posted June 26, 2018 https://gamedev.stackexchange.com/questions/98068/how-do-i-wrap-an-image-around-a-sphere Why not do a sphere? Quote Link to comment Share on other sites More sharing options...
dbawel Posted June 26, 2018 Share Posted June 26, 2018 @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 Quote 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.