Video Animation as Texture

Video Animation as Texture

Anonymous
Not applicable
3,880 Views
6 Replies
Message 1 of 7

Video Animation as Texture

Anonymous
Not applicable

Hi guys,

 

I would like to create a simple plane and make it look like screen (tv/billboard). For example, user can interact with VR, they gonna click (hit) this plane as touch sensor and video will be play or pause, is it possible guys ? If you can help it would be great..

 

I tried this script down below and working very well, but how can i make it touch sensor for play/stop/pause ability ?

 

mp = vrMoviePlayer2(findMaterial("PlasticMaterial"), "C:/users/username/desktop/video.avi")
mp.setLoop(true)
mp.setActive(true)

 

note: diffuse and glossy texture channels are black as known from this topic:

https://forums.autodesk.com/t5/vred-forum/load-animated-texture-files-vred/td-p/5597561

if .mp4 support it would be better because of file size (avi is huge rather than mp4)..

 

Thank you and Best Regards

0 Likes
Accepted solutions (1)
3,881 Views
6 Replies
Replies (6)
Message 2 of 7

Nadja.Bueckmann
Alumni
Alumni

Hi @Anonymous,

 

which version of Vred are you using?

If I understand it right your script is working fine in Vred. So is your question is how to apply it to a touch sensor?

If you like you can attach your setup you already have to that case, then I can have a look.

 

Best, Nadja



Nadja Bueckmann

Technical Support Specialist – M&E (3ds Max, Maya)

0 Likes
Message 3 of 7

Anonymous
Not applicable

Hey, @Nadja.Bueckmann

My Vred version is : Vred Professional 2017.2

I`m trying to send file but .avi file over 80 mb and i cant even send vred file because its connected to .avi file somehow in forum doesn`t allow me to do that !, there is a simle plane and trying to project my animation via script:

mp = vrMoviePlayer2(findMaterial("video"), "D:/VR/video.avi")
mp.setLoop(true)
mp.setActive(true)

Script working fine as i told you, just what i wanna know, video always looping there, i would like to make this plane as a touch sensor and when i click it play/pause could be happen. Do i need edit script for that or what kind of variant set do i need to create for the touch sensor ?

And another problem is when i execute this script in material editor slot, material name automatically changing it own name, for example instead of `video` its becoming `videoqrap` therefore every restart i have to change material name `videoqrap` to `video` again otherwise script can not find the material (video)!

And only .avi file can work with vred, it would be perfect supporting.mp4 file type because of video size is so big i cant even upload here!

Thank you & Best Regards

0 Likes
Message 4 of 7

lbs_markus_s
Enthusiast
Enthusiast

...

0 Likes
Message 5 of 7

sinje_thiedemann
Autodesk
Autodesk
Accepted solution

@Anonymous wrote:


Script working fine as i told you, just what i wanna know, video always looping there, i would like to make this plane as a touch sensor and when i click it play/pause could be happen. Do i need edit script for that or what kind of variant set do i need to create for the touch sensor ?


Hi @Anonymous,

 

yes, you need a variant set with this line in Script tab:

 

mp.setActive(not mp.isActive())

 


And another problem is when i execute this script in material editor slot, material name automatically changing it own name, for example instead of `video` its becoming `videoqrap` therefore every restart i have to change material name `videoqrap` to `video` again otherwise script can not find the material (video)!

Yes, putting the material in the vrMoviePlayer2 constructor changes the material name to "videograb". You cannot prevent it, but do a workaround: Remember the name before and set it again on the material afterwards:

 

material = findMaterial("video")
mp = vrMoviePlayer2(material, "D:/VR/video.avi")
material.setName("video")

Best regards

Sinje

Message 6 of 7

Anonymous
Not applicable

Thank you very much all off you and @sinje_thiedemann totally worked as you describe..

 

Best Regards

0 Likes
Message 7 of 7

Anonymous
Not applicable

hi, thank you for sharing this wonderful post. I appreciate much, iv'e been searching video editor since morning, until such time i saw your post. it was a great indeed to me. Before i'm just using an online video maker which is the LightMV, this one is a friendly editor. you must try it also. 

0 Likes