Previous topicNext topic

Locking a video, as a texture, to a 3d model

Questions, comments, feedback, etc.
Post Reply
Cococool
Posts: 5
Joined: Thu Mar 17, 2016 5:21 pm

Locking a video, as a texture, to a 3d model

Post by Cococool »

Hello to the Magic community !

I just discovered Magic yesterday and bought it right away. Thanks a lot to the devs for this wonderful and intuitive software.


I hope that the subject hasn't been covered already, but I couldn't find anything about it on the forum/user guide. When I'm importing a 3d model in Magic, if I put a video on it via the Mask module, the video isn't locked to the 3d model like a texture. Could you please tell me if there is a way to make it happen ?

Thanks a lot,

Cheers
Magic
Site Admin
Posts: 3441
Joined: Wed Apr 09, 2014 9:28 pm

Re: Locking a video, as a texture, to a 3d model

Post by Magic »

Perhaps this topic will help? viewtopic.php?f=2&t=251

Currently you can't completely replace a 3D model's texture, but you can overlay a texture as demonstrated later in that topic.
Cococool
Posts: 5
Joined: Thu Mar 17, 2016 5:21 pm

Re: Locking a video, as a texture, to a 3d model

Post by Cococool »

Thanks a lot for the thunderbolt-quick response ! I tried what you said in this topic, it is an inventive way to make this effect and kinda make the job done in some situations.

I hope this feature will be properly implemented in a future version, it would definitely be a great addition :)


Thanks again, I hope your killer software will make you rich someday, I love how it is musician-oriented and the clean but powerful interface. 8-)
Cococool
Posts: 5
Joined: Thu Mar 17, 2016 5:21 pm

Re: Locking a video, as a texture, to a 3d model

Post by Cococool »

Another way to make a similar effect could be achieved by using this magnificent GLSL shader as a base, and fine-tuning it : https://www.shadertoy.com/view/ldf3Wf

Unfortunately, when I copy/paste the sourcecode in a text editor, and import it, the following video appears : http://img15.hostingpics.net/pics/29834 ... nMagic.png

The line is turning around the sphere, instead of Nyancat around a NyanPlanet.


I know there are some GLSL shaders which don't work in Magic ( especially the ones including 3D models ) but when they don't, Magic usually shut down. Here, the GLSL seems to be running anyway, so I thought there could be a way to make it work ? I'll try to make something with this, but if somebody knows any tips which could help replacing the model with whatever you want by messing with the source code, that would be insane !

Thanks a lot for taking the time to answer to newbies questions like this anyway, much appreciated
dj0le
Posts: 53
Joined: Sun Jan 31, 2016 9:46 am
Location: Tuzla, Bosnia & Herzegovina

Re: Locking a video, as a texture, to a 3d model

Post by dj0le »

Cococool

Looks like you forgot to save the cat/bg image from the shadertoy page. It works in Magic:
Screenshot (36).png
Screenshot (36).png (55.58 KiB) Viewed 5279 times

If you are using Eric's converter, just go to the bottom of the page and right click / save both images into the same folder as the shader.fs file.

https://magicmusicvisuals.com/utils/sha ... to_isf.php


If you want to use your own images instead of the ones from the original, just make sure they are labelled the same as what's being called in the code. In this case the Nyancat is looking for tex16.png and tex14.png. You can change the file names, or overwrite the original images with your own.

Hope that helps, ^_^
Cococool
Posts: 5
Joined: Thu Mar 17, 2016 5:21 pm

Re: Locking a video, as a texture, to a 3d model

Post by Cococool »

... Is Eric some kind of mad wizard ?

It works dj0le, thanks a lot you're awesome !

And I don't have one Nyancat, but THREE at the same time ! Haha I don't know why but it doesn't matter, the important thing is this wizardry to convert shaders to isf with images included, lots of potential here. I was just copy/pasting the code in a txt file before your intervention.

Thanks again, I'll try to make my own wizardry now
mTvizuals
Posts: 3
Joined: Mon Apr 11, 2016 10:19 pm

Re: Locking a video, as a texture, to a 3d model

Post by mTvizuals »

Cococool wrote:... And I don't have one Nyancat, but THREE at the same time !
I suppose this is related to the wrap property which is set to "clamp" in the shadertoy sampler options(the little hashtag icon in iChannel1 at https://www.shadertoy.com/view/ldf3Wf)?

I have no idea how to specify that in the .sf though. I have looked in the ISF specs and googled a plenty and it's not jumping out at me... Anyone? Be my hero!!
Magic
Site Admin
Posts: 3441
Joined: Wed Apr 09, 2014 9:28 pm

Re: Locking a video, as a texture, to a 3d model

Post by Magic »

You're right, toggling clamp vs. repeat does change the image. I'll have a look and see if it might not be working properly in Magic.
Post Reply