Jump to content

Videotexture Problem!


thiendv
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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!

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...