I have been trying to make a video play on the camera’s near and far planes. Right now i’m playing on a material. It would be great if someone can guide me on the right direction to make that happen. Thanks in advance!!
Hi @Anush_Praveen and welcome,
Could you explain what you mean by playing a video on the camera’s near/far planes? Maybe you mean play a video on a the screen that fully covers the camera viewport?
If that’s the case check the following thread, it explains how to play a video on a UI element:
Thanks but i don’t want to play using a material. Basically what i’m trying to achieve is to replicate the video player component from unity in playcanvas. There are render modes there such as camera near plane/far plane , material override, texture. So i was wondering if i can render a video directly onto the camera’s near and far planes and not with the use of materials and textures. Thanks for your reply.
Hmm, that’s an interesting concept, not sure how it works on Unity but could you enlighten me on what’s the outcome when playing a video on the near plane and what’s when playing it on the far plane?
Most likely you can replicate the same behavior using PlayCanvas layers properly sorted.
So on unity there are render modes in this case camera near plane. So it basically renders a video clip on to the camera’s near clip plane without any materials or textures and same for far plane except it plays the video onto the camera’s far clip plane. So what i want to know is, is there a way i can render/play a video file without the need of attaching it to an material and just play the video file on to the camera’s near/far clip planes?
Thanks in advance!!
No, there isn’t a way to do that right now in PlayCanvas.
What is the end result that you are looking for here? Do you want to play a video that’s always in the background of the world (far clip plane) or on top of everything (near clip plane)?
If the latter, you can add a video HTML element to the page that covers the page.
@yaustar Yeah i think i’d wanna do like you told. If you could elaborate on the steps to do that, it would be so helpful for me. Thanks in advance
How familiar are you with HTML and CSS?
I am extremely new to web development in general so you might say i’m a noob. And i’ve only started working on playcanvas for a week now. But i’m eager to learn!!!. It’ll be helpful to know where to look for to achieve the thing i’m looking for. Thanks!!
Here’s a basic example that you will need to tweak for your own use: https://playcanvas.com/editor/scene/1183905
Thanks alot. I’ll see what i can do. thanks for your time.
UPDATE: Thanks it worked like a charm. Thank you!!
Keep on Keeping on