<?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[Stories by Luis Guajardo Díaz aka theguaz on Medium]]></title>
        <description><![CDATA[Stories by Luis Guajardo Díaz aka theguaz on Medium]]></description>
        <link>https://medium.com/@theguaz?source=rss-53f546adc495------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*RqjQhrjgz5J-PZXE.jpg</url>
            <title>Stories by Luis Guajardo Díaz aka theguaz on Medium</title>
            <link>https://medium.com/@theguaz?source=rss-53f546adc495------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 06:49:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@theguaz/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[El negocio perfecto en Chile: ponle “protein+”, rellénalo con gelatina, esquiva los octágonos con…]]></title>
            <link>https://medium.com/@theguaz/el-negocio-perfecto-en-chile-ponle-protein-rell%C3%A9nalo-con-gelatina-esquiva-los-oct%C3%A1gonos-con-467dc53ef6fb?source=rss-53f546adc495------2</link>
            <guid isPermaLink="false">https://medium.com/p/467dc53ef6fb</guid>
            <dc:creator><![CDATA[Luis Guajardo Díaz aka theguaz]]></dc:creator>
            <pubDate>Thu, 21 May 2026 20:08:04 GMT</pubDate>
            <atom:updated>2026-05-21T20:20:39.562Z</atom:updated>
            <content:encoded><![CDATA[<h3>El negocio perfecto en Chile: ponle “protein+”, rellénalo con gelatina, esquiva los octágonos con sucralosa, y deja que el silencio de los sellos venda solo.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KjtRVg5GqxxXi36g0nov0g.png" /></figure><p>Hoy mayo 21/2026, vi en redes sociales de Chile una noticia sobre un informe recién publicado de UNICEF. Lo leí. Me alegré — de esa alegría un poco extraña de cuando alguien finalmente pone en números algo que tú ya sentías pero no podías articular bien.</p><p>Y pensé en mi última visita a Chile.</p><p><em>Antes de seguir: esto no es pose de expat ni mirada de superioridad. Fui al súper con una restricción médica real, intenté comer como como en casa, y no pude — no porque fuera caro, sino porque el producto simplemente no existe en el mismo formato. Lo que se vende como equivalente tiene doce ingredientes donde debería haber dos. Eso no es un problema de actitud.</em></p><p><em>Es un problema de lo que el mercado chileno permite llamar yogurt, y si me molestó lo suficiente como para tener que escribir de eso.</em></p><p>Vivo en Hilversum, Países Bajos, desde 2019. Si me sigues ya lo sabes. <br>Mi señora, mi hija — que tenía casi 2 años cuando nos fuimos — y yo armamos nuestra vida acá. Los inviernos son helados. <br>La forma de hacer los trámites ahora ya es normal. <br>Los bancos no tienen cajas, el queso es rico, las stroopwafels son inexplicablemente adictivas frescas en la feria del dia miércoles o sábado.</p><p>Pero algo pasó sin que me diera cuenta: me recalibré. El estándar de cómo debería verse, saber y <em>costar</em> la comida cambió. El supermercado se normalizó. Las etiquetas se normalizaron. Que el yogurt tenga dos ingredientes se normalizó.</p><p>En abril de este año volvimos a Chile de visita, y una de mis metas era tratar de copiar mi dieta de NL en Chile x tres semanas.</p><h3>Abril 2026. El pasillo de lácteos.</h3><p>No fue un viaje de turismo. Fuimos con ganas de reconectar con amigos (logrado), ver familia(logrado), comer rico(logrado x 10). <br>Pero tenía una restricción nueva: un examen de sangre me había mostrado algo de estrés en el hígado, nada grave, pero suficiente para que el médico me dijera que cuidara la alimentación. Sin grandes cambios — básicamente tratar de seguir comiendo como como acá en Holanda.</p><p>Suena fácil. No lo fue.</p><p>La primera semana ya andaba leyendo etiquetas en el súper como lo hago en la casa. Y fue en el pasillo de lácteos donde la cosa se puso interesante.</p><p>Agarré un yogurt de proteína. Packaging negro, diseño de gimnasio, “protein+” en letras grandes al frente. Se veía sano. <em>Se sentía</em> sano. Justo lo que andaba buscando, yo trato a mis 47 de comer al menos cuarenta gramos de proteina solo al despertar en un esfuerzo de vencer a la edad y la pérdida de masa muscular que nos afecta a los mas viejos.</p><p>Le di la vuelta.</p><p><strong><em>“Ingredientes:</em></strong><em> Leche descremada, leche entera, concentrado de proteína de leche, </em><strong><em>gelatina</em></strong><em>, lactasa, cepas de Yogurt, sorbato de potasio, sucralosa, estevia, </em><strong><em>saborizante idéntico a natural</em></strong><em>, </em><strong><em>colorante rojo allura AC</em></strong><em>. Elaborado en líneas que también procesan nueces.”</em></p><p><strong>Doce ingredientes.</strong> Gelatina como relleno estructural. Dos edulcorantes artificiales. Un colorante sintético. Un conservante.</p><p>Me acordé del pote eterno de <strong>Campina</strong> en el refrigerador de nuestra casa en Hilversum — el que consumo a diario. Nunca había mirado sus ingredientes porque nunca se me había ocurrido que <em>necesitaba</em> hacerlo. Cuando lo revisé después de volver a la casa de mis suegros: <strong>leche pasteurizada, cultivos de yogurt. Eso. Dos ingredientes. Nutri-Score A.</strong></p><p>Mismo tipo de producto. Precio por kilo casi idéntico. Cosas completamente distintas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b4YfUNDWyA3yerDMPa9F_Q.png" /></figure><p>No pude encontrar en el súper un yogurt sin gelatina ni almidón o gelatina, solo quedaba resignarme. Y eso que yo <em>sabía lo que estaba buscando</em>. La mayoría de la gente no tiene ese filtro — ve el packaging negro con “protein+” y asume que está haciendo una buena elección.</p><h3>El informe que lo juntó todo</h3><p>La noticia de hoy mayo 21/2026 que vi apuntaba a <em>Unequal Chances</em>, el Informe Report Card 20 de UNICEF Innocenti, publicado en mayo de 2026. Es el estudio comparativo más completo sobre bienestar infantil en 44 países ricos de la OCDE, y lo que dice es no menor.</p><p>Lo leí y me alegré — y al mismo tiempo me volvieron de golpe todas las veces que estuve en el súper en abril pensando porque quien tenia la responsabilidad si el mercado o el gobierno o el propio consumidor.</p><p><strong>Países Bajos: #1</strong>. En las tres dimensiones medidas — bienestar mental, salud física, y habilidades académicas y sociales — los niños holandeses encabezan el ranking. No es nuevo: Holanda lleva varios Report Cards consecutivos en el top. Los niños holandeses son, por estándares internacionales medibles y rigurosos, los que mejor están en el mundo rico.</p><p>Chile: <strong>en el fondo</strong>. El “Onderkant” tres a cinco en todas las dimensiones. Bienestar mental: últimos. Salud física: últimos. Habilidades sociales y académicas: últimos. En confianza social específicamente, Chile registró el <strong>puntaje más bajo de los 37 países del dataset</strong> — solo el 63% de los niños chilenos reporta sentirse seguro socialmente, versus el 84% en los países del top.</p><p>Pero fue el dato de salud física el que me trajo de vuelta al pasillo del súper.</p><h3><strong>37 de 37. Quédate con ese número.</strong></h3><p>Chile ocupa el último lugar del ranking de bienestar infantil del Report Card 20 de UNICEF. Último de 37 países ricos con datos completos. No es “bajo el promedio” ni “tiene áreas por mejorar”. Es el último. Y si miras las dimensiones por separado: en habilidades académicas y sociales Chile queda último entre todos los países medidos — incluyendo los que no entran al ranking general. No hay ningún país rico en este estudio con peores resultados en esa dimensión.</p><p>Y no es un país pobre. Es el país más rico de América Latina por ingreso per cápita. Es miembro de la OCDE. Tiene clase media amplia, tiene infraestructura, tiene los octágonos negros más copiados del mundo.</p><p>El mismo informe explica el mecanismo: los niños en países más desiguales tienen <strong>1,7 veces más probabilidades de tener sobrepeso</strong> que los de países más igualitarios — porque sus familias no pueden costear opciones más saludables y dependen de alimentos altos en calorías. Un reporte separado de nutrición infantil de UNICEF (2025) pone cifras concretas a eso: más del 55% de los niños chilenos tiene sobrepeso u obesidad, y el 27% ya está en obesidad — no en el límite, adentro.</p><p>Países Bajos: puesto 1. Chile: puesto 37. El yogurt de dos ingredientes y el yogurt de doce no son una anécdota. Son el ranking hecho producto.</p><h3>El modelo de negocio es el problema</h3><p>Soprole — la marca del yogurt que vamos a ver hoy — es propiedad de <strong>Fonterra</strong>, el gigante neozelandés de los lácteos, una de las empresas de lácteos más grandes del mundo. No están operando fuera de la ley. No están haciendo nada técnicamente prohibido. De hecho, por los estándares regulatorios chilenos, ese producto pasa todos los filtros: tiene el etiquetado correcto, evita los umbrales de los octágonos de azúcar y grasa (en parte porque reemplazaron el azúcar con sucralosa y estevia), y el claim de proteína es técnicamente defendible porque sí agregaron concentrado de proteína de leche.</p><p>Lo que hicieron creo yo fue explotar la brecha entre lo que la regulación exige y lo que sería producción alimentaria honesta.</p><p><strong>La gelatina cuesta una fracción de la grasa láctea real</strong>. Simula textura. Los edulcorantes artificiales son más baratos que el azúcar y ayudan a esquivar el octágono de “alto en azúcares”. El rojo allura AC — el colorante sintético que hace que el sabor frutilla se vea convincente aunque no haya ninguna frutilla real — es un colorante azoico que en la Unión Europea exige una advertencia obligatoria: <em>“puede tener efectos negativos sobre la actividad y la atención en los niños.”</em> En Chile: sin ese requisito.</p><p>Cada sustitución mejora el margen. El precio de venta queda igual. El producto se ve premium. El consumidor siente que está tomando una buena decisión.</p><p>Esto no es conspiración. Es simplemente la respuesta racional de una empresa a un entorno donde los estándares de composición son débiles, la desigualdad mantiene a los consumidores sensibles al precio, y el foco regulatorio está en el etiquetado y no en los ingredientes. El sistema premia este comportamiento. Y Fonterra, Nestlé, Watts y Colún están todos jugando el mismo partido.</p><h3>Lo que la comparación realmente muestra</h3><p>El yogurt Campina en NL no necesita mucha campaña de marketing. “Leche y cultivos” no es un diferenciador que requiere packaging negro con atleta. El producto es lo que es, y la ley de composición hace que <em>tenga</em> que serlo: bajo regulación de la UE, la palabra “yogurt” está legalmente protegida. No puedes llamar yogurt a algo espesado con gelatina y coloreado con tinte sintético. Tendrías que llamarlo “producto lácteo tipo postre” — y con eso nadie vende.</p><p>En Chile, “yogurt” no está protegida composicionalmente de la misma forma. Entonces los fabricantes pueden ingeniar un producto alrededor de un precio objetivo, vestirlo con branding de bienestar, y legalmente llamarlo yogurt. El mercado los premia por eso. Los niños que lo comen pagan las consecuencias.</p><p>Mismo precio por kilo. Producto completamente distinto. Uno con Nutri-Score A. Otro con doce ingredientes y un colorante que la UE alerta específicamente para menores.</p><h3>El malestar no es por el yogurt</h3><p>Quiero ser preciso sobre lo que creo que está mal aquí, porque el análisis fácil — “empresa mala hace comida mala” — se queda corto.</p><p>Lo que está mal es un sistema en el que:</p><p><strong>La desigualdad genera demanda de productos inferiores.</strong> Cuando el ingreso está concentrado arriba y los ambientes alimentarios en sectores de menor ingreso tienen pocas alternativas, los productos diseñados para el precio llenan el vacío. Esto no es único de Chile — pero la desigualdad chilena está entre las más altas de la OCDE, lo que hace el efecto más pronunciado y más dañino.</p><p><strong>El éxito regulatorio se convierte en escudo para la inacción.</strong> Lo de los sellos en el mercado chileno fue genuinamente pionero. Los políticos lo celebraron. Los organismos internacionales lo aplaudieron. Y eso le dio a la industria y al gobierno una historia creíble mientras los estándares de composición y la desigualdad económica que produce los malos ambientes alimentarios quedaron intactos. La reforma de etiquetado puede haber <em>reducido</em> inadvertidamente la presión para los cambios estructurales más difíciles.</p><p><strong>Los niños pagan con el cuerpo y con el futuro</strong>. <br>Los datos de UNICEF no son abstractos. Hay un niño en algún colegio de Santiago ahora mismo comiendo un yogurt de proteína con colorante sintético de frutilla y dos edulcorantes artificiales para el recreo, y sus papás creen — correctamente, con la información que tienen disponible — que están haciendo una buena elección.</p><p><strong>Y hay una abuela en Chile </strong>que también lo cree, que lleva años comprando o encargando el mismo yogurt “light” o “protein” convencida de que está cuidando su salud, que se lo recomendó el médico, que dice “sin azúcar” en la tapa, que tiene el envase verde con una manzana. Doce ingredientes. Gelatina. Sucralosa. Sorbato de potasio. La empresa que hizo ese yogurt va a reportar buenos márgenes este trimestre. El informe que mide si ese niño va a crecer sano, seguro de sí mismo y con habilidades para la vida pone a Chile cerca del fondo del mundo rico. Y la abuela, que hizo todo bien según las reglas que le dieron, no aparece en ningún informe.</p><h3>Qué ayudaría de verdad</h3><p>La respuesta no es prohibir a Soprole. No es esperar que los consumidores naveguen un ambiente alimentario deliberadamente complejo con literacia nutricional perfecta. El informe UNICEF es claro sobre lo que funciona: los países con <strong>menor desigualdad de ingresos y pisos sociales más fuertes</strong> producen mejores resultados para los niños en todas las dimensiones. Eso significa salarios mínimos que saquen a las familias de la pobreza alimentaria, inversión en barrios vulnerables, y — críticamente — <strong>estándares de composición alimentaria</strong>, no solo etiquetado.</p><p>El etiquetado te dice qué tiene de malo lo que estás a punto de comerte. Los estándares de composición determinan qué se puede llamar alimento en primer lugar. La UE eligió el segundo camino. Chile eligió el primero. El 55% de sobrepeso infantil te dice cuál apuesta resultó.</p><p>El yogurt del supermercado no es la causa de la crisis de salud infantil en Chile. Pero es una ilustración perfecta, que cabe en la mano y pesa 155 gramos, de lo que esa crisis es.</p><p>Y en eso pienso cada vez que voy al súper acá, miro los ingredientes de algo sin pensarlo dos veces. Porque Chile tiene los recursos. Tiene la industria láctea. Tiene las vacas, el campo, “la magia del sur” que Colún lleva décadas vendiéndote en comerciales. Pero resulta que la magia es el comercial, no el producto. Y mientras la publicidad construye una imagen de campo limpio y leche honesta, el ingrediente real que están poniendo en el tarro es gelatina/almidon.</p><p>No necesitas “llenar” los productos cuando tienes los recursos para hacer comida de verdad. Esa es la elección que se está tomando. Y mientras esa elección no cambie — mientras sea más rentable rellenar con espesantes y vestirlo con marketing que producir bien — el informe de UNICEF va a seguir poniendo a Chile donde lo pone.</p><p><em>Datos: UNICEF Innocenti Report Card 20 (mayo 2026); UNICEF Child Nutrition Report (2025); PubMed / Revista Panamericana de Salud Pública sobre regulaciones alimentarias en Chile (2024).</em></p><p><strong>🇳🇱 Campina High Protein Yoghurt Greek Style 1,5% — Albert Heijn</strong> <a href="https://www.ah.nl/producten/product/wi605269/campina-high-protein-yoghurt-greek-style-1-5">https://www.ah.nl/producten/product/wi605269/campina-high-protein-yoghurt-greek-style-1-5</a></p><p><strong>🇨🇱 Soprole Yoghurt Protein Sabor Frutilla Pote, 155 g — Lider.cl</strong> <a href="https://www.lider.cl/supermercado/product/sku/916654/soprole-yoghurt-protein-frutilla-155-g">https://www.lider.cl/supermercado/product/sku/916654/soprole-yoghurt-protein-frutilla-155-g</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=467dc53ef6fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Chile, la Noruega que no fue]]></title>
            <link>https://medium.com/@theguaz/chile-la-noruega-que-no-fue-3abb019cbd60?source=rss-53f546adc495------2</link>
            <guid isPermaLink="false">https://medium.com/p/3abb019cbd60</guid>
            <dc:creator><![CDATA[Luis Guajardo Díaz aka theguaz]]></dc:creator>
            <pubDate>Tue, 18 Nov 2025 22:34:31 GMT</pubDate>
            <atom:updated>2025-11-19T09:54:32.050Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0C5SfAuou8PCoLuczALOww.png" /></figure><h3>Una reflexión desde un padre chileno que vive en los Países Bajos</h3><blockquote><em>“¿Cuándo tendré que explicarle a mi hija lo que fue una dictadura en Chile?”</em></blockquote><p>Mi hija tiene ocho años.<br> Vive en los Países Bajos.<br> Llegamos hace seis años, una familia pequeña de chilenos entre gigantes en un país donde todo funciona con una calma casi milagrosa.</p><p>Su mundo aquí está hecho de certezas: trenes que llegan a la hora, escuelas seguras, hospitales que no mandan cuentas, ciclovías para todos, un ingreso mínimo justo, y un Estado que trabaja sin gritar.</p><p>Pero un día me preguntará por su otro país.<br> Por qué nuestras historias familiares están llenas de silencios, de exilios, de desaparecidos y de una palabra que a veces cuesta pronunciar: <strong>Pinochet</strong>.</p><p>Y tendré que decirle que Chile <strong>pudo ser distinto</strong>.<br> Que <strong>pudo ser nuestra Noruega</strong>, si no hubiera sido por la violencia y por cómo decidimos — o nos hicieron decidir — qué hacer con nuestra riqueza.</p><h3>La democracia interrumpida</h3><p>En 1970, Salvador Allende fue elegido presidente: el primer marxista del mundo en llegar al poder por elecciones libres.<br> Su idea era sencilla y enorme a la vez: que la economía sirviera a las personas.<br> Nacionalizó el cobre — el <em>oro rojo</em> — para financiar educación, salud y dignidad.</p><p>Pero la Guerra Fría y las élites locales se cruzaron en su camino.<br> Estados Unidos temió perder influencia y eligió intervenir.<br> El 11 de septiembre de 1973, los militares bombardearon La Moneda.<br> Allende murió ese día, y con él <strong>la posibilidad de un pacto social duradero</strong>.</p><p>Décadas después, el investigador <strong>Peter Kornbluh</strong> diría que Chile había intentado una “democracia de bienestar al estilo escandinavo”, al leer esa frase, <strong>siento que mi razonamiento coincide completamente con la suya</strong>.</p><h3>El costo humano</h3><p>Para mi familia, la dictadura no es historia: es biografía.<br> Algunos familiares huyeron al exilio, otros desaparecieron.<br> Quienes se quedaron aprendieron que el silencio era una forma de sobrevivir.</p><p>Mi esposa y yo crecimos en barrios donde el miedo era parte del paisaje.<br> Nuestra infancia está marcada por la pobreza y por una dictadura que se respiraba sin nombrarla.</p><h3>Dos países, un mismo recurso</h3><p>En los años 70, <strong>Chile y Noruega</strong> tenían más en común de lo que parece:<br> ambos pequeños, con costas largas, economías abiertas y recursos naturales estratégicos: <strong>petróleo allá, cobre acá</strong>.</p><ul><li>Noruega decidió tratar su petróleo como <strong>bien común</strong>. Creó un fondo soberano para las futuras generaciones y un Estado de bienestar que combina eficiencia y justicia.<br> Los países con Estados activos y sociedades cooperativas alcanzan más equidad y estabilidad).</li><li>Chile, en cambio, después del golpe, siguió el manual de la <strong>Escuela de Chicago</strong>.<br> Se privatizó la previsión, la educación, la salud. Se abrió el mercado, pero se cerró la participación ciudadana.</li></ul><blockquote><em>Uno construyó instituciones de equidad.<br> El otro, instrumentos de miedo.</em></blockquote><h3>Cómo se fabricó la desigualdad</h3><p>El economista chileno <strong>Ricardo Ffrench-Davis</strong> escribió que “Chile eligió el camino corto”.<br> En lugar de convertir la renta del cobre en igualdad social, se usó para tapar déficits y sostener la represión.<br> Yo no he leído su libro, pero mi conclusión es casi la misma: <strong>sin instituciones, los recursos solo amplifican la desigualdad</strong>.</p><p>El economista de Cambridge <strong>Gabriel Palma</strong> demostró que Chile es uno de los países más desiguales de la OCDE, mientras Noruega está entre los más equitativos.</p><p><strong>Tomás Moulian</strong> lo dijo con una claridad brutal:</p><blockquote><em>“Mientras los países nórdicos institucionalizaron la seguridad, Chile privatizó el riesgo.”</em></blockquote><p>Esa frase resume mi generación: crecimos en un país donde la desigualdad no fue un accidente, sino un diseño.</p><h3>Vivir entre los neerlandeses</h3><p>Hoy vivo en los Países Bajos — otro país que también tuvo su “enfermedad holandesa” cuando descubrió gas natural.<br> Aquí el bienestar se siente compartido.<br> La gente espera que los impuestos se transformen en trenes, hospitales, escuelas.<br> Y casi siempre, así ocurre.</p><p>Eso se llama <strong>capital social</strong>, la confianza colectiva que sostiene a las democracias.<br> Chile perdió esa confianza cuando su democracia fue interrumpida y reemplazada por un mercado que recompensó la individualidad sobre el bien común.</p><h3>Lo que le diré a mi hija</h3><p>Algún día mi hija me preguntará:</p><blockquote><em>“Papá, ¿por qué Chile no es como Noruega?”</em></blockquote><p>Y yo le diré:<br> — Porque Chile tenía todo — cobre, mar, sol, gente valiente — pero le faltó tiempo y confianza.<br> — Porque la democracia fue cortada antes de madurar.<br> — Porque en vez de ahorrar, privatizamos.<br> — Porque el Estado dejó de ser guardián de lo común y se convirtió en un accionista silencioso.</p><p>En otro universo posible, Chile habría creado un <strong>Fondo del Cobre</strong> en 1971, habría pactado con trabajadores y empresarios, habría invertido en innovación y bienestar.<br>En ese Chile alternativo, mi hija no necesitaría hacer esa pregunta.</p><h3>Memoria y posibilidad</h3><p>La inteligencia artificial me ayuda a encontrar palabras, pero la memoria vive en mis recuerdos.<br>Vive entre lo que ocurrió y lo que pudo haber ocurrido.</p><p>Cuando veo a mi hija pedalear por calles seguras, pienso en Chile.<br> No solo como tragedia, sino como promesa.</p><blockquote><em>Chile </em><strong><em>pudo ser una Noruega en América Latina</em></strong><em>.<br> Aún puede serlo, si decide que su riqueza pertenece a todos.</em></blockquote><p>Porque los países, como las personas, no se definen por lo que perdieron,<br> sino por lo que recuerdan y por lo que están dispuestos a construir.</p><h3>Autores y ecos que descubrí al escribir este texto</h3><p>Spoiler: No soy académico.</p><p>Escribí este texto desde la memoria y la intuición hace meses pero no lo habia publicado, y después descubrí que muchas de mis ideas ya habían sido pensadas por otros.</p><p>Autores como Esping-Andersen, Garretón, Moulian o Ffrench-Davis analizaron cómo Chile tuvo los recursos para construir un país más justo, pero eligió otro camino.</p><p>Los leí después, cuando empecé a preguntarme por qué las cosas en Chile tienen que funcionar de esa forma.</p><p>Y al conocer su pensamiento, entendí que, sin saberlo, <strong>razoné en la misma dirección</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3abb019cbd60" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Digital Chaos to Calm: How I Used AI + Python to Reorganize My Mac Desktop]]></title>
            <link>https://python.plainenglish.io/the-clutter-free-desktop-how-i-tamed-my-digital-chaos-with-this-simple-python-script-fa2895d7e45f?source=rss-53f546adc495------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa2895d7e45f</guid>
            <category><![CDATA[digital-organization]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[tech-tools]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Luis Guajardo Díaz aka theguaz]]></dc:creator>
            <pubDate>Fri, 12 Sep 2025 12:26:19 GMT</pubDate>
            <atom:updated>2025-09-28T02:02:26.747Z</atom:updated>
            <content:encoded><![CDATA[<h4>A step-by-step guide to using AI + Python for digital decluttering and productivity.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*THZEDJvtJVFGVjeTQ8PudA.png" /><figcaption>How this feels like :)</figcaption></figure><h3>Before You Start: Get Your API Keys</h3><p>To unlock the AI-powered features in this project, you’ll need an API key. Don’t worry — it’s free to get started.</p><h3>Option A: Gemini (Recommended — Free Tier Available)</h3><p>Google’s <strong>Gemini API</strong> is a great entry point because it offers a generous free tier. Perfect for experimenting without pulling out a credit card.</p><ol><li>Go to Google AI Studio</li><li>Sign in with your Google account.</li><li>In the <strong>Get API Key</strong> section, click <strong>“Create API Key.”</strong></li><li>Copy it and store it safely — I recommend saving it in a .env file for security:</li></ol><pre>GEMINI_API_KEY=your_api_key_here</pre><h3>Option B: OpenAI (Optional — Extra Features)</h3><p>If you already use OpenAI (ChatGPT, GPT-4o, etc.), you can connect their API for folder renaming and other enhancements.</p><ol><li>Go to <a href="https://platform.openai.com/">platform.openai.com</a>.</li><li>Log in or create a free account.</li><li>From your profile menu → <strong>API Keys</strong> → <strong>Create new secret key</strong>.</li><li>Copy and paste it into your .env file:</li></ol><pre>OPENAI_API_KEY=your_api_key_here</pre><p>👉 You can use either API key — or both. The script works with Gemini out of the box, and upgrades smoothly with OpenAI for advanced features.</p><h3>Step 1: The Breaking Point</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*53On1tj2gkX0yGgisgI2FQ.png" /></figure><p>After months of never minimizing a window, I realized my Mac desktop had turned into a <strong>digital landfill</strong>.<br> Hundreds of files and folders scattered everywhere: untitled documents, image dumps from devices, abandoned prototypes.</p><p>It wasn’t just clutter. It was distracting, unproductive, and honestly embarrassing.</p><h3>Step 2: The Idea</h3><p>I thought: <em>What if I let AI + Python handle this?</em><br> Instead of dragging and dropping files manually, I wanted to <strong>automate organization</strong> — a system I could reuse every time things spiraled out of control.</p><h3>Step 3: Listing the Chaos</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G-20YNjk4MvrwDy-5laGbg.png" /></figure><p>The first step was simple: make sense of what I had.<br> I wrote a script to <strong>list everything up to three sublevels deep</strong> — files, folders, extensions. This gave me a map of the mess that I could feed into an AI model.</p><p>💻 <strong>Code snippet:</strong></p><pre># PSEUDO CODE — Desktop Chaos Analyzer<br><br>function list_desktop_chaos(max_depth=3):<br>    chaos_map = {total_items=0, size=0, exts={}, folders={}, score=0, [...]}<br><br>    function analyze_directory(path, depth):<br>        if depth &gt; max_depth: return<br>        for item in path:<br>            if hidden: continue<br>            if file: update counts, size, exts, largest_files [...]<br>            if folder: update folders, depth, recurse [...]<br><br>    analyze_directory(desktop, 0)<br>    chaos_map.score = compute_score(exts, folders, depth, total_items)<br>    return chaos_map<br><br>function generate_report(chaos_map):<br>    print &quot;=== CHAOS REPORT ===&quot;<br>    print total_items, total_size, chaos_score<br>    print top_extensions, largest_files, deepest_paths [...]<br><br>function ai_summary(chaos_map):<br>    return {overview: [...], recommendations: [...]}<br><br># Usage<br>chaos = list_desktop_chaos()<br>report = generate_report(chaos)<br>summary = ai_summary(chaos)<br>save(report, &quot;summary.txt&quot;), save(summary, &quot;summary.json&quot;)</pre><p>And I got something like this (but way bigger):</p><pre>{<br>  &quot;total_items&quot;: 428,<br>  &quot;total_size_mb&quot;: 5632.7,<br>  &quot;file_extensions&quot;: {<br>    &quot;.jpg&quot;: 132,<br>    &quot;.png&quot;: 78,<br>    &quot;.pdf&quot;: 64,<br>    &quot;.docx&quot;: 27,<br>    &quot;.pptx&quot;: 19,<br>    &quot;.zip&quot;: 23,<br>    &quot;.mp4&quot;: 15,<br>    &quot;.psd&quot;: 7,<br>    &quot;.fig&quot;: 3,<br>    &quot;no_extension&quot;: 60<br>  },<br>  &quot;folder_structure&quot;: {<br>    &quot;root&quot;: {<br>      &quot;path&quot;: &quot;/Users/luis/Desktop&quot;,<br>      &quot;items_count&quot;: 428,<br>      &quot;subdirs&quot;: [&quot;Screenshots&quot;, &quot;Downloads&quot;, &quot;Untitled_Folder_3&quot;, &quot;Final_Final_V2&quot;, &quot;New Folder 7&quot;],<br>      &quot;files&quot;: [&quot;budget_2021.xlsx&quot;, &quot;IMG_4432.JPG&quot;, &quot;MeetingNotes (1).docx&quot;, &quot;project_draft (final).pdf&quot;],<br>      &quot;depth&quot;: 0<br>    },<br>    &quot;root_Screenshots&quot;: {<br>      &quot;path&quot;: &quot;/Users/luis/Desktop/Screenshots&quot;,<br>      &quot;items_count&quot;: 87,<br>      &quot;subdirs&quot;: [],<br>      &quot;files&quot;: [&quot;Screenshot 2024-12-07 at 11.32.45.png&quot;, &quot;...&quot;, &quot;...&quot;],<br>      &quot;depth&quot;: 1<br>    },<br>    &quot;root_Untitled_Folder_3&quot;: {<br>      &quot;path&quot;: &quot;/Users/luis/Desktop/Untitled_Folder_3&quot;,<br>      &quot;items_count&quot;: 53,<br>      &quot;subdirs&quot;: [&quot;sub1&quot;, &quot;sub2&quot;, &quot;Archive&quot;],<br>      &quot;files&quot;: [&quot;notes.txt&quot;, &quot;draft.pdf&quot;, &quot;idea.sketch&quot;],<br>      &quot;depth&quot;: 1<br>    }<br>  },<br>  &quot;file_types_by_level&quot;: {<br>    &quot;level_0&quot;: {&quot;.jpg&quot;: 45, &quot;.pdf&quot;: 21, &quot;.docx&quot;: 10, &quot;no_extension&quot;: 12},<br>    &quot;level_1&quot;: {&quot;.jpg&quot;: 87, &quot;.png&quot;: 56, &quot;.zip&quot;: 15, &quot;.pptx&quot;: 10},<br>    &quot;level_2&quot;: {&quot;.psd&quot;: 7, &quot;.fig&quot;: 3, &quot;.mp4&quot;: 15}<br>  },<br>  &quot;largest_files&quot;: [<br>    {&quot;name&quot;: &quot;client_video_promo.mp4&quot;, &quot;path&quot;: &quot;...&quot;, &quot;size_mb&quot;: 742.5, &quot;depth&quot;: 1},<br>    {&quot;name&quot;: &quot;3D_render_final.psd&quot;, &quot;path&quot;: &quot;...&quot;, &quot;size_mb&quot;: 612.8, &quot;depth&quot;: 2},<br>    {&quot;name&quot;: &quot;dataset_backup.zip&quot;, &quot;path&quot;: &quot;...&quot;, &quot;size_mb&quot;: 488.4, &quot;depth&quot;: 1},<br>    {&quot;name&quot;: &quot;Untitled-2.fig&quot;, &quot;path&quot;: &quot;...&quot;, &quot;size_mb&quot;: 225.9, &quot;depth&quot;: 2}<br>  ],<br>  &quot;deepest_paths&quot;: [<br>    {&quot;path&quot;: &quot;.../Desktop/Untitled_Folder_3/sub2/temp/stuff/more_stuff&quot;, &quot;depth&quot;: 5, &quot;name&quot;: &quot;more_stuff&quot;},<br>    {&quot;path&quot;: &quot;.../Desktop/Downloads/Old/Backup/2018&quot;, &quot;depth&quot;: 4, &quot;name&quot;: &quot;2018&quot;}<br>  ],<br>  <br><br>////////etc, etc, etc...////////<br><br>}</pre><p>This way, the AI could say: <em>“Okay, I see everything. Let’s organize this logically.”</em></p><p>👉 (I used <strong>Windsurf</strong>, my IDE of choice, for all of this.)</p><h3>Step 4: Letting AI Design the Structure</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bbage5Gx5zC3Riy70BwTcg.png" /></figure><p>Next, I asked the help of <strong>Claude inside Windsurf for prompt “engineering”</strong>. We simply use what we analyzed before and pass it to the LLM in another function</p><p>We crafted a simple prompt:</p><p>📝 <strong>It was something like this:</strong></p><pre>Act as an intelligent file system. <br>Your mission is to rename folders so they are more useful and self-explanatory.  <br><br>Folder Snapshot:<br>- Name: {folder_analysis[&#39;name&#39;]}<br>- Items: {folder_analysis[&#39;total_items&#39;]}<br>- File types: {folder_analysis[&#39;file_types&#39;]}<br>- Subdirectories: {[d[&#39;name&#39;] for d in folder_analysis[&#39;subdirectories&#39;]]}<br><br>Naming Rules:<br>1. Must be machine-friendly (snake_case)<br>2. Describe purpose or domain, not random words<br>3. Limit length: ≤ 3 words<br>4. Avoid redundancy like &#39;folder&#39;, &#39;files&#39;<br>5. Assign a category: [&quot;work&quot;, &quot;personal&quot;, &quot;media&quot;, &quot;archive&quot;]<br><br>Expected output (JSON only):<br>{<br>  &quot;new_name&quot;: &quot;better_name_here&quot;,<br>  &quot;category&quot;: &quot;media&quot;,<br>  &quot;rationale&quot;: &quot;why this new name works&quot;,<br>  &quot;confidence&quot;: 0.78<br>}</pre><p>Claude responded with a <strong>clean, logical folder structure</strong> — a tech-friendly way of seeing my files grouped by purpose, type, and relevance.</p><p>📂 <strong>Result looked like this:</strong></p><pre><br>[1/7] Analyzing: Screenshots<br>  🟡 Suggested: screenshots_2024_q4_q1_2025<br>  💭 Reasoning: Predominantly timestamped PNGs from late 2024–early 2025; grouping by quarter clarifies time-based reference.<br>  Category: archive<br>  Confidence: 0.62<br><br>[2/7] Analyzing: Untitled_Folder_3<br>  🟢 Suggested: clientx_invite_assets<br>  💭 Reasoning: Mix of PSD, PNG, and DOCX matching invite design artifacts; assets appear client-branded.<br>  Category: work<br>  Confidence: 0.84<br><br>[3/7] Analyzing: Final_Final_V2<br>  🟢 Suggested: pitch_deck_videocut_assets<br>  💭 Reasoning: MP4 proxies, PRPROJ refs, thumbnails; clearly a video cut assets bundle for a pitch deck.<br>  Category: creative<br>  Confidence: 0.78<br><br>[4/7] Analyzing: New Folder 7<br>  🟡 Suggested: tmp_downloads_review<br>  💭 Reasoning: Mixed PDFs/ZIPs; temporary review stash prior to filing.<br>  Category: utility<br>  Confidence: 0.58<br><br>[5/7] Analyzing: RAW_Dump<br>  🟢 Suggested: canon_raw_5d_markiv_2023<br>  💭 Reasoning: CR2/RAW with EXIF markers referencing 5D Mk IV; year artifacts indicate 2023 capture set.<br>  Category: creative<br>  Confidence: 0.81<br><br>[6/7] Analyzing: DEV<br>  🟢 Suggested: td_experiments_touchdesigner<br>  💭 Reasoning: .toe/.tox, Python utilities, readme notes referencing TouchDesigner ops; experimental sandbox.<br>  Category: work<br>  Confidence: 0.86<br><br>[7/7] Analyzing: Downloads<br>  🟡 Suggested: installers_and_packages<br>  💭 Reasoning: DMG/PKG/ZIP predominance; installer cache.<br>  Category: utility<br>  Confidence: 0.67<br><br>📋 AI RENAMING SUGGESTIONS SUMMARY<br>==================================================<br>🟢 High confidence (4):<br>  Untitled_Folder_3 → clientx_invite_assets<br>  Final_Final_V2 → pitch_deck_videocut_assets<br>  RAW_Dump → canon_raw_5d_markiv_2023<br>  DEV → td_experiments_touchdesigner<br><br>🟡 Medium confidence (3):<br>  Screenshots → screenshots_2024_q4_q1_2025<br>  New Folder 7 → tmp_downloads_review<br>  Downloads → installers_and_packages<br></pre><p>For the first time, I could see my chaos visualized as order.</p><h3>Step 5: Building the Organizer Script</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UCsIXiNnhVaHvOmePnZfgg.png" /></figure><p>With the AI-generated structure in hand, I assembled everything into a <strong>single Python file</strong>.<br> I added options so I could <strong>analyze first</strong> (without risk) and then decide whether to move files.</p><p>This wasn’t just a script — it was a personal <strong>desktop operating system.</strong></p><h3>Step 6: Playing It Safe</h3><p>Before letting the script loose, I cloned my entire desktop onto an external hard drive.<br>Better safe than sorry.<br>But deep down, I knew I wasn’t just building a fix for myself… I was creating a tool that others could use too.</p><h3>Step 7: The Big Test</h3><p>Finally, I executed it.</p><p>Here’s the <strong>menu in my terminal:</strong></p><pre>==============================<br>📋 MAIN MENU<br>==============================<br>1. Analyze Desktop content<br>2. Organize Desktop files<br>3. AI-powered folder renaming<br>4. View file categorization info<br>5. Exit<br><br>Select an option (1-5): </pre><p>I ran the <strong>analyze option</strong> first. The script showed me a hierarchy of suggested folder names, each tidy and intuitive.<br> Everything looked right.</p><p>So I went all in. I chose “organize”…</p><pre>📁 Starting Desktop Organization...<br>🔍 Analyzing Desktop: /Users/luis/Desktop<br>📋 Found 411 files to organize:<br>  📂 Images: 210 files<br>  📂 Documents: 86 files<br>  📂 Archives: 23 files<br>  📂 Videos: 15 files<br>  📂 Code: 22 files<br>  📂 Presentations: 11 files<br>  📂 Spreadsheets: 9 files<br>  📂 Other: 35 files<br><br>⚠️  This will move files into: /Users/luis/Desktop/Organized_Files<br>Continue? (y/N): y<br>  ✅ Moved: IMG_4432.JPG → Images/<br>  ✅ Moved: dataset_backup.zip → Archives/<br>  ✅ Moved: client_video_promo.mp4 → Videos/<br>  ✅ Moved: budget_2021.xlsx → Spreadsheets/<br>  ✅ Moved: project_draft (final).pdf → Documents/<br>  ✅ Moved: 3D_render_final.psd → Design/<br>  ✅ Moved: Untitled-2.fig → Design/<br>  [...] 400+ more lines<br><br>🎉 Organization completed!<br>📊 Moved 411 files into 9 categories<br>📄 Report saved to: /Users/luis/Desktop/organization_report_2025-09-25_16-25-02.txt<br><br>👋 Done. Enjoy your clean desktop!</pre><h3>The Moment of Truth</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*XrdCCYkeoOlR-qMsm9RZUQ.gif" /></figure><p>And then <strong>bam</strong> — the clutter dissolved.</p><p>Hundreds of scattered files disappeared into neatly labeled folders.<br> What was once a digital graveyard became a workspace I actually wanted to open.</p><p>It felt almost magical:</p><ul><li><strong>Focus returned.</strong> No more scanning a chaotic sea of icons.</li><li><strong>Speed improved.</strong> I could find anything instantly.</li><li><strong>Peace of mind.</strong> A messy screen no longer greeted me every morning.</li></ul><p>I’d gone from digital hoarder to <strong>organized pro</strong> in less than an hour — thanks to a simple mix of Python, AI, and a little imagination.</p><h3>The Takeaway</h3><p>I built this script because I was drowning in digital clutter.<br> I’m sharing it because I know I’m not the only one.</p><p>So here’s your choice:</p><ul><li>Spend a weekend writing your own organizer.</li><li>Or, for less that the price of a coffee, get mine and enjoy a clean desktop in 5 minutes.</li></ul><p>👉 <a href="#">Buy the ready-to-use script here</a>.<br> Your future self will thank you (probably twice).</p><iframe src="https://cdn.embedly.com/widgets/media.html?type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=twitter&amp;url=https%3A//x.com/theguaz/status/1971160648445984929&amp;image=" width="500" height="281" frameborder="0" scrolling="no"><a href="https://medium.com/media/5454026d93ac7bd5aac897aa1078dbc7/href">https://medium.com/media/5454026d93ac7bd5aac897aa1078dbc7/href</a></iframe><h3>A message from our Founder</h3><p><strong>Hey, </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>Sunil</strong></a><strong> here.</strong> I wanted to take a moment to thank you for reading until the end and for being a part of this community.</p><p>Did you know that our team run these publications as a volunteer effort to over 3.5m monthly readers? <strong>We don’t receive any funding, we do this to support the community. ❤️</strong></p><p>If you want to show some love, please take a moment to <strong>follow me on </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://tiktok.com/@messyfounder"><strong>TikTok</strong></a>, <a href="https://instagram.com/sunilsandhu"><strong>Instagram</strong></a>. You can also subscribe to our <a href="https://newsletter.plainenglish.io/"><strong>weekly newsletter</strong></a>.</p><p>And before you go, don’t forget to <strong>clap</strong> and <strong>follow</strong> the writer️!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa2895d7e45f" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/the-clutter-free-desktop-how-i-tamed-my-digital-chaos-with-this-simple-python-script-fa2895d7e45f">From Digital Chaos to Calm: How I Used AI + Python to Reorganize My Mac Desktop</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[from zero to snapchat lens in 2 weeks.]]></title>
            <link>https://medium.com/@theguaz/from-zero-to-snapchat-lens-in-2-weeks-162d2a26f83?source=rss-53f546adc495------2</link>
            <guid isPermaLink="false">https://medium.com/p/162d2a26f83</guid>
            <category><![CDATA[snapchat]]></category>
            <category><![CDATA[lens-studio]]></category>
            <category><![CDATA[augmented-reality]]></category>
            <category><![CDATA[3d]]></category>
            <category><![CDATA[lightwave3d]]></category>
            <dc:creator><![CDATA[Luis Guajardo Díaz aka theguaz]]></dc:creator>
            <pubDate>Sat, 23 Jun 2018 20:36:59 GMT</pubDate>
            <atom:updated>2018-06-23T20:36:59.360Z</atom:updated>
            <content:encoded><![CDATA[<h4>WHAT I’VE LEARNED FROM CONSTANTLY WONDERING ABOUT THINGS</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AIziidqDK-BozUZXW7aqoA.png" /><figcaption>last day Screen Capture</figcaption></figure><p>An student asked me once “how do you know all of these things you teach?”, my answer was that I really do not know how to do everything, but I really love to learn new stuff. And for me the best way to learn new stuff is to get my hand dirty and learn with a brief at hand.</p><p>Then I said:</p><blockquote>On almost every work situation I do not have the knowledge when clients come and ask me things, I usually prototype while learning and use that outcome to move forward. And it works.</blockquote><p>A few weeks ago I wrote an email to a client to say hello and catch up with possible freelance work, his answer made thinsg clear to me about future jobs:</p><blockquote>I can tell you that right now our immediate need is 3D asset creation for AR lenses as well as developers that can do Snap and Facebook lenses. These lens jobs come in quickly and are hard to predict. Have you worked in Snap lens studio or Facebook lens studio before?</blockquote><p>The answer surprise me, but at the time I knew that these lenses were a new trending technology and I needed to do something new so I said to myself whatdaheck let’s learn this and make some money in the progress. Let’s do this:</p><blockquote>Dear client.. <br>Snap &amp; Facebook lenses are a thing that draw my attention earlier this year, I installed the softwares and learned a bit. I can resume my training now based on your input and I will be ready to work on basic projects on a few weeks.</blockquote><p>I started with AR Studio, my attempts were fine, creppy and unsatisfactory for me nonetheless.</p><h3><strong>Meet pennyguaz…</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*55viG5krCV73O-DnEOCxkw.gif" /><figcaption>Creepy lens made in AR Studio</figcaption></figure><p>I choosed AR Studio first because I saw people using it and getting things done in a pretty great way with it, so I played with it for a few days, tried to code something cool. And all I did was a mask… an ugly one with a small mouth behavior attached to it. <br>A brief was needed on the learning process.</p><p>I contacted my client and asked for a brief, free of charge of course that could allow me to solve a need directly with a demo or prototype showing my new aquired skills, and if I was able to nail it right I could possibly get the job and start developing lenses for them.</p><p>Then I got my first Snapchat Lens brief:</p><p><em>“This is a SnapChat World Lens for a fictional shoe brand where users can place a pair of shoes, soccer ball, and soccer goal in their environment for an AR-style game</em>…”</p><p>uhm… but that is not an AR Studio lens, so I downloaded the software and started playing with it. I promised a prototype in 3 days and I’ve set my tasks accordingly:</p><ul><li>download and/or build simple 3D assets</li><li>set the basic functionality</li><li>animate the shoes if possible</li><li>get all this shit together and be prepared for a laugh.</li></ul><p><strong>3D assets</strong><br>For the first task I went simple and used a sphere and a model rigged and animated with motion capture by <a href="https://www.mixamo.com/">mixamo</a>.<br>Went for a quick search for soccer, then downloaded a penalty kick animation and got frustrated for a while while getting a workflow for this setup.<br>I finally downloaded a <strong>FBX for unity, with skin, uniform keyframe reduction, 30 FPS.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*oIlqwvmE3izhTFqaYd5KVw.gif" /><figcaption>First test in Lightwave 3D after removing all elements from mesh except shoes.</figcaption></figure><p><strong>Lens Studio first run</strong><br>For this I saw a few videos of <a href="https://lensstudio.snapchat.com/guides/">Lens Studio guides site</a>, and knew after that that my lens was “Interactive TAP world lens” type :)<br>After replacing the elephant on the example with my soccer player FBX + adding my soccer elements I had a simple, but kind of cool project getting into shape.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HfrNvPiBwFpgbm4VoKuN6g.gif" /><figcaption>Ok, looks fine to me.</figcaption></figure><p><strong>Character animations</strong><br>Coming from a Away3d, Flare, then Unity, WebGL, three.js world I knew that FBX animated with motion capture it was going to be my way to achieve the animation with a cool game-like feeling and not worrying too much for animating things myself.</p><p>My only worry was to replace the final assets of the shoes during the development and mapping the weight maps correctly at that stage.</p><p><strong>Get all the shit together <br></strong>After a few hours, and without modifying the template too much I had a prototype. So I sent the prototype, and waited:</p><p><em>“As promised I attached my prototype for the soccer world lens, to be my very first effect I’m pretty happy with the progress. I did some 3D assets on my side and just applied a </em><a href="https://www.instagram.com/p/Bjkli_fn4FF/?taken-by=theguaz"><em>motion capture for the shoes</em></a><em>.<br>I have to clean the code a bit and polish some stuff yet.”</em></p><p>And they came back:</p><p><em>“We took a look at your project and you have done a great job with your first lens. We feel comfortable with having you finish out the project if you are available”</em></p><h3>THE ACTUAL DEVELOPMENT</h3><p>With the OK of the client now I had tasks to be done in two weeks and needed to move fast with them:</p><ul><li>Particles, to get the aesthetic of the project correctly and make it look great.</li><li>Interactive 2D items, for shoes switch, show energy build up, brand logo, energy overlay, etc.</li><li>Mesh replacement on .fbx file</li></ul><p><strong>Learning the particle system module.</strong></p><p>The development begun by solving a question about particles, the client wanted to emulate an aesthetic provided by another agency with videos from a different campaign.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m4EW03w0pWEOYeFXxebZCA.gif" /><figcaption>Original concept from client.</figcaption></figure><p>Luckily for me LensStudio had recently updated with a new particle system module, and with that info I got my hands to the task, creating a cool looking particle emitter with the look of energy gathering around an object.<br>I used the same approach that I always use for particles, taking an example of smoke from theirs and playing around until something cool happens.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3QM7y7jCSIeOCZpyLgVkWg.gif" /><figcaption>Lose the motes.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NKj-bHbvyVleZZaWkUoyfg.gif" /><figcaption>Almost there.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1BR-Tu6b_5pigVCQIJvtvQ.gif" /><figcaption>Final particle.</figcaption></figure><p>Using particle systems in the past was helpful, the concepts can always be extrapolated and used again in another case.</p><p><strong>Learning 2D modules for UI.</strong></p><p>After getting the particle system on a simple scene setup I got the *.psd files for the actual UI of the lens.</p><p>Made them sprites was easy, and all attached to a billboard ortographic camera. Align them to screen, nice and simple.<br>Then I’ve found that I couldn’t easily scale a sprite for the powerbar item that reflected the amount of energy on the shoot, so instead, I managed to scale it by affecting the UV scale of the sprite texture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UEOUh5zO3LvLSceKRXUBBg.gif" /><figcaption>Powerbar final animation</figcaption></figure><p><strong>Replacing my shoes with client shoes.</strong></p><p>For this task I had to take my Lightwave3D knowledge back, first things first I’ve replaced the original .fbx with a new one, because the old had a long run before kicking the ball as in a real penalty shoot, and that did not looked cool in AR at least for me.<br>With the new file I did a first test replacing the Mixamo model that came in the fbx file with a pair of generic soccer shoes I bought in turbosquid. Updated the geometry, scaled the mesh… and nothing happened. <br>The bones did not affected the mesh, so I recalled that it has something to do with the weight maps, so I turned them on for the mixamo model and bam!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yEft5GdUkS93jFydkkZJ-g.png" /><figcaption>weightmaps found and applied correctly.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MSBJB3JsAg7wEV9PbioFnQ.gif" /><figcaption>Animation loaded (laces were not affected that time)</figcaption></figure><p><strong>Tweening</strong>.</p><p>Coming from as3 I always try to look for a tween library, <a href="https://lensstudio.snapchat.com/guides/scripting/tweening/">on lens studio you can use tween.js</a></p><p>The TweenManager way from the tutorial was great, and did the trick for me, but as the project moved forward I realized that proper coding of tweens would be necessary, first to move the ball in a curve using control points. A team mate did point me in the right direction with something like this:</p><pre>var tweenObj = {<br> x: currentPosition.x,<br> y: currentPosition.y,<br> z: currentPosition.z,<br> rotation: 0<br> };</pre><pre>// set desired values<br> var valuesObj = {<br> x: [shotMiddleOfCurve.x, shotFinish.x],<br> y: [ shotMiddleOfCurve.y, shotFinish.y],<br> z: [shotMiddleOfCurve.z, shotFinish.z],<br> rotation: [maxRotation * 0.5, maxRotation]<br> };</pre><pre>var tween = new TWEEN.Tween(tweenObj)<br> .easing(TWEEN.Easing.Linear.None)<br> .interpolation(TWEEN.Interpolation.Bezier)<br> .to(valuesObj, getrandomVal(35, 55) * 10)<br> .delay(.5*1000)<br> .onUpdate(function(object){<br> <br> // apply position transform<br> prjTweensOBJ.getTransform().setLocalPosition(new vec3(tweenObj.x, tweenObj.y, tweenObj.z));</pre><pre>// rotate ball around X axis<br> var newDestRotation = quat.angleAxis(tweenObj.rotation, right);</pre><pre>// apply rotation transform<br> prjTweensOBJ.getTransform().setLocalRotation(newDestRotation);<br> })<br> .onComplete(function(object) {<br> // play a sound or do some other action<br> onCompleteFunction();<br> });<br> tween.start();</pre><p>Now I had the power of moving stuff around without worrying about the TweenManager anymore 💪. (I still left my original tweens untouched, did not want to break working stuff, remember tight deadline…)</p><p><strong>Switching meshes/model shoes on the lense.</strong></p><p>The brief said that needed to let users to choose which shoe model to use when shooting by tapping on buttons of the UI, forthis one I took a simple approach, I left both meshes present on the same object of the .fbx and simply turn them on/off as this by code:</p><pre>script.SHOE_OBJECT.getComponentByIndex(“Component.MeshVisual”, 0).enabled = false; // or true.</pre><p><strong>Adding details:</strong><br>One of the tasks was about doing a effect like energy also on the border of the screen, similar to the shoes energy field, and… make it animated.<br>I initially thought on reuse particles, but I did not have any custom mesh to emit, so I left that for later. One night during development I was like “Ok, so let’s do a cool looking energy field animation sequence and test it, how hard it can be?”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UTPRlDLpCAojq0JAeXt4vw.png" /><figcaption>let’s google “electro particle after effects” (I use Flux on my mac)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZVUir3LMlb0Y7Hl8AFVEwg.png" /><figcaption>Dragonball effect, this one looks OK to me.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*Jc-bj2FiB8XowX6-0FZMDA.gif" /><figcaption>lets make some noise.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*11-S7VJsQQ4EHR4lCOHrzA.gif" /><figcaption>Whoa, that was kind of fun and easy to do.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*cBUvF14Hf1vYuqQda4HR7w.gif" /><figcaption>I won.</figcaption></figure><p>I sent my test to the team, and got approved, my jpg sequence made it into the project.</p><p><strong>More details…</strong></p><ul><li>Adding an aim UI element that and allow users to rotate the player &amp; ball with X position of the touch, but letting all users to make a goal.</li><li>Adding a “shoot type” text based on the Y position of the touch, and varying the curve and speed accordingly ().</li></ul><p><strong>And the final result:</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F276561460%3Fapp_id%3D122963&amp;dntp=1&amp;url=https%3A%2F%2Fvimeo.com%2F276561460&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F709120866_1280.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="1280" height="720" frameborder="0" scrolling="no"><a href="https://medium.com/media/aae21f056d86774411cc7fa18382c983/href">https://medium.com/media/aae21f056d86774411cc7fa18382c983/href</a></iframe><p><strong>Conclusion</strong></p><p>I can say that lens studio despite of being a really new IDE is very mature and easy to use. Knowledge of 3D and previous experience with AR in unity allowed me to basically do mot of the work by myself, and I’m hoping to grasp AR Studio sometime in the future and do a lens there too, and I’m curious about using facial gestures to drive interactions as well.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=162d2a26f83" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>