Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

play mp4 video with offset

Hi guys, I have a question and I hope you can help me. So, I have a mp4 footage of fire about 30 frames. I am trying to dress plane cards with that video on them, for now they have the same Material. The issue is that the video is playing the same on all the plane and I would like to offset the video to break the uniform look. How can I make an offset of that video and apply that randomly to different plane? Is it a blueprint thing or is it possible to do it in the shader? Maybe there is an other solution, but I will prefer to stick with video instead of using flipbook as I have a lot of frames. Thanks in advance for the help guys.

Cheers, Matthieu

Product Version: UE 4.18
more ▼

asked Oct 02 '18 at 07:20 AM in Rendering

avatar image

3 1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

You should create a material that has a scalar parameter called offset and then for each of the cards you create material instance for them and set that offset to a random value.

To create a material parameter just right click a scalar node and select convert to paramater, and name it Offset. alt text And your blueprint should be as simple as this (do this on begin play or whenever you feel like it). Static mesh is your card alt text

untitled-2.png (19.7 kB)
capture4.png (105.1 kB)
more ▼

answered Oct 02 '18 at 09:31 AM

avatar image

78 2 6 10

avatar image Screechfx Oct 02 '18 at 10:24 PM

Hello and thanks Dovlahkin,

Sorry a bit new with material and blueprint. So far I have the basic Material made my the media player texture and a simple blueprint to launch the media player. I understand the logic of a parameter that can be randomly setup inside the blueprint and applied to the material.

But, how I can offset the frames of the video inside the material and applied that random value to different mesh? So far I have all my cards going same time. alt text Simple material alt text Simple BluePrint alt text

viewport.jpg (259.0 kB)
material.jpg (230.7 kB)
blueprint.jpg (238.8 kB)
avatar image Dovlahkin Oct 03 '18 at 12:24 AM

Ah, I see... You probably want to rethink that. Using media files for effects like that is hardly the right approach, for many reasons really. You might want to render that video into a spritesheet and use flipbook in your material instead (with the rest of the setup I've mentioned above).

What you're doing right now can't be offset because all of those are using the same media source which is streamed into the engine (as far as I know) so changing something on one will inevitably affect the others too...

avatar image Screechfx Oct 03 '18 at 01:17 AM

Thanks for that Dovlahkin, If it is not possible to offset a video I will need to do few different video and plug several media player to different plane. Now I did indeed use the flipbook as for me it was one of the best solution to be able to do what I want. But I am stuck with the way to randomly start the flipbook. I've found how to change the speed but not really a way to start the flipbook from a different frame. Do you think it is possible? I understand, I guess, the scalar parameter that will be applied randomly to different material, but not how to build it inside my material to be able to have that node affecting an offset. So far I have my flipbook texture and that material. Thanks again for your help alt text alt text

flipbook.jpg (247.6 kB)
material.jpg (245.6 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question