如何使用ImageMagick将背景放在动画,渲染的前景下
我有一些具有透明背景的动画行星(在大多数观看者中为格式),并想在他们身后放置一个背景之星字段,例如:
我目前我目前在图像后面呈现一架平坦的平面, Star JPEG映射为纹理,但我想避免的问题。我不希望一个对象回到那里,我只是想要一个静态背景(实际对象会导致阴影,摄像头,照明等复杂性)
我正在尝试使用这样的各种成像命令,但似乎没有任何作用。他们要么完全杀死动画(使其成为静止图像),要么每个动画周期一次闪烁背景,并显示其余帧的方格背景。
convert animated_planet.gif stars2.jpg -composite planet_with_background.gif
I have some rendered, animated planets with a transparent background (checkered in most viewers) and want to put a background star field behind them, like this:
I'm currently rendering a flat plane behind the image with the star jpeg mapped as a texture but that's got problems I want to avoid. I don't want an object back there, I just want a static background (an actual object causes complexity with shadows, camera angles, lighting etc)
I'm trying various ImageMagic commands like this but nothing seems to work. They either kill the animation entirely (make it a still image) or flash the background once per cycle of the animation and display the checkered background for the remaining frames.
convert animated_planet.gif stars2.jpg -composite planet_with_background.gif
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发布您的前景和背景图像。在ImageMagick中,您可以在一个具有透明度的动画下放置一个恒定的背景,如下所示,假设imagemagick 6。
如果在ImageMagick 7上,后缀为您的背景图像后缀(JPG,PNG,GIF等)
,则替换
转换>转换> convert
带有magick
请参阅
https://legacy.imagacy.imagemagick.org/usage/usage/usage/usage /anim_mods/#背景
加法:
这对我有效6.9.12-49 Q16 Mac OSX Monterey。
或者要稍微放慢一点:
Post your foreground and background images. In Imagemagick, you can put a constant background under an animation that has transparency as follows assuming Imagemagick 6.
where suffix is your background image suffix (JPG, PNG, GIF etc)
If on Imagemagick 7, replace
convert
withmagick
See
https://legacy.imagemagick.org/Usage/anim_mods/#background
ADDITION:
This works fine for me on IM 6.9.12-49 Q16 Mac OSX Monterey.
Or if you want to slow it down a bit: