Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Gif animated in Virtual art gallery?

misterpaint
Registered User
Quote
2022-04-03 17:12:11

Hi, I dont know if the new release di cc6 have this function. Is possible in webgl to show on a wall one playbill animated in format ".gif"?
In my Virtual art Gallery I must put nft artworks, are animated gif.

I have saved singles png by a gif, and aninated with function included in cc6 for animate a texture, but is crazy, more gif have 200 frames... Impossible to Make.

Solutions? ????


Guest
Guest
Quote
2022-04-03 19:05:12

Someone made an extension for gifs. I will look on the forums for a link for you.


Guest
Guest
Quote
2022-04-03 19:15:18

I couldn't find it in the forums. No clue who made this, but here is the code:


/* <behavior jsname="behavior_GIF_Animator" description="GIF Animator">
<property name="Animation_Folder_Name" type="string" default="Poses" />
<property name="Animation_Pose_Name" type="string" default="" />
<property name="Quantities_Frames" type="int" default="1" />
<property name="Interval_Frames" type="int" default="250" />
<property name="Embedded" type="bool" default="false" />
</behavior>
*/

behavior_GIF_Animator = function() {
this.Occurring_Time = 1;
this.FrameNumber = 1;
};

behavior_GIF_Animator.prototype.onAnimate = function(currentNode) {
// Interval Occurring:
if (this.Occurring_Time > this.Interval_Frames)
{
// Next Frame Pose:
this.Occurring_Time = 1;
var Texture;

if (this.Embedded)
Texture = ccbGetSceneNodeMaterialProperty(ccbGetSceneNodeFromName(this.Animation_Pose_Name + this.FrameNumber), 0, "Texture1");
else
Texture = ccbLoadTexture(this.Animation_Folder_Name + "\\" + this.Animation_Pose_Name + this.FrameNumber + ".png");

ccbSetSceneNodeMaterialProperty(currentNode, 0, "Texture1", Texture);
this.FrameNumber += 1;
if (this.FrameNumber > this.Quantities_Frames)
this.FrameNumber = 1;
}

this.Occurring_Time += 1;
return true;
}


Save the code in a txt file and rename it to behavior_GIF_Animator.js and place it in your CC extensions folder. I have not used this in any project so I can't say with certainty how good it is, but you might need to experiment with it to find out. Hope this helps.


Aiming_bullets
Guest
Quote
2022-04-04 00:23:33

Try this behavior, it is similar to the one posted by guest but allows you to have more control.

https://neophyte.cf/ccb_behavior...


pmax
Registered User
Quote
2022-04-05 20:45:45

@misterpaint
you can use this site to convert Gif file to sprite sheet and then use the plug-in shaders created by just_in_case.

https://ezgif.com/gif-to-sprite

plug-in
https://ambiera.com/forum.php?t=...


Arcanjo
Guest
Quote
2022-04-06 03:56:35

You have to buy Coppercube Pro and transform all PNG as a video and reproduce this video in 3d world.


misterpaint
Registered User
Quote
2022-04-13 22:39:16

thank you to all! too kind :)

I'll try with the plugin, even if the gif has a really lower weight than the total of the pngs.

I have to convert an NFT of over 200 frames ... and I have to set 10 nft ... it will weigh a lot for webgl application.

but I think that this is the only solution for now


just_in_case
Moderator
Quote
2022-04-14 04:48:11

@misterpaint, I just checked out your website ArtGallery, you have done a very great job, and the site too is created with the Rocketcake website editor. It is really amazing to see such beautiful site created with Rocketcake. It requires great skills to create something like that. You have been teasing us with your art-gallery for quite some time, but now it seems that it is finally fully developed. Many Congratulations to you :)


misterpaint
Registered User
Quote
2022-05-27 12:04:33

Thx to all for support
you are truly a big family thx!

@just_in_case thank you! I'm also trying to make the project file of my site available to the forum, so maybe someone can help.


me
Guest
Quote
2022-05-27 12:49:43

2022...who still uses gif ???? really ?


misterpaint
Registered User
Quote
2022-06-03 00:32:46

eh... Especially in the NFT art
Do you know NFT?


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "?nternational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact