animated texture map on 3d model
animated texture map on 3d model
i need--err, like to-- use an animated texture on a 3d model...
i'm currently using 3D max and exporting as either *.obj or *.3ds but the "animated" texture does not appear on the model in magic...
...i also tried to used an animated gif and that too does not playback the frames...
is this supported?...if not, is it something that can implemented?..
i'm currently using 3D max and exporting as either *.obj or *.3ds but the "animated" texture does not appear on the model in magic...
...i also tried to used an animated gif and that too does not playback the frames...
is this supported?...if not, is it something that can implemented?..
Re: animated texture map on 3d model
That feature isn't supported right now unfortunately. But we can definitely look into adding it.
Re: animated texture map on 3d model
while you cant do proper animated textures atm, one trick I use sometimes for a similar effect is chaining up inverts like so:
http://i.imgur.com/ujfr31l.png
http://i.imgur.com/ujfr31l.png
Re: animated texture map on 3d model
Thanks Syd, that's a cool idea.
A similar and perhaps more efficient strategy could be to use an alpha mask: http://magicmusicvisuals.com/forums/vie ... ?f=3&t=146. Instead of using an image as the first input in that example, you could use a model.
You'd get the same effect of a video texture projected onto the model, but using less modules and therefore retaining a higher frame rate.
A similar and perhaps more efficient strategy could be to use an alpha mask: http://magicmusicvisuals.com/forums/vie ... ?f=3&t=146. Instead of using an image as the first input in that example, you could use a model.
You'd get the same effect of a video texture projected onto the model, but using less modules and therefore retaining a higher frame rate.
Re: animated texture map on 3d model
that's a neat idea!
I started using the invert chains before the shader module had inputs and never really thought about changing it up.
I started using the invert chains before the shader module had inputs and never really thought about changing it up.
Re: animated texture map on 3d model
so close!...unfortunately using the invert and/or GLSL alpha mask "converts" the 3D model into a different class object (?) that is now simply 2D...as such, it will no longer interact and/or be able to intersect with any other 3D model...
what i'm trying to do is have a tv play back videos on the screen while the tv gets rotated/translated as per input...
when i use the GLSL alpha trick to the screen (which i inserted as a separate model than the rest of the tv) and rotate the tv and the screen, the screen will always be in front of the tv as per the draw order set by the spout input connection...if i change the input order, the tv body will obscure the screen...
still, using a 3D model as part of the GLSL alpha trick may prove to provide some other interesting visuals
here's a screen cap of my experiment thus far...
what i'm trying to do is have a tv play back videos on the screen while the tv gets rotated/translated as per input...
when i use the GLSL alpha trick to the screen (which i inserted as a separate model than the rest of the tv) and rotate the tv and the screen, the screen will always be in front of the tv as per the draw order set by the spout input connection...if i change the input order, the tv body will obscure the screen...
still, using a 3D model as part of the GLSL alpha trick may prove to provide some other interesting visuals
here's a screen cap of my experiment thus far...
Re: animated texture map on 3d model
hrm, tricky one. Tried experimenting w/ alpha with ramp+threshold on the video?
edit: you can't use alpha on a video it seems, brightness perhaps then?
edit: you can't use alpha on a video it seems, brightness perhaps then?
Re: animated texture map on 3d model
That's true. Invert and Alpha Mask are 2D effects, so if you have a 3D model as input to one of them, the model will be "rendered" into an image first, and you'll lose the depth.so close!...unfortunately using the invert and/or GLSL alpha mask "converts" the 3D model into a different class object (?) that is now simply 2D...as such, it will no longer interact and/or be able to intersect with any other 3D model...
Ahh, gotcha. You can do that pretty easily if you use a DepthTest module. It controls whether or not things should intersect and/or obscure each other in 3D space. Like this:what i'm trying to do is have a tv play back videos on the screen while the tv gets rotated/translated as per input...
when i use the GLSL alpha trick to the screen (which i inserted as a separate model than the rest of the tv) and rotate the tv and the screen, the screen will always be in front of the tv as per the draw order set by the spout input connection...if i change the input order, the tv body will obscure the screen...
In the second screenshot, you can see the video is in front of the cube. But what you don't see is that when the cube rotates around 180 degrees, the video will be behind it. Which is exactly what you're looking for, I think . It maintains its position relative to the cube, as it would in "reality".
Sorry I don't have time to do a video example right now, but hopefully that will help. Also you should look at the sample project called "DepthTestExample.magic". Try bypassing the DepthTest module to see how it affects the scene.
Basically what DepthTest does is it groups all of its inputs into one 3D region, so they will interact with each other properly if they're in the same (x,y,z) location. Otherwise everything in Magic is done with layers (http://magicmusicvisuals.com/downloads/ ... ingModules), more like Photoshop, and they don't intersect even if they're in the same position.
Actually you can, but Magic uses premultiplied alpha (which some people also call "additive blending"). So you have to set both the brightness and the alpha to get a transparent effect. See this tutorial: http://magicmusicvisuals.com/forums/vie ... p?f=3&t=28edit: you can't use alpha on a video it seems
Re: animated texture map on 3d model
eric, even closer!...the DepthTest works if you simply use a video...
thanks for all the ideas everyone...
however, using the GLSL AlphaMask (to get the specific shape of the screen) is not elevating the object to the same 3D region...perhaps this is a limitation of the shader?...
i suppose what i could do is render the video i want on the screen with an embed alpha channel (to cut out the tv bezel shape) and then directly use that video without the need for the GLSL pipeline --sweet! thanks for all the ideas everyone...
Re: animated texture map on 3d model
I found the same thing with depth testing the shader output. I came to the same conclusion as you
one way that might be easier than editing all the source videos is playing it with something else, applying the mask to the composition, then bringing it into magic with spout/syphon and using the same solution you came up with.
one way that might be easier than editing all the source videos is playing it with something else, applying the mask to the composition, then bringing it into magic with spout/syphon and using the same solution you came up with.
Re: animated texture map on 3d model
Hmm, you're right! I think this is a bug actually. I'll see what I can do.however, using the GLSL AlphaMask (to get the specific shape of the screen) is not elevating the object to the same 3D region...perhaps this is a limitation of the shader?...
Re: animated texture map on 3d model
You may be able to do this with unity via spout 2Syd wrote: one way that might be easier than editing all the source videos is playing it with something else, applying the mask to the composition, then bringing it into magic with spout/syphon and using the same solution you came up with.
Re: animated texture map on 3d model
I think I've fixed this in v1.53 (beta). Just make sure the Model module is the bottom input to the Depth Test module, so the video will be rendered on top, as shown in the images below.Eric wrote:Hmm, you're right! I think this is a bug actually. I'll see what I can do.however, using the GLSL AlphaMask (to get the specific shape of the screen) is not elevating the object to the same 3D region...perhaps this is a limitation of the shader?...
Notice the difference in rotation angle, so you can see how the video is obscured by the cube when it's on the back side.