How To Make an AI Randomizer Effect in Effect Maker with @varunraikar
YouTube Creators
0:00 Hi, I'm Bun and in this video I'll show you how to build
0:03 an AI powered randomizer effect that transforms
0:06 your selfie into a spirit animal portrait.
0:08 We'll be using the AI randomizer template in Effect Maker to do this.
0:12 By the end of this video,
0:13 you will have your own randomizer AI effect ready to publish on YouTube.
0:17 Here's how it works.
0:18 The effect cycles through different options, randomly picks one,
0:22 and based on that choice, an AI portrait is generated.
0:26 You can use this template to create personality quizzes,
0:29 random character generators, or even surprise transformations.
0:33 Basically, any effect where people will get
0:35 a different result every time they try it.
0:38 Let's dive in and customize.
0:40 First, open Effect Maker on your browser.
0:42 And here, select the AI randomizer template from the gallery.
0:45 Once you open the template, you'll see this card popup that tells you
0:49 about the effect and ways to customize it.
0:51 I'll click on Got it.
0:52 Here's your workspace.
0:53 On your left, you'll have your objects panel
0:55 where you'll see all the objects in your effect.
0:58 And here, some objects are visible and some are hidden.
1:01 You see the visible objects in the scene view.
1:04 Just beside that, we have the assets panel,
1:06 which has all the images and props neatly organized in folders.
1:11 This is where we'll customize the prompts, adjust the web generation properties,
1:14 and also update the icons to match our theme.
1:18 Below the scene view, you've got the visual script panel.
1:20 This is the brain of your effect.
1:22 Click on this X icon to see all the variables.
1:25 You can toggle the visibility of this panel
1:27 by using the change layout button on top right.
1:30 And finally, here we have the preview panel
1:32 where you can test everything in real time.
1:35 Let me show you the default effect first.
1:37 Here at the top, we see the vegetable
1:39 icon cycling and the title says vegetable portrait.
1:43 I hit record and tap the screen.
1:45 Immediately we see a flash and it stops on a vegetable.
1:49 Here the user's image is captured.
1:51 Then we get a loading screen while the AI is generating the image.
1:55 Once generated, the transformed image fades in.
1:58 And the coolest part about this is the AI
2:01 result changes based on the vegetable that got randomly selected.
2:04 This is what makes people try this effect again and again.
2:07 Now, let me show you what's happening behind the scenes.
2:10 I'll scale down the preview panel and jump to the objects panel.
2:14 Here the first object we have is the camera snapshot which
2:17 captures your selfie and sends it to the create AI image node.
2:21 This is hidden until the photo is taken
2:23 and the visual script controls when it appears.
2:26 Below that we have the background image which is currently invisible.
2:29 That is because its opacity is set to 0%.
2:32 It is just a black image whose opacity slightly increases during the loading
2:36 phase to visually tell the user that the AI is generating the image.
2:40 Next, we have the color filter, which is also hidden by default.
2:44 I will enable it and adjust the color grading here.
2:47 Watch what happens when I drag the saturation all the way to the left.
2:51 We get a black and white image.
2:53 I'll adjust this to give me a vibrant color effect.
2:56 Below that, we have a loading spinner.
2:58 It rotates while the AI is generating the image.
3:01 Its opacity currently is set to 0%.
3:03 If I increase it, you can see the loading spinner.
3:06 Let's change it to match our theme.
3:08 To change it, select the object, click on add asset,
3:11 and here upload your new loading spinner.
3:13 I made this one using the Nano Banana Pro model on the Google Gemini app.
3:17 Once uploaded, it will be automatically applied to the loading spinner object.
3:22 Next, we have icons tabbed and icon cycling.
3:24 If I enable icons tab, it's blank because its asset is
3:28 being dynamically assigned via the visual script.
3:31 This is the same for icon cycling.
3:33 It looks blank here in the scene view,
3:35 but we see the icons shuffling in the preview panel.
3:38 That is because its assets are also
3:40 being dynamically assigned in the visual script.
3:44 Next is the AI image.
3:45 This is where you'll see the transformed image appear.
3:48 It's hidden by default and only fades in once the generation completes.
3:53 Below that, we have body segmentation,
3:55 which is used to capture the user's reaction as the AI generates the image.
4:00 And finally, we have got our title text and a flash image.
4:04 The flash image is just a white image whose
4:06 opacity goes from zero to one and back to zero, mimicking a camera flash.
4:10 I'll modify the title to match our theme and I'll write,
4:13 "What's your spirit animal?" Once written,
4:16 I'll reposition it using the move tool.
4:18 Time to swap these vegetables for our cute animals.
4:21 To do that, I'll go to the assets panel,
4:23 click on upload asset, and upload my new icons.
4:27 A quick tip here is when you are creating these new icons,
4:30 check the dimensions of the original asset and make your new PGs
4:34 in the same resolution so that the new
4:36 icons fit perfectly without any adjustment.
4:39 Once uploaded, I'll open the variables panel, find the icon list variable,
4:44 and here replace each vegetable icon with my animal icons.
4:54 Now we have customized the icons, title text,
4:56 and even the color filter to match our theme.
4:59 It's time to edit the AI image prompts.
5:01 To do that, I'll go to the assets panel, and here open the prompts folder.
5:05 Set the first one, which kindly says broccoli.
5:08 I'll rename it to croc, short for crocodile.
5:10 Then I'll customize its properties.
5:15 For a full deep dive on AI image properties like character description,
5:18 post similarity, art style,
5:20 retain likeness, go watch my air transformation tutorial
5:23 where I've covered all of this in detail.
5:26 It will be linked in the description down below.
5:28 Now back to the video.
5:30 I have updated all the seven prompts to generate images that match my theme.
5:34 Now that we are done customizing this effect,
5:36 let's quickly take a look at the visual script.
5:38 The visual script has eight sections.
5:41 This is the part where the recording starts and it sets
5:44 the is recording output to true and fades out the title.
5:48 Here we have the cycling loop for icons.
5:50 This continuously shuffles the icons till the user taps.
5:54 The continuous shuffling is being handled via the frame update node.
5:59 And then here we have the main logic which checks if the user has tapped.
6:04 Once the user has tapped, it will set the tap variable to true.
6:08 and it will also disable the icon cycling and enable the icon tapped.
6:13 This icon tapped asset is dynamically set using a random
6:16 number and each number maps to a unique icon.
6:21 This random number is calculated on start using the start node
6:25 and it takes the length of the cycling icons and randomly selects
6:29 one number in that range and that same number is used
6:33 to decide which prompt should be sent to the create AI image node.
6:37 When the icons tapped is enabled, it also takes a user snapshot using the camera
6:42 snapshot node and sends it to the create image node.
6:45 Once the creation has started, this set of nodes enable the loading phase.
6:50 First, they will trigger a flash,
6:52 then enable the body segmentation and color filter.
6:54 The loading spinner is faded in along with the background.
6:58 Now once the image is generated these set
7:01 of nodes here at the bottom take the output
7:04 from create a image node and it will set
7:06 the generated image to the AI image canvas asset.
7:10 Once set the AI image canvas is also enabled.
7:13 Then its opacity increases from 0 to one to give it that fade in animation look.
7:19 As soon as it is faded in the background,
7:22 loading spinner icons tabbed and the color filter all of them are hidden.
7:26 And finally, here we have some more of these scripts.
7:29 This little section allows us to drag
7:31 the body segmentation around on the screen.
7:34 And the logic just below that rotates
7:36 the loading spinner using the frame update node.
7:39 That is the logic pro.
7:40 You don't need to customize any of this.
7:42 It just works.
7:43 And now before you submit, test it on different models in the preview panel.
7:47 Here, click on view video button and select different
7:50 models that you want to test the effect on.
8:08 Also test the effect on your phone by clicking
8:10 on the preview on phone button and scan this QR code.
8:14 Once everything works as expected,
8:16 click on submit and it will prompt you to upload a thumbnail for your effect.
8:20 For AI effects, use clear net image that shows
8:22 before on one side and after on the other.
8:25 This makes it super obvious for the user to understand what your effect does.
8:29 Click on continue and I'll name it spirit animal.
8:32 Next, for description, I'll write what the effect does.
8:35 This effect transforms your selfie into an artistic
8:39 portrait infused with your spirit animal.
8:41 And for the ticker, I'll leave it at record and tap.
8:44 Once done, I'll submit.
8:45 And that's it.
8:47 Your effect will be published to YouTube
8:48 once reviewed and approved by the YouTube team.
8:51 For more information on using Effect Maker,
8:54 check out the links in the description below.
8:55 And thank you so much for watching till the end.
8:58 Don't forget to hit the subscribe button
8:59 for more news and tutorials just like this.