<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[AR Bootcamp - Medium]]></title>
        <description><![CDATA[AR Bootcamp is your one-stop shop for learning augmented reality. Learn something new from our tutorials and guides or stop by for some inspiration from our filter compilations. - Medium]]></description>
        <link>https://medium.com/ar-bootcamp?source=rss----6b299577f70d---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>AR Bootcamp - Medium</title>
            <link>https://medium.com/ar-bootcamp?source=rss----6b299577f70d---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 03:03:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/ar-bootcamp" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AR Bootcamp Newsletter #19]]></title>
            <link>https://medium.com/ar-bootcamp/ar-bootcamp-newsletter-19-3f8a2f888752?source=rss----6b299577f70d---4</link>
            <guid isPermaLink="false">https://medium.com/p/3f8a2f888752</guid>
            <category><![CDATA[spark-ar]]></category>
            <category><![CDATA[augmented-reality]]></category>
            <category><![CDATA[niantic]]></category>
            <category><![CDATA[8th-wall]]></category>
            <category><![CDATA[lens-studio]]></category>
            <dc:creator><![CDATA[Michael Porter]]></dc:creator>
            <pubDate>Fri, 11 Mar 2022 17:55:38 GMT</pubDate>
            <atom:updated>2022-03-11T17:55:23.799Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s been a while since I sent out a newsletter, but I am indeed still rambling about AR stuff.</p><h3>Batteries are included</h3><p>I sometimes like to recreate TikTok filters for Snapchat. My most recent recreation was the <a href="https://www.snapchat.com/unlock/?type=SNAPCODE&amp;uuid=af534658df0e440baa176db181c3559a&amp;metadata=01">Split Scanner</a> lens I created. So what’s the big deal? The big deal is that I did not write a single line of code to create this lens. I used the built-in behavior and tween scripts to handle everything. I think it would have been easier to write a control script, but I wanted to see if I could create the lens only with the built-in scripts. The scanning effect itself is based off <a href="https://arbootcamp.com/snapchat-intermediate/time-warp">my time warp tutorial</a>, and then I went ahead and created a <a href="https://arbootcamp.com/snapchat-intermediate/tween-script-pro">tutorial for the tween script</a>. The more I use the tween script, the more I’m impressed by what it can do. Definitely check it out if you haven’t already.</p><figure><img alt="Demo of the split scanner lens for Snapchat" src="https://cdn-images-1.medium.com/max/169/0*0TfujXnK7hYIz1Qj.gif" /><figcaption>Demo of the split scanner lens for Snapchat</figcaption></figure><h3>Miss out on the Snap Lens Network?</h3><p>Back at Lens Fest in December, Snap announced they were opening back up the Snap Lens Network (SLN) application form. Snap just did their quarterly review of applicants and I know a bunch of creators were not selected. Here is my advice to anyone who was not selected this time around for the SLN.</p><ul><li>Keep creating. If you are passionate about AR, a little rejection won’t stop you.</li><li>But don’t keep doing what you’ve been doing. If you were not selected, creating the same sorts of lenses won’t get you in the SLN the next time you apply. You need to be trying new things and upping the quality of what you are creating. You don’t need to be a world-class creator to get in, but you do need to be improving.</li><li>Remember that the SLN is about helping YOU as a creator grow, not about the verification. Yes the verification is nice, but it isn’t going to change your life. The real benefit is in having extra access to the Lens Studio team for troubleshooting lenses and testing new features.</li><li>Fail. I’ve achieved a certain level of mastery of Lens Studio (there’s still tons I don’t know how to do) because I moved away from the templates and started trying things on my own. I’ve spent countless hours trying to get things to work and have a ton of unpublished projects that just didn’t work out or failed to meet even my very low standards for what is ready to publish. But through all that failure, I’ve learned how Lens Studio works and figured out ways to get things to work. It is an extremely frustrating process and I see lots of creators avoid doing this, but thinking long-term this is one of the most beneficial things you can do with regards to learning anything.</li></ul><h3>Niantic bought 8th Wall</h3><p>You’ve probably already heard the <a href="https://www.8thwall.com/blog/post/68143455050/8th-wall-is-joining-niantic">big announcement</a> that Niantic bought 8th Wall. My big question is if this means 8th Wall will become affordable for independent AR creators. Currently it is $99 a month — for comparison you can get the entire Adobe Creative Suite for $80 a month. I’ve made the acquaintance of a few people at 8th Wall and they’re great, I love talking with them. But that pricing is just too high. I guess it worked well enough to be bought by Niantic, but just imagine how prominent WebAR could be if they opened up their platform a bit more.</p><figure><img alt="Meme of person riding a bike labeled as 8th Wall. It is captioned as them creating a great WebAR platform. The next panel has them shoving a stick into the front wheel of the bicycle and is labeled as pricing their product at $99 a month. The last panel shows the person and bike on the ground having crashed." src="https://cdn-images-1.medium.com/max/500/0*fYlaunC8xOWUUUoN.jpg" /><figcaption>Meme of person riding a bike labeled as 8th Wall. It is captioned as them creating a great WebAR platform. The next panel has them shoving a stick into the front wheel of the bicycle and is labeled as pricing their product at $99 a month. The last panel shows the person and bike on the ground having crashed.</figcaption></figure><h3>Want more?</h3><p>Subscribe to the newsletter to get awesome(?) articles like this in your inbox!</p><p><a href="https://modelsbymike3d.eo.page/arbootcamp">AR Bootcamp Newsletter</a></p><p>Do you want to learn how to make awesome AR filters? AR Bootcamp has you covered! Head on over to <a href="https://arbootcamp.com/tutorials">our tutorials</a> to get started today!</p><p><em>Originally published at </em><a href="https://arbootcamp.com/newsletter/2022/03/ar-bootcamp-19"><em>https://arbootcamp.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f8a2f888752" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ar-bootcamp/ar-bootcamp-newsletter-19-3f8a2f888752">AR Bootcamp Newsletter #19</a> was originally published in <a href="https://medium.com/ar-bootcamp">AR Bootcamp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Master the Tween Script in Lens Studio]]></title>
            <link>https://medium.com/ar-bootcamp/master-the-tween-script-in-lens-studio-b98ba74dac6d?source=rss----6b299577f70d---4</link>
            <guid isPermaLink="false">https://medium.com/p/b98ba74dac6d</guid>
            <category><![CDATA[augmented-reality]]></category>
            <category><![CDATA[lens-studio]]></category>
            <category><![CDATA[snapchat-lenses]]></category>
            <dc:creator><![CDATA[Michael Porter]]></dc:creator>
            <pubDate>Mon, 21 Feb 2022 21:09:13 GMT</pubDate>
            <atom:updated>2022-02-21T21:08:28.086Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vxn8rwSnPdtr00EWZTamhA.jpeg" /><figcaption>Master the Tween Script in Lens Studio</figcaption></figure><p>If you need to animate anything inside Lens Studio — position, rotation, scale, opacity, etc. — the Tween script is your best friend. Now don’t be intimidated by the word “script” — you don’t need to write any code to use the tween script. All you need to do is configure a few settings and you are good to go!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FahN7KVKhcWQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DahN7KVKhcWQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FahN7KVKhcWQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/602b5baf6ba2523f4d35a41650abf510/href">https://medium.com/media/602b5baf6ba2523f4d35a41650abf510/href</a></iframe><h3>Adding the tween manager script</h3><p>Before we can start using the tween script, we need to import the Tween Manager. We do this through the Objects Panel and can find the Tween Manager either by searching or by finding the Helper Scripts section.</p><figure><img alt="Adding the Tween Manager in Lens Studio" src="https://cdn-images-1.medium.com/max/466/0*mdKwbVqWGP6x9fTy.jpg" /><figcaption>Adding the Tween Manager in Lens Studio</figcaption></figure><p>Depending on what you have selected in your scene, the Tween Manager may be added at the top level or nested under another object. You’ll also notice a bunch of objects and text added to your scene. Expand the TweenManager object and delete the examples. Then, and this is important, click and drag the TweenManager all the way to the top of your object list. When a lens starts up, Lens Studio (or Snapchat when it is running on your phone) will start at the top and run down through everything. Each tween script you add to your lens relies on the TweenManager, so before any of those can run the TweenManager needs to be running. You don’t need to do anything else, simply move it to the top of your scene hierarchy.</p><figure><img alt="Placing the TweenManager at the top of your object hierarchy" src="https://cdn-images-1.medium.com/max/288/0*BAM5I7SZ7S2jSUCH.jpg" /><figcaption>Placing the TweenManager at the top of your object hierarchy</figcaption></figure><h3>Tween types</h3><p>Lens Studio gives us a few different tween types to use in our lenses. The tween type you use will depend entirely on what you want to do.</p><ul><li><strong>TweenTransform</strong> is for moving, rotating, or scaling objects.</li><li><strong>TweenScreenTransform</strong> is similar to TweenTransform but geared towards two dimensional objects (like Screen Images).</li><li><strong>TweenColor</strong> is for transitioning a material’s color.</li><li><strong>TweenAlpha</strong> is good for fading objects in and out.</li><li><strong>TweenValue</strong> will transition between two numbers and is great for scripts, material properties, and VFX properties.</li><li><strong>TweenChain</strong> lets you run multiple tween scripts either in sequence or all at once.</li></ul><h3>Tween settings</h3><p>This section is not very exciting, but it’s good to run through our various options before we start adding tween scripts.</p><ul><li><strong>Scene Object</strong> If you don’t specify this, the tween will act upon whatever object the script component is attached to. You’ll probably be leaving this blank most of the time, but if you ever need/want to place your tween script elsewhere, you can use this field to tell Lens Studio which object should be affected.</li><li><strong>Tween Name</strong> If you want to use a Tween Chain (more on that later) or trigger your tween from a script (also more on that later), you will need to specify a name for the tween.</li><li><strong>Play Automatically</strong> If enabled, your tween will start as soon as your script component is triggered, which by default is when the lens starts.</li><li><strong>Loop Type</strong> This option determines if your tween repeats or ping pongs. The ping pong option means your tween will run, and when it is finished it will run in reverse back to the beginning.</li><li><strong>Type</strong> When applicable, this setting will let you choose the type of change e.g. moving, rotating, or scaling.</li><li><strong>Movement Type</strong> When applicable, this option will let you choose what the reference point for your tween is. From/To lets you specify the starting and ending points for your tween. To will take your objects current starting value (e.g. position) and then tween it to what you have specified. From is similar to To, but it will take your object&#39;s current position as the endpoint and start from what you specify. Offset will take your objects current position (or scale or rotation) and shift it. This is especially helpful if you want your object to move across the screen but don&#39;t necessarily care about the starting and ending values.</li><li><strong>Additive</strong> This option will appear when your Movement Type is Offset. You also need to set the Loop Type to &quot;Loop.&quot; If disabled, your object will reset to its starting position when the tween finishes. If enabled, your object will continuously be transformed - for example it could keep rotating indefinitely.</li><li><strong>Start &amp; End</strong> This is where you specify the starting and ending values for the tween. Depending on what Movement Type you selected, the starting or ending fields may not be present.</li><li><strong>Time</strong> This option specifies how long the tween will last and is in seconds.</li><li><strong>Delay</strong> This option will specify how long to wait before running the tween. It is also specified in seconds.</li><li><strong>Is Local</strong> This option is useful if the object you want to tween is the child of another object (like if it is tracking to the user’s face). If you disable this option, then the start and end values will all be in world space and the object will not be affected by any parent objects.</li><li><strong>Easing Function</strong> This option determines how the tween value changes. If you want a constant change, Linear is what you’ll want to choose. The other options can provide stylized motion (bounce, elastic) or more natural looking motion (quadratic).</li><li><strong>Easing Type</strong> This option specifies to which portion of the movement the easing function should apply.</li></ul><blockquote><em>There is no specific combination of easing function and easing type that I recommend using. It all depends on what you want your motion to look like so I suggest playing around with a few different combinations.</em></blockquote><h3>Example — TweenTransform — movement</h3><p>There are a lot of different parameters we can change, so let’s start working with the TweenTransform script to see what they all do. I’m going to start by adding a Box to my scene so we have something to transform, and then I’m going to add a new script component to my cube and select the TweenTransform script from inside the Tween -&gt; TweenTypes folder. Don&#39;t add the Tween script to your object, make sure you are grabbing things from the TweenTypes folder. If you are following along, you may notice that even if you moved your box to be visible to the camera, it disappears once you add the TweenTransform. Don&#39;t worry, if you take a look at the Start and End values for the TweenTransform you&#39;ll see that it is placed at (0,0,0) which is right where the camera is. Go ahead and change your start value to (-5,0,-80) and your end value to (5,0,-80). You should now see the box move! Once it stops simply reset your lens to see the motion again.</p><figure><img alt="Our initial settings for the TweenTransform script" src="https://cdn-images-1.medium.com/max/341/0*ktPDcv8GBe4ho3d_.jpg" /><figcaption>Our initial settings for the TweenTransform script</figcaption></figure><p>Now let’s add a Head Binding (go ahead and delete the included occluder object if you like) and make the box a child of the head binding. I’m also going to make the following changes to my tween settings:</p><p>Now my cube is moving back and forth across the top of the user’s head. This still isn’t the most exciting thing in the world, but now we are starting to see the power of the tween script. I could replace my cube with some sort of graphic or animation and I’d be well on my way to having some sort of cyberpunk or Iron Man style display.</p><h3>Example — TweenTransform — rotation</h3><p>One issue people sometimes run into is trying to get an object to rotate continuously. I’m going to add a box to my scene, position it so I can see it, then I’m going to add a TweenTransform script to it. Rather than try to get it to rotate from 0 to 359 degrees, I am going to use the “Offest” Movement Type. Here are my tween settings:</p><ul><li>Loop Type: Loop</li><li>Type: Rotate</li><li>Movement Type: Offset</li><li>Offset: (0, 10, 0)</li><li>Additive: Enabled</li><li>Easing Function: Linear</li><li>Easing Type: In/Out</li></ul><p>Now my box is continuously rotating! I can adjust the speed by changing the Time or by adjusting the Offset. What is nice about using rotation offset is that I can adjust the x and z angles of my object and it will keep rotating around the y axis (which is the axis I choose to use). You can also get fancy and add a delay to have a stepped rotation.</p><blockquote><em>You may need to reset your lens if you adjust your object’s rotation while the tween script is running.</em></blockquote><figure><img alt="Getting continuous, stepped rotation with the tween script in Lens Studio" src="https://cdn-images-1.medium.com/max/338/0*iHjaXcer0gbgHPdP.jpg" /><figcaption>Getting continuous, stepped rotation with the tween script in Lens Studio</figcaption></figure><h3>Example — TweenScreenTransform — scale</h3><p>A great way to add some pizzazz to buttons is to have them react to being pressed. I’ve added a screen image to create a simple button. My button isn’t actually doing anything, but you can use a Behavior Script to make it do something (this tutorial is focused on the tween script so we won’t be going into any details about making buttons actually do anything).</p><p>We could add a TweenTransform script, but since this is a Screen Image with a Screen Transform, we can also use the TweenScreenTransform script. Here are some example settings:</p><ul><li>Script Trigger: Tapped</li><li>Loop Type: Ping Pong Once</li><li>Type: Scale</li><li>End: (0.5, 0.5, 0.5)</li><li>Time: 0.25</li><li>Easing Function: Bounce</li></ul><p>Now whenever you tap on the button, it will scale down then back up as if it had actually been pushed down. Animated buttons are a small detail that can help add a lot of polish to your lenses.</p><figure><img alt="Animating a button being pressed" src="https://cdn-images-1.medium.com/max/340/0*RHcaGe_FbjXBpDfv.jpg" /><figcaption>Animating a button being pressed</figcaption></figure><h3>Example — TweenChain — motion sequence</h3><p>Individual tweens are great for simple motion, but they don’t work so great if you have a sequence you want to follow. I added a box to my scene and I want it to move right, down, left, then up — right back to the starting position. I could try setting up my four tweens with delays, but it is a lot easier to use the TweenChain script. But before I can do that, I need to setup my four individual movements.</p><p>I’ve placed my box at (-8, 8, -60) in my scene. Each motion is going to involve moving 16 units. I could calculate out each starting and ending position, or I could just specify the offset for each movement. Here is my example tween for the motion to the right:</p><ul><li>Tween Name: “right”</li><li>Play Automatically: Disabled</li><li>Movement Type: Offset</li><li>Offset: (16, 0, 0)</li><li>Additive: Disabled</li><li>Easing Function: Linear</li><li>Easing Type: In/Out</li></ul><p>Once I have that tween setup all I need to do is copy and paste it and I can setup my down, left, and up movements. Once I have those ready, then I can add my TweenChain script. All I’m going to do here is change the Loop Type to “Loop” and then click on the “+ Add Value” button four times in the Tween Names section. Then I’m going to add right, down, left, and up. Now my box will be continuously tracing a square on the screen!</p><figure><img alt="Setting up the tween chain" src="https://cdn-images-1.medium.com/max/333/0*mbxWiUH0H6ODiNuX.jpg" /><figcaption>Setting up the tween chain</figcaption></figure><p>You may notice a few new options on the TweenChain script. The “All At Once” option will run all the tweens at the same time rather than in order. In this example we didn’t want that, but if you have multiple tweens that need to happen at once then this comes in handy. The other new option is “Recursive” which means the TweenChain script will check the children of your object for the tween names to run. This is helpful if you have a hierarchy of objects.</p><blockquote><em>The TweenChain script can also be given a Tween Name. This means you can chain together multiple chains. Just keep in mind that having too many things going on at once can affect lens performance.</em></blockquote><h3>Example — TweenValue — material parameter</h3><p>We can also tween material parameters. I’ve added a Pixelization post effect to my lens, then on my camera I’ve added a TweenValue script. If I look at the Pixelization material, there is a Size parameter that can go from 0 to 720. I don’t want to transition across that entire range, so I’m going to pick something like 50–300 for the Start and End values on the tween script. I’m going to keep the Data Type as Int, but depending on your specific parameter feel free to change this. I’m also going to increase the Time to 5 seconds and set the Loop Type to Ping Pong.</p><p>So far nothing is happening to my pixelization effect. The TweenValue script is running, but we need to tell it what value to be changing. Change the On Update Callback setting to “Set Material Parameter.” You can leave the Mesh Visual field blank, but select the material for the Material setting. Now, what is that Property setting? If you select the Pixelization material and hover your mouse over the word “Size,” you’ll see a little tooltip box appear that says “Property: size.” That is what we want to put in the Property setting on the tween script.</p><figure><img alt="Finding material property names" src="https://cdn-images-1.medium.com/max/336/0*G84YdBGbOskp7H3T.jpg" /><figcaption>Finding material property names</figcaption></figure><p>Once you’ve done that you should see the pixelization effect transitioning between super pixelized to not as pixelized.</p><figure><img alt="Material parameter tween setup" src="https://cdn-images-1.medium.com/max/335/0*SQl1QUW0JEuXs4Fg.jpg" /><figcaption>Material parameter tween setup</figcaption></figure><h3>Example — Scripting — recieving tween value</h3><p>For more complex lenses, you may run into a situation where you need to monitor the current tween value or do something with it outside the realm of what the tween scripts can do. For this we can use the TweenValue script and specify a callback function to receive the current tween value.</p><p>The first thing I’m going to do is create a new script and add it to our scene. We’ll keep things pretty simple so we can focus on making sure the tween script can communicate with our script.</p><pre>function receiveTweenValue(tweenValue) { <br>    print(tweenValue); <br>}</pre><pre>script.api.receiveTweenValue = receiveTweenValue;</pre><p>All I have here is a function which receives one argument and prints it out to the logger. Then I am also exposing this function through script.api which makes this function available to other scripts.</p><p>Next I’ll add a TweenValue script. I’ll have it Ping Pong a value between 0.0 and 1.0 over 5 seconds. For the On Update Callback setting I’ll choose “Call API function” then find my script for the Func Target Script. In the Func Name I put receiveTweenValue which is the name of exposed function. Now in the logger I should be seeing values between 0.0 and 1.0 printed out.</p><h3>Example — Scripting — controlling tweens</h3><p>You may run into situations where you need to use the tween script but you don’t know what the starting and/or ending values should be. Not to worry, you can set those values dynamically via a script along with starting and stopping tweens.</p><blockquote><em>The current tween scripting API does not let you change the duration of the tween, only the starting and ending values.</em></blockquote><p>Once again I want to keep things simple so we can focus on the tween part of things and not so much our custom logic. I’ve created a short script and added it to my scene. Initially you’ll see an error in the logger, but once you choose an input for the script the error will go away. For this example the Movement Type on the tween needs to be “To.”</p><pre>// @input SceneObject box</pre><pre>var X_RANGE = 10;<br>var Y_RANGE = 20;<br>var Z = -40;</pre><pre>function generateRandom(range) {<br>    return range * 2 * Math.random() - range; <br>} </pre><pre>function moveBox() {<br>    var newEnding = new vec3(generateRandom(X_RANGE), generateRandom(Y_RANGE), Z);<br>    global.tweenManager.setEndValue(script.box, &quot;box_move&quot;, newEnding); <br>    global.tweenManager.startTween(script.box, &quot;box_move&quot;, moveBox); }</pre><pre>moveBox();</pre><p>What this script is doing is generating random positions, setting the end value of the tween, then running the tween. You may notice that on the line with startTween that the moveBox function is included as a function argument. This tells Lens Studio that once the tween is done running, to call that function. In this case it generates a continuous process of updating the endpoint, running the tween, etc.</p><h3>Further reading</h3><p><a href="https://lensstudio.snapchat.com/guides/scripting/helper-scripts/tween-manager/"><strong>Tween Manager</strong></a></p><p>For more lenses, checkout out my <a href="https://lensstudio.snapchat.com/creator/Jn6NTlPetl3Iqtkd8MTNXQ">Snapchat profile</a>! If you want to learn more about how to create lenses, <a href="https://arbootcamp.com/">AR Bootcamp</a> is the place to go. And if you have any recommendations or requests for a tutorial, let me know in the comments below! Thanks for reading!</p><p>Want more? Sign up for the newsletter for more tips, tricks, trends, and tutorials! (be sure to check your spam folder for the confirmation email)</p><p><a href="http://modelsbymike3d.eo.page/arbootcamp">AR Bootcamp Newsletter</a></p><p><em>Originally published at </em><a href="https://arbootcamp.com/snapchat-intermediate/tween-script-pro"><em>https://arbootcamp.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b98ba74dac6d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ar-bootcamp/master-the-tween-script-in-lens-studio-b98ba74dac6d">Master the Tween Script in Lens Studio</a> was originally published in <a href="https://medium.com/ar-bootcamp">AR Bootcamp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AR Bootcamp Newsletter #18]]></title>
            <link>https://medium.com/ar-bootcamp/ar-bootcamp-newsletter-18-d124501a039c?source=rss----6b299577f70d---4</link>
            <guid isPermaLink="false">https://medium.com/p/d124501a039c</guid>
            <category><![CDATA[snapchat-lenses]]></category>
            <category><![CDATA[lens-studio]]></category>
            <category><![CDATA[augmented-reality]]></category>
            <category><![CDATA[instagram-filter]]></category>
            <category><![CDATA[spark-ar]]></category>
            <dc:creator><![CDATA[Michael Porter]]></dc:creator>
            <pubDate>Tue, 21 Dec 2021 17:34:30 GMT</pubDate>
            <atom:updated>2021-12-21T17:34:19.809Z</atom:updated>
            <content:encoded><![CDATA[<h3>Call me a pseudofuturist</h3><p>Three out of my six <a href="https://arbootcamp.com/newsletter/2021/11/ar-bootcamp-16#my-snap-ar-predictions">predictions</a> came true for what we could expect next from Lens Studio. All six predictions coming true would have made me a futurist, so 50% makes me a pseudofuturist. Or are all futurists pseudofuturists?</p><h3>Best of Snap lenses</h3><p>If you haven’t already, be sure to check out the winners of the first ever <a href="https://newsroom.snap.com/lens-fest-awards-announcement">Lens Fest Awards!</a> Their press release doesn’t have any pictures, but you can watch a <a href="https://youtu.be/NjZdh-4cSuw?t=517">replay of the awards</a> on YouTube. Lot’s of great lenses to check out here.</p><p>Apart from the Lens Fest Awards, Snap also released a <a href="https://newsroom.snap.com/lens-on-the-year-2021">Lens on the Year</a> report. The full list of their lens picks is hidden in a PDF file, but your boy Mike has the link <a href="https://assets.ctfassets.net/o1znirz7lzo4/4aTWpE6d98N20GdyK1UPWy/2f10f40d7899bfd73994fd6eaecefb59/Snap-s_-Lens_on_the_Year-_2021.pdf">right here</a> for you. My “Dance Twin” lens was picked for their “Cutting Edge Tech” section, but if I’m being honest I don’t think that lens uses much cutting edge tech. I have plenty of other lenses I would have picked instead, but 🤷‍♂️</p><p>The “What’s Poppin’” section is basically the below meme.</p><figure><img alt="Meme of Obama giving himself a model and captioned with “Snap’s top lenses of the year” giving the award to “Snap’s lenses”" src="https://cdn-images-1.medium.com/max/809/0*_17wzLwGVGASlBjc.jpg" /><figcaption>Meme of Obama giving himself a model and captioned with “Snap’s top lenses of the year” giving the award to “Snap’s lenses”</figcaption></figure><h3>Best of Instagram filters</h3><p>Not to be outdone by Snap, Meta also released their <a href="https://sparkar.facebook.com/blog/top-spark-ar-effects-2021/">Top 10 Spark AR Effects of 2021</a>. They have some great choices, but I’m not as excited by this list as by the Lens Fest Awards. That last sentence sounds like I’m just hating on the Spark AR creators, but I think the reason I like the Lens Fest Awards better is because they had categories so you knew why the lenses were chosen. In comparison, Spark’s list feels rushed like they had to put something together because Snap did. I’d love to know why Meta picked what they did and what set those 10 filters apart.</p><h3><strong>Lens Call-To-Action button case study</strong></h3><p>Snap recently started letting verified creators add a call-to-action (CTA) button to their lenses that links to either an app or a website. The CTA button is a little button that shows up above the lens icon and says something like “More,” “Donate,” etc. I’ve added CTA links to a few of my lenses and here are the results:</p><ul><li><strong>More YouTube views.</strong> Some of my lenses are the results of tutorials that I’ve created so I link those back to the tutorial. I have noticed an increase in video views. I still can’t monetize my channel, but hopefully this will help with that and introduce more people to AR.</li><li><strong>Zero T-shirt sales.</strong> I created a twerking alien T-shirt to try to have some sort of merch available. The CTA links have driven about 6,000 views to the shirt and I’ve made 0 sales. People are still using the twerking alien lens, but the craze from a couple years ago is definitely gone. And maybe just no one likes the T-shirt I created.</li><li><strong>Zero donations.</strong> I also experimented with adding a link to my “Buy Me a Coffee” page. One million lens plays (people opening up the lens to use) split between two different lenses resulted in 8,000 page views and 0 donations (there is one previous donation from a few months ago to thank me for my tutorials).</li></ul><p>Overall the CTA feature is still exciting, but I am definitely not getting rich from it. I am working on something new, so if I crack the code I’ll share it with you all.</p><h3><strong>Spark AR Go</strong></h3><p>Meta also launched the <a href="https://go.facebookinc.com/SparkARGo-Signup.html">Spark AR Go Beta</a>. I started playing around with it a bit this week and I think it is a really good thing. It definitely makes it much easier for people to get started making their own AR filters.</p><h3>Want more?</h3><p>Subscribe to the newsletter to get awesome(?) articles like this in your inbox!</p><p><a href="https://modelsbymike3d.eo.page/arbootcamp">AR Bootcamp Newsletter</a></p><p>Do you want to learn how to make awesome AR filters? AR Bootcamp has you covered! Head on over to <a href="https://arbootcamp.com/tutorials">our tutorials</a> to get started today!</p><p><em>Originally published at </em><a href="https://arbootcamp.com/newsletter/2021/12/ar-bootcamp-18"><em>https://arbootcamp.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d124501a039c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ar-bootcamp/ar-bootcamp-newsletter-18-d124501a039c">AR Bootcamp Newsletter #18</a> was originally published in <a href="https://medium.com/ar-bootcamp">AR Bootcamp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AR Bootcamp Newsletter #17]]></title>
            <link>https://medium.com/ar-bootcamp/ar-bootcamp-newsletter-17-8216d2342fa6?source=rss----6b299577f70d---4</link>
            <guid isPermaLink="false">https://medium.com/p/8216d2342fa6</guid>
            <category><![CDATA[lens-studio]]></category>
            <category><![CDATA[augmented-reality]]></category>
            <category><![CDATA[snapchat-lenses]]></category>
            <category><![CDATA[spark-ar]]></category>
            <category><![CDATA[instagram-filter]]></category>
            <dc:creator><![CDATA[Michael Porter]]></dc:creator>
            <pubDate>Mon, 06 Dec 2021 20:57:42 GMT</pubDate>
            <atom:updated>2021-12-06T20:57:32.436Z</atom:updated>
            <content:encoded><![CDATA[<h3>Lens Fest</h3><p>Lens Fest is tomorrow, so if you are into Snapchat lenses make sure you are <a href="https://lensfest.live/">registered</a> (it’s free). If <a href="https://arbootcamp.com/newsletter/2021/11/ar-bootcamp-16#my-snap-ar-predictions">my predictions</a> come true I think I’ll have to call myself a futurist.</p><h3>SparkSL (kinda) demystified</h3><p>SparkSL is Spark AR’s version of GLSL for writing shaders. Half of you probably stopped reading after that last sentence. Long story short, it gives you a ton of control over how something can look. In true Spark AR fashion, their online documentation has about as much substance as season 2 of Tiger King. Fortunately a creator in the community, Adam Ferriss, has a ton of <a href="https://github.com/aferriss/sparksl-shader-examples">great examples</a> and I was able to figure out how to convert a shader from Shadertoy to SparkSL. I have a written version <a href="https://arbootcamp.com/instagram-advanced/shadertoy">here</a> (comparable to Tiger King season 2) and a video version <a href="https://www.youtube.com/watch?v=-uNhzkUSPH8">here</a> (comparable to Tiger King season 1).</p><figure><img alt="Meme about Adam Ferriss being a saint to aspring SparkSL developers." src="https://cdn-images-1.medium.com/max/666/0*Io-4DRcAT0iyyzXM.jpg" /><figcaption>Meme about Adam Ferriss being a saint to aspring SparkSL developers.</figcaption></figure><h3>Spark AR Quicktip</h3><p>While I was working on creating my SparkSL tutorial, the shader compilation step was basically immediate. Then I opened up OBS to record the video tutorial and things grinded to a halt and the shader code would take minutes to compile. Even restarting my computer did not solve this. Both OBS and Spark were using my laptop’s integrated GPU, so I tried switching Spark over to my discrete GPU and the compilation process went back to immediate. I don’t think many people are recording SparkSL tutorials, but if you run into this issue, you can try this solution (if you have a discrete GPU that is).</p><h3>Ultimate Guide to Snapchat</h3><p>If you are wanting to grow your Snapchat audience, my fellow creator Phil Walton wrote <a href="https://www.amazon.com/Ultimate-Guide-Snapchat-Phil-Walton/dp/1684428270/ref=tmm_pap_swatch_0">“The Ultimate Guide to Snapchat”</a> which goes over how Snapchat works and how to leverage all its different features. It is concise, to the point, and on my bookshelf.</p><h3>Hot take</h3><p>AR glasses are not going to replace smartphones. I can see them being an accessory like smartwatches currently are, but I don’t think they’ll be replacing phones.</p><h3>A Spark AR competition without the corporate selling out</h3><p>Spark AR and Cyberpunk 2077 hosted a filter competition a few months ago. I don’t know how many filters were submitted, but I’m guessing Cyberpunk 2077 got a whole lot of filters and promotion for pennies on the dollar (if that). Spark is back with <a href="https://sparkar.facebook.com/ar-studio/learn/spark-competitions/#holiday">another competition</a> for the holidays, but this time we aren’t all being enlisted to market someone’s video game, it is just a friendly competition.</p><h3>Want more?</h3><p>Subscribe to the newsletter to get awesome(?) articles like this in your inbox!</p><p><a href="https://modelsbymike3d.eo.page/arbootcamp">AR Bootcamp Newsletter</a></p><p>Do you want to learn how to make awesome AR filters? AR Bootcamp has you covered! Head on over to <a href="https://arbootcamp.com/tutorials">our tutorials</a> to get started today!</p><p><em>Originally published at </em><a href="https://arbootcamp.com/newsletter/2021/12/ar-bootcamp-17"><em>https://arbootcamp.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8216d2342fa6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ar-bootcamp/ar-bootcamp-newsletter-17-8216d2342fa6">AR Bootcamp Newsletter #17</a> was originally published in <a href="https://medium.com/ar-bootcamp">AR Bootcamp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Shadertoy to SparkSL Conversion for Spark]]></title>
            <link>https://medium.com/ar-bootcamp/shadertoy-to-sparksl-conversion-for-spark-567b8ff761d3?source=rss----6b299577f70d---4</link>
            <guid isPermaLink="false">https://medium.com/p/567b8ff761d3</guid>
            <category><![CDATA[spark-ar]]></category>
            <category><![CDATA[instagram-filter]]></category>
            <category><![CDATA[shadertoy]]></category>
            <category><![CDATA[augmented-reality]]></category>
            <category><![CDATA[shaders]]></category>
            <dc:creator><![CDATA[Michael Porter]]></dc:creator>
            <pubDate>Mon, 06 Dec 2021 16:52:45 GMT</pubDate>
            <atom:updated>2021-12-06T16:52:34.758Z</atom:updated>
            <content:encoded><![CDATA[<h3>Shadertoy to SparkSL Conversion for Spark AR</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F-uNhzkUSPH8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D-uNhzkUSPH8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F-uNhzkUSPH8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1a86283d08db61935dbb83204d611e8a/href">https://medium.com/media/1a86283d08db61935dbb83204d611e8a/href</a></iframe><p>SparkSL is a super powerful feature of Spark AR — with it you can create your own shaders with code. However, there are some key differences between SparkSL and GLSL which can make converting existing shaders tricky. This tutorial will go over the process of converting a shader from Shadertoy to Spark’s own SparkSL. You can view an example of this type of filter <a href="https://www.instagram.com/ar/873168960041924/">by clicking here</a> or by scanning the code below.</p><figure><img alt="QR code leading to a crosshatch effect built using SparkSL" src="https://cdn-images-1.medium.com/max/370/0*dKHMe65uZDFtpmHs.png" /><figcaption>QR code leading to a crosshatch effect built using SparkSL</figcaption></figure><h3>SparkSL</h3><p>What is SparkSL? <a href="https://sparkar.facebook.com/ar-studio/learn/sparksl/sparksl-overview">SparkSL</a> is a superset of GLSL 1.0 which is a shading language; it defines how light interacts with an object. Generally in Spark AR you would use image textures and material parameters to change how something looks. With SparkSL you get a lot more control, albeit with the added complexity of having to write it in what is basically C.</p><p>The great thing about being based on GLSL is that there are many shaders available on <a href="https://www.shadertoy.com/">Shadertoy</a>. However, there are some key differences which means that you cannot simply copy and paste code from Shadertoy. Spark’s official documentation isn’t exactly detailed, but there is a <a href="https://github.com/aferriss/sparksl-shader-examples">fantastic GitHub repo</a> with lots of helpful code examples. I am no GLSL expert, but that repo helped me convert a Shadertoy shader to SparkSL and I want to share what that process is like.</p><h3>The original shader</h3><p>I decided to go with a cool effect I didn’t think I could do through the patch editor, yet was simple enough for my first time trying SparkSL. I found an awesome <a href="https://www.shadertoy.com/view/MdX3Dr">crosshatch</a> shader that I successfully converted. Feel free to use this same shader to follow along.</p><h3>Getting the code into Spark AR</h3><p>Head over to Spark AR, save your project, add a shader code asset, and click the “Edit” button in the Inspector Panel. This will open the file in your computer’s default code editor. I am using VS Code and I’ve installed the <a href="https://sparkar.facebook.com/ar-studio/learn/scripting/vs-code-extension">Spark AR extension</a> which gives code highlighting and autocomplete suggestions for their shader code (.sca files). Make sure the Console is visible (via the View menu) and make a small change to the example code. You should see a message in the console about compilation finishing successfully. If you see the message, you are good to go! If you don’t see the message, you may have opened the shader code for editing before you saved your project. Your opened code is a temporary file so you’ll want to click the “Edit” button again to open the correct file.</p><p>Now copy the code from Shadertoy and replace the example code in your code editor. Spark will automatically monitor the file for changes and re-compile when changes are detected (e.g. when you save the file). You should now see an error in the console — that is expected at this point.</p><h3>Fixing the errors</h3><p>It is not glamorous, but really your best approach is to fix the errors one by one as you see them in the console. My first error happens at line 35 and has to do with the undeclared identifier ‘iResolution’. Shadertoy supplies a few different inputs to the shaders automatically, but no such thing happens with SparkSL. All I need to do for this particular error is make sure my image resolution is defined. Fortunately there is an example of this in the previously mentioned GitHub repo down at the very bottom of the Readme. To define my resolution, I am going to add vec2 iResolution = std::getRenderTargetSize(); to the lookup function. Now when I save my file I see a different error, so at least we&#39;ve resolved the resolution issue.</p><p>This next issue says that “texture” is undeclared. In GLSL, we access image info using the texture function, but SparkSL works fairly different in this respect. The first thing I am going to do is add the texture as another input to the function with std::Texture2d myTex. Next I am going to use myTex.sample(uv.xy) instead of the texture function. Once I save my file, the texture error should disappear. My lookup function now looks as follows:</p><pre>float lookup(std::Texture2d myTex, vec2 p, float dx, float dy)</pre><pre>{</pre><pre>    vec2 iResolution = std::getRenderTargetSize();</pre><pre>    vec2 uv = (p.xy + vec2(dx * d, dy * d)) / iResolution.xy;</pre><pre>    vec4 c = myTex.sample(uv.xy);</pre><pre>    // return as luma</pre><pre>    return 0.2126*c.r + 0.7152*c.g + 0.0722*c.b;</pre><pre>}</pre><h3>The main function</h3><p>Before we keep fixing errors, let’s take a quick look at the mainImage function. In GLSL, we define the out and in variables. In SparkSL, we just specify the arguments that the function is called with and return a value. In my experience I can use the out and in keywords and the shader patch shows the inputs and outputs, but when I try using it I get an error, so I just use function arguments for the inputs and provide a return value. In our case we are going to call this function with a texture argument, so replace the in portion with std::Texture2d myTex (omit the in). You should now see an undeclared identifier error for &#39;fragCoord&#39; that you can fix with the following code: vec2 fragCoord = fragment(floor(std::getRenderTargetSize() * std::getVertexTexCoord())); (from the GitHub repo examples).</p><p>Change the return type of the function from void to vec4 and then you&#39;ll also want to go to the very bottom of the mainImage function and make sure fragColor is defined as a vec4 and then return that value.</p><h3>Plug and chug</h3><p>At this point you’ll just be going through each error and fixing them one by one. Anything referring to “iChannel0” is going to be the input texture. Also, since we changed the arguments for the lookup function, you&#39;ll want to be sure to pass myTex as an argument when you call that function. Don&#39;t worry, the console will be there to tell you where the errors are. Once you get to the &quot;global variables mush be const-declared&quot; errors, just add const in front of any variable definitions that happen outside a function.</p><h3>Using the patch</h3><p>Once you get your code to compile successfully, create an asset patch and wire it up! I used the camera texture for my input and used the output to set the texture for a rectangle.</p><figure><img alt="Shadertoy to SparkSL conversion" src="https://cdn-images-1.medium.com/max/1024/1*bSvx-YQ-y8H4ELG-ENWDSg.jpeg" /><figcaption>Shadertoy to SparkSL conversion</figcaption></figure><p>For more lenses, checkout out my <a href="https://lensstudio.snapchat.com/creator/Jn6NTlPetl3Iqtkd8MTNXQ">Snapchat profile</a>! If you want to learn more about how to create lenses, <a href="https://arbootcamp.com/">AR Bootcamp</a> is the place to go. And if you have any recommendations or requests for a tutorial, let me know in the comments below! Thanks for reading!</p><p>Want more? Sign up for the newsletter for more tips, tricks, trends, and tutorials! (be sure to check your spam folder for the confirmation email)</p><p><a href="http://modelsbymike3d.eo.page/arbootcamp">AR Bootcamp Newsletter</a></p><p><em>Originally published at </em><a href="https://arbootcamp.com/instagram-advanced/shadertoy"><em>https://arbootcamp.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=567b8ff761d3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ar-bootcamp/shadertoy-to-sparksl-conversion-for-spark-567b8ff761d3">Shadertoy to SparkSL Conversion for Spark</a> was originally published in <a href="https://medium.com/ar-bootcamp">AR Bootcamp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Link an object’s rotation to a facial expression]]></title>
            <link>https://medium.com/ar-bootcamp/link-an-objects-rotation-to-a-facial-expression-1aa63469a429?source=rss----6b299577f70d---4</link>
            <guid isPermaLink="false">https://medium.com/p/1aa63469a429</guid>
            <category><![CDATA[snapchat-filters]]></category>
            <category><![CDATA[augmented-reality]]></category>
            <category><![CDATA[lens-studio]]></category>
            <category><![CDATA[snapchat-lenses]]></category>
            <dc:creator><![CDATA[Michael Porter]]></dc:creator>
            <pubDate>Mon, 29 Nov 2021 17:24:14 GMT</pubDate>
            <atom:updated>2021-11-29T17:24:01.781Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F2MV5IUsXOQY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D2MV5IUsXOQY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F2MV5IUsXOQY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f717460c455c30bf4d971cb177a1e803/href">https://medium.com/media/f717460c455c30bf4d971cb177a1e803/href</a></iframe><p>In this tutorial we’ll go over how to control an object’s rotation using facial expressions. We’ll use the face expressions API to get an expression weight (e.g. how open someone’s mouth is) and then drive the rotation of a separate object (e.g. the rotation of a jaw bone).</p><h3>Scene setup</h3><p>I am starting out with a rigged 3D skull that I imported, so make sure you have some sort of 3D object to work with. It has a single bone that controls the jaw rotation and that is what I want to control via the user’s face expressions.</p><p>In addition to your 3D object, you will also need to add a Face Mesh in the Objects Panel and also a Script in the Resources Panel. Once you’ve created your script go ahead and add it to your scene. The Face Mesh comes with a default material that you probably won’t want visible in your final lens; leave it for now, we’ll come back to it later.</p><figure><img alt="Setting up our scene in Lens Studio to control an object’s rotation via a face expression" src="https://cdn-images-1.medium.com/max/323/0*xS-hLLTxgEzgq2rv.jpg" /><figcaption>Setting up our scene in Lens Studio to control an object’s rotation via a face expression</figcaption></figure><h3>Getting the expression weight</h3><p>Open up your script for editing and let’s get started! This will be a pretty straightforward script. First we need to import the face mesh as a RenderMeshVisual and our target object that we want to rotate.</p><pre>// @input Component.RenderMeshVisual faceMesh<br>// @input SceneObject target</pre><p>To access the face expressions, we need to access mesh.control on the face mesh and then grab the weight of the expression we want. The weights range from 0-1 and a full list of the expressions Lens Studio supports can be <a href="https://lensstudio.snapchat.com/api/classes/Expressions/">found here</a>. In my case I want to access the JawOpen weight to control the jaw bone on my skull model. I&#39;m also going to print out the weight to check and make sure it is working. Once you add the following code and save the script, you might notice an error in the Logger. That is because we are missing the script inputs. Select the script in the Objects Panel and choose the face mesh and your target object for the input parameters. Also change &quot;On Awake&quot; to &quot;Frame Updated&quot; for when the script should run. You should now see some values being printed in the Logger Panel (make sure you also choose an &quot;open mouth&quot; preview video).</p><pre>// @input Component.RenderMeshVisual faceMesh<br>// @input SceneObject target</pre><pre><strong>var</strong> weight = script.faceMesh.mesh.control.getExpressionWeightByName(   Expressions.JawOpen );<br>print(weight);</pre><h3>Hiding the face mesh</h3><p>Now that we are getting the expression weights, let’s hide the face mesh so it is not visible. We can’t delete it because we are getting the expression weight from it, but we don’t want it visible in our effect. A great way to hide things from view is to put them on a layer that the camera is not rendering. However, if you put the face mesh on a new layer, the weight value in the logger will stop updating — it gets stuck on the last value. For whatever reason, we can only access the expression weights if the face mesh is actually rendered to the scene.</p><p>Just to avoid any potential issues down the road, I am going to leave the face mesh on its own layer. However, I am going to select the camera and add the face mesh layer to it. Next I am going to select the face mesh’s material and change the alpha channel on the base color to 0 to make it fully transparent. Now we are getting our expression weight again and the face mesh is hidden.</p><h3>Rotating our target object</h3><p>Let’s get our target object rotating. Our plan of action is to change the local rotation because the world rotation is being controlled by the head binding.</p><p>First up is to map the 0–1 weight value to the rotation range for our target object. If I select the jaw bone, it’s current x rotation is -138 degrees. If I rotate it so the mouth is open, it is about -115 degrees. I’ll take the difference of those two values, multiply them by the weight, and then add the minimum value to get the proper mapping. Next I need to map degrees to radians and I’ll also grab the original rotation values so that we maintain the existing y and z rotations. Then I’ll set the rotation of my target object. It might be a bit easier to follow looking at the below code.</p><pre>// @input Component.RenderMeshVisual faceMesh<br>// @input SceneObject target</pre><pre><strong>var</strong> rotMin = -138;<br><strong>var</strong> rotMax = -115;</pre><pre><strong>var</strong> weight = script.faceMesh.mesh.control.getExpressionWeightByName(Expressions.JawOpen);<br>print(weight);</pre><pre><strong>var</strong> rotationDegrees = (rotMax - rotMin) * weight + rotMin;<br><strong>var</strong> rotationRadians = (rotationDegrees * Math.PI) / 180;<br><strong>var</strong> originalRotation = script.target.getTransform().getLocalRotation().toEulerAngles();<br>script.target.getTransform().setLocalRotation(quat.fromEulerAngles(rotationRadians, originalRotation.y, originalRotation.z));</pre><h3>In closing</h3><p>Once you add the above code, your script is finished! Feel free to adjust the rotMin and rotMax values to match your own object and desired preferences. Getting the expression weight is probably the simplest part of the whole process; it&#39;s getting the weight mapped to your desired range that might take a little work.</p><p>You are also not limited to just rotating objects — you can control positions, scales, and material parameters just to name a few. Happy creating!</p><figure><img alt="Control objects using face expressions" src="https://cdn-images-1.medium.com/max/1024/1*IU0foYvjKcRiamma5rwTWQ.jpeg" /><figcaption>Control objects using face expressions</figcaption></figure><p>For more lenses, checkout out my <a href="https://lensstudio.snapchat.com/creator/Jn6NTlPetl3Iqtkd8MTNXQ">Snapchat profile</a>! If you want to learn more about how to create lenses, <a href="https://arbootcamp.com/">AR Bootcamp</a> is the place to go. And if you have any recommendations or requests for a tutorial, let me know in the comments below! Thanks for reading!</p><p>Want more? Sign up for the newsletter for more tips, tricks, trends, and tutorials! (be sure to check your spam folder for the confirmation email)</p><p><a href="http://modelsbymike3d.eo.page/arbootcamp">AR Bootcamp Newsletter</a></p><p><em>Originally published at </em><a href="https://arbootcamp.com/snapchat-intermediate/link-to-expressions"><em>https://arbootcamp.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1aa63469a429" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ar-bootcamp/link-an-objects-rotation-to-a-facial-expression-1aa63469a429">Link an object’s rotation to a facial expression</a> was originally published in <a href="https://medium.com/ar-bootcamp">AR Bootcamp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AR Bootcamp Newsletter #14]]></title>
            <link>https://medium.com/ar-bootcamp/ar-bootcamp-newsletter-14-ae97ec3d9d64?source=rss----6b299577f70d---4</link>
            <guid isPermaLink="false">https://medium.com/p/ae97ec3d9d64</guid>
            <category><![CDATA[instagram-filter]]></category>
            <category><![CDATA[spark-ar]]></category>
            <category><![CDATA[augmented-reality]]></category>
            <category><![CDATA[lens-studio]]></category>
            <category><![CDATA[snapchat-lenses]]></category>
            <dc:creator><![CDATA[Michael Porter]]></dc:creator>
            <pubDate>Tue, 07 Sep 2021 18:53:25 GMT</pubDate>
            <atom:updated>2021-09-07T18:53:13.406Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="AR Bootcamp Newsletter" src="https://cdn-images-1.medium.com/max/1024/0*VeqmRz6L4wzdiUyr.jpg" /><figcaption>AR Bootcamp</figcaption></figure><h3>Be cheap labor for Cyberpunk 2077</h3><p>Facebook ran a “Get Superpowered” competition a few months ago. It was pretty fun and I won a small prize from it. I was excited to see that they are running a new competition, but then I read the rules.</p><p>Facebook’s new “Cyberpunk” augmented reality filter competition is giving away $715,000 USD in prizes and appears to be open to most of the world. But the catch is that the competition is run in conjunction with Cyberpunk 2077 the game and you are REQUIRED to use an official Cyberpunk 2077 asset in your filter. The assets will all be provided, but the assets is where I take issue.</p><p>$715,000 is a lot of prize money, but it will be split up between the top 500 filters. Let’s say only 500 people enter and they each submit one filter. That comes out to $1,430 USD per filter. That’s already pretty cheap for a filter, but if everyone submits two filters, the cost per filter is now $715 USD and Cyberpunk 2077 now has 1,000 branded filters out in the wild. And don’t forget that everyone is going to be sharing and promoting their filters, so Cyberpunk gets all that marketing for free.</p><p>If you are one of the top winners, I’m sure the competition will be worth it, but for everyone else this competition is simply a means for Cyberpunk 2077 to get a ton of filters out there. The superpowered competition was fun because it was open to interpretation, but this competition is just tricking us into cheap labor. What Facebook should do is remove the requirement that each filter use at least one of Cyberpunk 2077’s assets and just have a cyberpunk themed contest.</p><p>Go make some noise and let <a href="https://fb.watch/7Tptd4gdty/">Spark AR Creators</a> know what you think. I get that it’s a competition and completely up to each creator if they want to enter, but I’d like to not see this become the norm.</p><h3>Watch out for digital fashion</h3><p>Digital fashion isn’t exactly new, but it is growing and is something you should be watching out for. Supposedly having an AR try-before-you-buy <a href="https://arinsider.co/2019/09/20/the-ar-show-xrs-killer-app-is-roi/">reduces your return rate</a>, but I don’t trust those numbers because they compare Macy’s return rate to the industry average. The correct comparison would have been Macy’s return rate with AR try-before-you-buy to Macy’s return rate without the AR (both over the same date range), but what do I know, I just have a master’s degree in biophysics and know a thing or two about running experiments. So until I see more convincing numbers I’m going to call try-before-you-buy boring and instead tell you to experiment with fashion that can’t exist in the real world. Trying on a pair of Nike sneakers through AR is cool for like two seconds, but what about a pair of sneakers that create shockwaves every time you take a step, or a pair of sneakers that shoot out fire the faster you walk/run? I am just some random guy on the internet, but if you ask me you should be using AR to think outside the box and create some cool experiences — don’t be boring.</p><h3>Want more?</h3><p>Subscribe to the newsletter to get awesome(?) articles like this in your inbox!</p><p><a href="https://modelsbymike3d.eo.page/arbootcamp">AR Bootcamp Newsletter</a></p><p>Do you want to learn how to make awesome AR filters? AR Bootcamp has you covered! Head on over to <a href="https://arbootcamp.com/tutorials">our tutorials</a> to get started today!</p><p><em>Originally published at </em><a href="https://arbootcamp.com/newsletter/2021/09/ar-bootcamp-14"><em>https://arbootcamp.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae97ec3d9d64" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ar-bootcamp/ar-bootcamp-newsletter-14-ae97ec3d9d64">AR Bootcamp Newsletter #14</a> was originally published in <a href="https://medium.com/ar-bootcamp">AR Bootcamp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AR Bootcamp Newsletter #13]]></title>
            <link>https://medium.com/ar-bootcamp/ar-bootcamp-newsletter-13-e3a5658bf5da?source=rss----6b299577f70d---4</link>
            <guid isPermaLink="false">https://medium.com/p/e3a5658bf5da</guid>
            <category><![CDATA[spark-ar]]></category>
            <category><![CDATA[augmented-reality]]></category>
            <category><![CDATA[snapchat-lenses]]></category>
            <category><![CDATA[instagram-filter]]></category>
            <category><![CDATA[lens-studio]]></category>
            <dc:creator><![CDATA[Michael Porter]]></dc:creator>
            <pubDate>Mon, 23 Aug 2021 17:19:08 GMT</pubDate>
            <atom:updated>2021-08-23T17:18:57.629Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cool person to follow</h3><p>If you aren’t familiar with <a href="https://lensstudio.snapchat.com/creator/lw_nb5NnMkXvTmgLkhHqnQ">Hart’s Snapchat lenses</a>, you should be. He doesn’t upload a ton of personal lenses, but what he does post is usually mindblowing. Go check out his work and give him a follow on <a href="https://twitter.com/2020cv_inc">Twitter</a>.</p><figure><img alt="Hart’s finger skateboard lens in action" src="https://cdn-images-1.medium.com/max/320/0*Y9yPzcBhCaKh6ECM.gif" /><figcaption>Hart’s finger skateboard lens in action</figcaption></figure><h3>Spark AR</h3><p>In the <a href="https://arbootcamp.com/newsletter/2021/07/ar-bootcamp-12#spark-ar">last newsletter</a> I called out Spark AR for appearing to be at end-of-life. While I wasn’t able to figure out why Spark AR development has been stagnant lately, I did reach out to a couple people on the Spark AR team and they responded! There are indeed some incoming new features for Spark AR and they have the next year’s worth of work planned out. Now who knows if their roadmap includes bringing Spark AR up to feature parity with Lens Studio (pretty please) or if they’ll only add incremental changes, but at least there is some sort of plan for it.</p><h3>Lens update woes</h3><p>I saw a <a href="https://support.lensstudio.snapchat.com/hc/en-us/community/posts/4405378313492-Lenses-Performing-Poorly-After-Update">forum post</a> asking why updating a Snapchat lens causes the views to drop. This sounded like nonsense to me, but I took a look at my own stats and there does seem to be a considerable drop in lens reach if you update your lens. If you have updated any of your Snapchat lenses recently, take a look at your stats and chime in on the post if you notice anything fishy.</p><h3>Cool IG filter</h3><p>I was sent a <a href="https://designtaxi.com/news/414126/Burger-King-Posters-Leave-Smoke-Trails-Guiding-You-To-Flame-Grilled-Burgers/">cool filter</a> that BBH London created for Burger King UK. The demo video shows that holding up your phone and scanning the billboard will cause a smoke trail to appear that leads you to your nearest Burger King. At first I assumed this was part of the Burger King app and that it used the user’s location to pick the nearest Burger King. But then someone pointed out that it was an Instagram filter which can’t access location data. So how did they do it? It turns out that the <a href="https://www.instagram.com/burgerkinguk/">Burger King UK IG account</a> has a view different versions of the filter tailored to different billboard/restaurant combos. Each filter has a preset path that was configured to lead from the sign to a specific restaurant. This is a super clever solution to not having access to a user’s location, but it also means you can’t roll this sort of effect out on a large scale. Still, consider me impressed.</p><h3>Want more?</h3><p>Subscribe to the newsletter to get awesome(?) articles like this in your inbox!</p><p><a href="https://modelsbymike3d.eo.page/arbootcamp">AR Bootcamp Newsletter</a></p><p>Do you want to learn how to make awesome AR filters? AR Bootcamp has you covered! Head on over to <a href="https://arbootcamp.com/tutorials">our tutorials</a> to get started today!</p><p><em>Originally published at </em><a href="https://arbootcamp.com/newsletter/2021/08/ar-bootcamp-13"><em>https://arbootcamp.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3a5658bf5da" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ar-bootcamp/ar-bootcamp-newsletter-13-e3a5658bf5da">AR Bootcamp Newsletter #13</a> was originally published in <a href="https://medium.com/ar-bootcamp">AR Bootcamp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AR Bootcamp Newsletter #12]]></title>
            <link>https://medium.com/ar-bootcamp/ar-bootcamp-newsletter-12-599f1b677d4b?source=rss----6b299577f70d---4</link>
            <guid isPermaLink="false">https://medium.com/p/599f1b677d4b</guid>
            <category><![CDATA[lens-studio]]></category>
            <category><![CDATA[snapchat-lenses]]></category>
            <category><![CDATA[augmented-reality]]></category>
            <category><![CDATA[spark-ar]]></category>
            <category><![CDATA[instagram-filter]]></category>
            <dc:creator><![CDATA[Michael Porter]]></dc:creator>
            <pubDate>Fri, 30 Jul 2021 19:36:54 GMT</pubDate>
            <atom:updated>2021-07-30T19:36:44.101Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="AR Bootcamp" src="https://cdn-images-1.medium.com/max/1024/0*eYPpJIo0FQAmEGCX.jpg" /><figcaption>AR Bootcamp</figcaption></figure><h3>Tutorial dump</h3><p>In the last issue I mentioned that I was working on a style transfer tutorial using SnapML, and I’m glad to say I finally got it made. I also made “Big Head” and inpainting tutorials for Lens Studio.</p><ul><li><a href="https://www.youtube.com/watch?v=S7T3dSk4LK8">SnapML Style Transfer</a></li><li><a href="https://www.youtube.com/watch?v=EoF2eQnYjT8">Big Head</a></li><li><a href="https://www.youtube.com/watch?v=Xq9CVKOOQLY">Inpainting</a></li></ul><h3>SplitCam and Snap Camera fun</h3><p>I was inspired by some stuff I saw on <a href="https://twitter.com/CitizenPlain/status/1417294943329132544">Twitter</a> to mess around with Snap Camera some more and I figured out how to use SplitCam to send any <a href="https://www.youtube.com/watch?v=0zoZ-Ap4FHc">arbitrary video into Snap Camera</a>. It’s pretty fun to add lenses to existing videos.</p><h3>Snap policy updates</h3><p>A ton of creators add messages like “subscribe to me for more filters” to their Snapchat lenses. There is nothing against that currently listed in the Lens Studio submission guidelines, but apparently they decided they don’t like that sort of thing anymore. I know a good number of creators were having fun updating their lenses to remove those sorts of messages. And about a week before all this went down I of course updated my tutorial on how to do it.</p><h3>Trending predictions</h3><p>Lens Studio 4.1 now includes an inpainting effect in the Asset Library. Believe it or not, there is no machine learning going on — it appears to entirely be done with copying and blurring what the camera sees. It isn’t perfect, but it does a good enough job that it is a blast to use. It’s main use case I think is to remove people from the scene when they are part of the background (like a 3D body tracking lens), but it’s also a ton of fun to use as the main feature. I think we are going to be seeing a lot of creative uses for inpainting.</p><h3>Spark AR?</h3><p>When I first created the AR Bootcamp website I was really wanting to devote more space to Spark AR, but I just have a hard time getting excited about it when I see all the new features in Lens Studio. The only brand new feature in v118 is antialiasing. Really? I don’t understand how they can have <a href="https://www.xrtoday.com/virtual-reality/xr-tech-now-accounts-for-almost-20-of-facebooks-workforce/">10,000 employees working on XR</a> and yet be falling behind so bad with Spark AR. I’m almost certain they have some really talented developers, so I’m going to posit a guess and say they are mismanaging their AR platform. Sharing effects between Facebook, Instagram, and Portal is also probably a big limiting factor if their camera code is developed separately for the various platforms (which I’m guessing it is).</p><p>Do any of you work for Facebook or know anyone who does? I’d love to know a little more about what’s going with Spark AR.</p><h3>Want more?</h3><p>Subscribe to the newsletter to get awesome(?) articles like this in your inbox!</p><p><a href="https://modelsbymike3d.eo.page/arbootcamp">AR Bootcamp Newsletter</a></p><p>Do you want to learn how to make awesome AR filters? AR Bootcamp has you covered! Head on over to <a href="https://arbootcamp.com/tutorials">our tutorials</a> to get started today!</p><p><em>Originally published at </em><a href="https://arbootcamp.com/newsletter/2021/07/ar-bootcamp-12"><em>https://arbootcamp.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=599f1b677d4b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ar-bootcamp/ar-bootcamp-newsletter-12-599f1b677d4b">AR Bootcamp Newsletter #12</a> was originally published in <a href="https://medium.com/ar-bootcamp">AR Bootcamp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Style Transfer with SnapML]]></title>
            <link>https://medium.com/ar-bootcamp/style-transfer-with-snapml-f1714d7b4450?source=rss----6b299577f70d---4</link>
            <guid isPermaLink="false">https://medium.com/p/f1714d7b4450</guid>
            <category><![CDATA[lens-studio]]></category>
            <category><![CDATA[neural-style-transfer]]></category>
            <category><![CDATA[snapchat-lenses]]></category>
            <category><![CDATA[augmented-reality]]></category>
            <category><![CDATA[style-transfer]]></category>
            <dc:creator><![CDATA[Michael Porter]]></dc:creator>
            <pubDate>Fri, 30 Jul 2021 18:50:37 GMT</pubDate>
            <atom:updated>2021-07-30T18:50:27.925Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FS7T3dSk4LK8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DS7T3dSk4LK8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FS7T3dSk4LK8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/62fd6a3fbe6b5567b0b8dd040de0a856/href">https://medium.com/media/62fd6a3fbe6b5567b0b8dd040de0a856/href</a></iframe><p>In this tutorial we’ll go over how to use SnapML to create a style transfer lens. You can see an example of this by <a href="https://www.snapchat.com/unlock/?type=SNAPCODE&amp;uuid=64f2815c77fa491dae11a916a6e6c7cb&amp;metadata=01">clicking here</a> or by scanning the snapcode below.</p><figure><img alt="Snapcode for lens created with SnapML style transfer" src="https://cdn-images-1.medium.com/max/320/0*M2ujbOckSlAqK6gb.png" /><figcaption>Snapcode for lens created with SnapML style transfer</figcaption></figure><h3>What is style transfer?</h3><p>Painters create art in their own particular style — Bob Ross is known for his peaceful landscapes, Picasso for Cubism, you get the idea. An artist’s style is made up of their brush strokes, color palette, shapes, patterns, and techniques they use to create their paintings. With style transfer, a neural network takes an image, “learns” the style, and then applies that style to a new image. Wonder what a cubist Bob Ross painting would look like? Just train the style transfer model on Picasso and then apply it to a Bob Ross painting. Style transfer can yield some pretty amazing results, and through the use of SnapML, we can create style transfer lenses in Snapchat.</p><h3>Gathering our images</h3><p>Before we can train our style transfer model, we need two images — a test image and a source image. The test image can be anything, but I like to <a href="https://unsplash.com/s/photos/person">use an image of a person</a>.</p><p>Our source image is going to be the image whose style we want to emulate. You can use famous paintings like van Gogh’s Starry Night or <a href="https://lens.snapchat.com/ce69bdd2713041779c7632fe363cc36a">something more ridiculous like an image of spaghetti</a>. For this tutorial I am going to use <a href="https://en.wikipedia.org/wiki/File:Diego_Rivera_-_Young_Man_with_a_Fountain_Pen_-_Google_Art_Project.jpg">“Young Man with a Fountain Pen”</a> by Diego Rivera. Make sure your style image has a distinct style that the neural network can learn — make sure there is something interesting about the color palette, patterns, shapes, etc. Once you have your style and test images, save them to your computer. I recommend keeping the names pretty simple like “person” or “style-image” and avoid using spaces in the filename.</p><h3>Training the model</h3><p>Now that we have our images, it is time to train the model. Don’t worry if you’ve never trained a neural network or even written a line of code before — the Lens Studio team has kindly provided all the code we need. Go to the <a href="https://lensstudio.snapchat.com/templates/ml/style-transfer/">Style Transfer</a> page on the Lens Studio website and find where it says “download our example notebook” to download the code and then go ahead and unzip it.</p><p>Training neural networks takes a fair bit of computing power and software setup, so we are going to train our model in the cloud with <a href="https://research.google.com/colaboratory/">Google Colaboratory</a> (or Colab for short). You will need to sign-in with a Google account to use Colab. Once you are signed in, there should be a window where you can create a new notebook. Up at the top right, select Upload and then find the style_transfer.ipynb file that we downloaded from the Lens Studio site.</p><p>This notebook that we uploaded contains all the instructions and code we need to train our style transfer model. But before we begin, we need to also upload our test and style images. Once you’ve uploaded your files, scroll down to the “Global variables for training” section and replace ‘test_image.png’ with your test image filename (make sure there are single quotes around it still) and do the same for ‘style_image.png’ with your style image.</p><figure><img alt="Specifying our test and style images" src="https://cdn-images-1.medium.com/max/1024/0*K8OAzCEGUo6DD-N5.jpg" /><figcaption>Specifying our test and style images</figcaption></figure><p>Now that we have our files named, we don’t need to touch any more code. Open up the “Runtime” menu and select “Run all” to start the training process. You can follow along as each block of code does its thing. Before the model can start training, the code will install a few libraries and download some additional data which will take some time. Once all the setup is complete, the training will begin and you’ll be able to follow along as the model learns the style. This process will take a few hours. Once the model finishes training, download the .onnx file (you might need to refresh the file browser to see it).</p><blockquote><em>Google Colab is free to use, and because of that it does come with some limitations. Even though your model is being trained in the cloud, you CANNOT close your browser tab. It must remain open or Google will terminate the process. You also can’t walk away and leave this to train overnight; Google expects to see the tab is active. You don’t need to sit and stare at it while it trains, but keep the tab open and occasionally scroll through it. If Google terminates the process, you will have to start all over again. Even if the model is finished training, a terminated process will delete the final model, so be sure you stick around and download the finished product.</em></blockquote><h3>Using the style transfer model</h3><p>Open up the “Style Transfer” template in Lens Studio. I recommend using the template vs doing it from scratch because the template includes a script that will adjust performance depending on the user’s device. Once you’ve opened up the template, import the onnx file you must downloaded. You don’t need to adjust any of the options in the window that appears, you can just click Import.</p><p>Select the ML Component in the Objects Panel and then in the Inspector Panel swap out the Model for the one you just imported. You should now see your style take effect!</p><figure><img alt="Style Transfer with SnapML" src="https://cdn-images-1.medium.com/max/1024/1*yCDP8feUg_e8CX1guBXQtQ.jpeg" /><figcaption>Style Transfer with SnapML</figcaption></figure><p>For more lenses, checkout out my <a href="https://lensstudio.snapchat.com/creator/Jn6NTlPetl3Iqtkd8MTNXQ">Snapchat profile</a>! If you want to learn more about how to create lenses, <a href="https://arbootcamp.com/">AR Bootcamp</a> is the place to go. And if you have any recommendations or requests for a tutorial, let me know in the comments below! Thanks for reading!</p><p>Want more? Sign up for the newsletter for more tips, tricks, trends, and tutorials! (be sure to check your spam folder for the confirmation email)</p><p><a href="http://modelsbymike3d.eo.page/arbootcamp">AR Bootcamp Newsletter</a></p><p><em>Originally published at </em><a href="https://arbootcamp.com/snapchat-intermediate/snapml-style-transfer"><em>https://arbootcamp.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1714d7b4450" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ar-bootcamp/style-transfer-with-snapml-f1714d7b4450">Style Transfer with SnapML</a> was originally published in <a href="https://medium.com/ar-bootcamp">AR Bootcamp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>