thiendv Posted August 24, 2016 Share Posted August 24, 2016 Hi everyone, i'm beginner in webGL. I use Babylon for my application. I want to assign video texture for my plane or box that import from Max. When firefox run. Video run, but i think uvmap error. Please explain for me. Thanks Quote Link to comment Share on other sites More sharing options...
Wingnut Posted August 24, 2016 Share Posted August 24, 2016 Hi again, @thiendv. You might be experiencing a "power of 2" issue. You can read all about power of 2 on the web... it relates to the dimensions of the video. http://playground.babylonjs.com/#EKFLA#13 That is a playground demo that uses one of our local videos. For me, it works fine in IE, but is not working well in Firefox. Nothing unusual there. Firefox Has ALWAYS "fought" with me in getting videos to load-in. No errors seen. Anyway... you might want to try using the "get zip" option on that playground. That may get those two videos... http://playground.babylonjs.com/textures/babylonjs.mp4 and http://playground.babylonjs.com/textures/babylonjs.webm ...to come to your house... in the zip. I want you to try the .mp4 in your project, if you would... see if it plays any better for you. IF it still fails/looks strange... it COULD be because your plane has no UVs on it. You might consider NOT making that plane... in 3D Max. Instead, wait until after the other parts of the scene are imported, and then make a plane within the Babylon scene, and put a video on it... there. Another "sneaky way" of getting 3D Max to put UVs on your plane... is to export it with a texture on it. Not a videoTexture, just a static texture. Then when it arrives in the BJS scene, replace the static texture with a videoTexture. These are only some ideas to try. Hope it helps. Perhaps smarter people than I... will comment soon, too. Good luck, keep us posted. thiendv and GameMonetize 2 Quote Link to comment Share on other sites More sharing options...
Nabroski Posted August 25, 2016 Share Posted August 25, 2016 http://www.html5gamedevs.com/search/?&q=3dmax video@Wingnut i do some holly days keep it real Quote Link to comment Share on other sites More sharing options...
thiendv Posted August 29, 2016 Author Share Posted August 29, 2016 hi @Wingnut, i try play video for my project. My object import from 3dsMax. Example for my tivi , tivi position is random. I can't create plane position exactly as my tivi. I try getMeshByName(" objectName").position but it don't work. Wingnut Quote Link to comment Share on other sites More sharing options...
Wingnut Posted August 29, 2016 Share Posted August 29, 2016 Hi again @thiendv. Sorry you are having troubles. Look at this, please: http://www.babylonjs-playground.com/#140LZL#8 Work ok? I will explain ... Line 5: I turn OFF scene light... for testing. tivi can be lit via line 18. Video textures are sometimes difficult to light correctly. Line 18 is a good "brightness setting" for tivi. Line 8: Camera alpha is aimed -Math.PI/2 ... makes the camera aim +z direction. No big deal. I simply like camera aimed +z. My favorite direction. Line 13/14: Ways to play-with tivi position and rotation. Line 18: Tivi brightness knob. For less brightness, lower 1, 1, 1 to be perhaps .7, .7, .7 So, line 11 - line 22... shows everything you need to make a tivi in your scene... without using 3D Max tivi plane. Later, when you turn-ON scene lights again, if you have ugly "specular shine" (a light glare) on the tivi... you can set videoMaterial.specularColor = BABYLON.Color3.Black() . That will remove tivi lighting glares. Hope this helps. Patience and practice - soon you will be a Babylon.js expert. Stay in-touch... tell us if you have any problems. Thanks! PS: This videoTexture demo works very well in my Firefox, too. No problems at all... which is GREAT! Yay! Quote Link to comment Share on other sites More sharing options...
thiendv Posted September 5, 2016 Author Share Posted September 5, 2016 Hi @Wingnut You don't known my idea. I create my model by 3Dsmax. I have about four tivi. If i do by your way, i can't, because tivi position is random. I known your source code and thanks your help! 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.