<?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 Fidel Hau (Senior Tech Artist) on Medium]]></title>
        <description><![CDATA[Stories by Fidel Hau (Senior Tech Artist) on Medium]]></description>
        <link>https://medium.com/@fidelhau?source=rss-d4c452f933d0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RYdlzRS3tABVtjAOP07Gkg.jpeg</url>
            <title>Stories by Fidel Hau (Senior Tech Artist) on Medium</title>
            <link>https://medium.com/@fidelhau?source=rss-d4c452f933d0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 22:41:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@fidelhau/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[AI Image Generation with Unreal’s MetaHuman and FLUX.1: My Workflow and Results]]></title>
            <link>https://medium.com/@fidelhau/ai-image-generation-with-unreals-metahuman-and-flux-1-my-workflow-and-results-d8c855f32e7e?source=rss-d4c452f933d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8c855f32e7e</guid>
            <category><![CDATA[stable-diffusion]]></category>
            <category><![CDATA[technical-art]]></category>
            <category><![CDATA[flux]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[unreal-engine]]></category>
            <dc:creator><![CDATA[Fidel Hau (Senior Tech Artist)]]></dc:creator>
            <pubDate>Fri, 22 Nov 2024 06:12:01 GMT</pubDate>
            <atom:updated>2024-11-22T06:12:01.024Z</atom:updated>
            <content:encoded><![CDATA[<p>In my previous article, I shared my journey of creating a <strong>LoRA</strong> model using Unreal Engine’s MetaHumans. I explained important terms regarding image generation and the challenges I faced creating datasets. In this second part, I’ll dive into the results of using my custom tool to capture samples from different perspectives and poses of my character and testing them using <strong>FLUX.1</strong> and Video generation tools.</p><ul><li><a href="https://medium.com/@fidelhau/generative-ai-model-training-personal-walkthrough-part1-57cbb6fedb7c">Using Unreal’s MetaHuman for Image Generation: A Personal Walkthrough of LoRA Model Training</a></li><li><a href="https://medium.com/@fidelhau/screenshot-studio-v1-0-automating-screenshot-collection-for-ai-model-training-in-unreal-engine-a1286908a7bb">Screenshot Studio v1.0: Automating Screenshot Collection for AI Model Training in Unreal Engine</a></li></ul><h4>What is FLUX.1?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zhBa6yNRllry9UGXWVqaIA.png" /></figure><p>1.0 — It is one of the most advanced models today, developed by Black Forest Labs and trained with 12 billion parameters, and it is divided into three variations: <strong>FLUX.1[Pro], FLUX.1[Dev], FLUX.1[Schnell]. </strong>Dev is available to be used on platforms like Civitai within its on-site generator.</p><p>It is far superior to models like SDXL and SD1.5 in terms of quality. Images generated with FLUX.1 follow prompts with coherence, and it requires fewer samples to train a LoRA.</p><p>The counterpart has significantly higher GPU memory requirements (32 GB) compared to SDXL (12 GB), making it less accessible to use on your own machine and more expensive in services like Civitai.</p><p>FLUX.1 also aims to generate realistic results and lacks flexibility for stylized anime or cartoon results.</p><h4>Making a new model for FLUX.1</h4><p>2.0 — I made a similar MetaHuman with recognizable characteristics to differentiate it from my previous example.</p><p>Using my Screenshot Generator Tool, I created all the captures I needed to train a new LoRA. <strong>One of the important aspects of FLUX.1 is that you get good results with 20 to 40 samples.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WFBqN6iZYpYkXAdQ98SwgA.png" /></figure><p>2.1 — I focused on taking a 360° close-up shot and three sets of 90° medium shots from high, low, and neutral camera angles.</p><p>I’m using a standard set of lights and a neutral grey background.</p><p>All samples are 1:1 at 1024 resolution.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FRABa8_LW4n8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DRABa8_LW4n8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FRABa8_LW4n8%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a92bf8ef2f5e7d363cf9d5eb3f5bec8d/href">https://medium.com/media/a92bf8ef2f5e7d363cf9d5eb3f5bec8d/href</a></iframe><p>2.2 — Even though my tool can create a set of tags for each image, I won&#39;t be using them. FLUX.1 works better with <strong>natural language captioning </strong>to describe the images used for training, and using Civitai Auto-Captions makes good results.</p><blockquote>In some cases, FLUX.1 does better with <strong>captionless training, </strong>which is a good advantage against models like <strong>SDXL.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*IlEmsHRayDmcVD-lqlQJ3Q.png" /></figure><p>Example of <strong>Civitai Auto-Caption:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uXyy7dPXcf0NKg-E9FeCdQ.png" /><figcaption><strong>Auto Caption:</strong> <em>The image is a high-resolution CGI rendering of a young person with a striking hairstyle. The subject has a very pale complexion with a slightly freckled face, indicating a fair skin tone. Their eyes are a light brown color, and they have a neutral expression, with slightly downturned lips. The individual has a distinctive hairstyle: a high, spiky mohawk made of light blonde hair that stands straight up from the center of the head, tapering into a point at the top.</em></figcaption></figure><p>2.3 — The settings for my training don&#39;t change much from the default.</p><p>Epochs: 12</p><p>Num of Repeats: 7</p><p>Train Batch Size: 4</p><p>Making a total of around 651 Steps</p><blockquote>In my previous article, I gave more detailed information about what those values mean. <a href="https://medium.com/@fidelhau/generative-ai-model-training-personal-walkthrough-part1-57cbb6fedb7c">https://medium.com/@fidelhau/generative-ai-model-training-personal-walkthrough-part1-57cbb6fedb7c</a></blockquote><p>The character is symmetric, and I’m giving 30 samples, so I will activate a setting that allows the training to use a flipped version of each image, duplicating the samples to 60, improving the learning sources.</p><h4>Results</h4><p>3.0 — I can write 3 example prompts for each Epoch to validate and compare them.</p><p>Prompt 1: <em>“A young female knight hyper realistic and highly detailed with a mohawk hair and the sides of her hairstyle is short and neat, blonde hair, highly dramatic lighting, the armor is shiny and metallic with golden ornaments, she is looking with a fearless face at the viewer. The background is castle door with ornaments.”</em></p><p>Prompt 2: <em>“A young female witch hyper realistic and highly detailed with a mohawk hair and the sides of her hairstyle is short and neat, red hair, her eyes glow in green and is wearing a green robe with runes and details. The background is a creepy forest with blue haze”</em></p><p>Prompt 3: <em>“A young female angel hyper realistic and highly detailed with a mohawk hair and the sides of her hairstyle is short and neat, blonde hair, she is wearing a white robe with golden metallic details. She has white open wings on her back. The background is an open sky with white clouds and sunlight coming from behind”</em></p><p>3.1 — The epochs show excellent generations, almost identical to the source character; the details from the hair and facial features give the same vibe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*e53gCnRNhfYjsNRvU0TXig.png" /><figcaption>Epoch 4 is the chosen one for me.</figcaption></figure><p>3.2— Part of the job is choosing which epoch generates closer results, and in some cases, it is easy to distinguish the worst from the best, but you can spend a huge amount of time deciding. For me, it was clear that Epoch 4 was the best, and the first image convinced me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cecr9gw51nF-iXHn7rW-zg.png" /></figure><p>3.3—Like in my previous test using SDXL, where the character’s particular features were presented, FLUX.1 performs better with fewer images in the data set. Not only that, but prompting is easier; in some cases, it is unnecessary to specify all the details to generate a higher-quality image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/0*2UuiKD2im5Lbbqez" /><figcaption><strong>Prompt:</strong> 1girl,solo, light skin. A young female dark knight hyper realistic and highly detailed with a (mohawk hair) and the sides of his hairstyle is short and neat, red hair. She is wearing a black armor with magical fire glowing details. She is slim. She wears metallic dark boots. She is standing in black molten rocks. The background is an active volcano with lava flow. She is looking at the camera with a slightly evil face. The shot is from below. The lighting is dramatic, coming the lava glow. Ashes are flowing in the air.</figcaption></figure><p>3.4 — But, it is best if the lighting conditions and the background are mentioned in the prompt; this will generate better results than leaving FLUX.1 to decide.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/0*eAgxyxEAGH_dUzMU" /><figcaption><strong>Prompt:</strong> 1girl,solo,light blonde hair, light skin, A young female angel (hyper realistic and highly detailed) with a mohawk hair and the sides of his hairstyle is short and neat, blonde hair, she is wearing a white robe with golden metallic details. She has white open wings on her back. The background is an open sky with white clouds and sunlight coming from behind, she is looking at the camera with a slight smile, the eyes glow in yellow and sun light coming from behind</figcaption></figure><p>3.5—My LoRA can be combined with others specialized in styles, creating watercolor results, for example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/0*WXSUlONRu_aGXLDR" /><figcaption><strong>Prompt:</strong> 1girl,solo, light skin. A young female witch hyper realistic and highly detailed with a mohawk hair and the sides of his hairstyle is short and neat, red hair. Her eyes glow in green power. She is wearing a green robe with magical glowing runes and details. The background is a white paper. She is looking at the camera with a slightly evil face. The lighting is dramatic, coming from a full moon in the open sky. The is dynamic with watercolor style</figcaption></figure><p>3.6— I discovered that using a proper intensity value makes a massive difference in getting a closer look at the original character. Both pairs of images use the same prompt and show similar results. However, the images using the LoRA with 1.35 as intensity are more loyal; this is noticeable in the eyes, eyebrows, and mohawk design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CNLuXimYH6eUfmhNUV7eRw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jBr2Texut2vpkNtPxDN8pg.png" /></figure><blockquote>It is interesnting how the uncanny valley feeling of the metahuman is still transfered to the generations. Also, comparing images, I noticed the computer generated style of lighting; hard shadows, less details for skin and that empty look in the eyes that makes it very obvious.</blockquote><p>3.7—Like SDXL, it was possible to change some of its inherent features, such as hair, eyes, and skin color.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Om-LfBQi_47XNm4RIyaCog.png" /></figure><blockquote>This effect is possible at the expense of losing fidelity to the original design.</blockquote><p>3.7—An issue with <strong>SDXL</strong> is how the shirt&#39;s design is transformed into something else when generating images that do not directly involve a shirt. This is a nice feature if that is what you are looking for, but this<strong> “problem” is not present using FLUX.1</strong>. Clothes are not influenced by the original design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eXZRs0PSKmGpdARaTJupgQ.png" /></figure><h4>Wrong Results</h4><p>4.0 — FLUX.1 is a model specialized in hyperrealism; I found it challenging to generate cartoon or anime results, even if a style LoRA is active. Some images show deformations or a filter-like style is applied to the top to simulate anime.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TeiLSWTQVczVTjj0YTEY0g.png" /></figure><p>4.1 — Almost all of the images generated show the same neutral expression and a bias towards the camera angles from the data set. I tried three methods with <strong>no result.</strong></p><ul><li>Increasing <strong>CFG</strong> (Classifier Free Guidance), this value controls how closely the prompt is followed.</li><li>Manually increasing the intensity of the prompt using parenthesis. i.e. “She is looking at the camera ((disgusted)).”</li><li>Adding a secondary LoRA specialized in expression.</li></ul><p>My next option will be to add samples with expressions directly to the Data Set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M_z1OqLphKVFyUQoXi4-HQ.png" /></figure><p>4.2 — Using a LoRA trained for <strong>SDXL</strong> allowed me to change the perceived sex of the character, but this was <strong>not possible using FLUX.1</strong>, even after specifying some of the characteristics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XwRABdNjXBjeR2ns.png" /></figure><p>4.3 — Due to multiple samples where the character is looking at 90° from the camera, if the caption does not specify the position of the head, <strong>FLUX.1</strong> might generate images based on those poses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fC9bwuaAS8euvl4_5veRcA.png" /></figure><h4>Conclusions</h4><p>5.0 — FLUX.1 is one of the best available models to create realistic image generations, surpassing those from Stable Diffusion.</p><p>5.1 — With the introduction of FLUX.1 Tools, the generations will be easier to detail, allowing control to recreate detailed sections of images.</p><p>5.2 — FLUX.1 can create highly detailed images using less information than older models.</p><p>5.3 — Caption style prompts make the process easier by allowing the interpretation of natural language phrases into surprising results.</p><h4>Disclaimer</h4><blockquote>6.0 — As mentioned earlier, I do not take the ownership of the generated artwork, having experimenting with this technology make me realize of the immense talent of the artists which artwork is taken to create AI models.</blockquote><blockquote>6.1 — But I also recognize the talent of the engineers that developed the technology to make this possible. — Fidel Hau</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/252/1*8aQWSX6A5EYCexHW_ZjpNw.gif" /></figure><blockquote><em>In future articles, I will cover more topics on AI image generation and my test with tools like comfy.ui and FLUX.1 Tools. Thanks for reading.</em></blockquote><blockquote><em>Fidel</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8c855f32e7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Changing the color of an SVG file without Photoshop — Express tutorial]]></title>
            <link>https://medium.com/@fidelhau/changing-the-color-of-an-svg-file-without-photoshop-express-tutorial-2613497ad7be?source=rss-d4c452f933d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/2613497ad7be</guid>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[svg]]></category>
            <category><![CDATA[vector-art]]></category>
            <category><![CDATA[graphic-design]]></category>
            <category><![CDATA[tricks]]></category>
            <dc:creator><![CDATA[Fidel Hau (Senior Tech Artist)]]></dc:creator>
            <pubDate>Wed, 13 Nov 2024 01:35:54 GMT</pubDate>
            <atom:updated>2024-11-13T01:35:54.237Z</atom:updated>
            <content:encoded><![CDATA[<h3>Changing the color of an SVG file without Photoshop — Express tutorial</h3><blockquote><strong>This is a simple trick.</strong></blockquote><p>An <strong>SVG is a vector file</strong> that can be scaled up or down without losing any resolution, compared with raster files like JPG and PNG. This makes it suitable for icons and web browsers.</p><p>1 — You can open an SVG file using Chrome or Firefox.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*WpGnVuWH6gk1l-hB2tIUxg.png" /></figure><p>2 — However, to change the colour, you need to open the file in a text editor like Wordpad. And you will see something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*ApD4k47vma6GHM_ZtKJDeA.png" /></figure><p>3 — Locate the section that includes the word <strong>“fill=”</strong>; this is where the colour is assigned in hexadecimal. My image is using black, fill= “#000000”, but I will change it to red using #FF3300</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*pmLD4ezSSs7_2mC4OGykqQ.png" /></figure><p>Now, when I open the file, the image is red.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*38dPfIpTbCQlNWM2Eu4FAQ.png" /></figure><p>Here is a table with some colours and their code in Hexadecimal:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/0*nqG12e8DDFzskf4M.jpg" /><figcaption><a href="https://htmlcolors.com/hex-color">https://htmlcolors.com/hex-color</a></figcaption></figure><p>4 — It is also possible to write the name of some colors like blue, red, yellow and black.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*Lpl-t3rO8zoK7llh8jAbjQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*0SoNWmFYGE56R9x_aey36Q.png" /></figure><h4>Additional trick</h4><p>You can add a stroke to the image with a defined color and width, by adding the line <strong>stroke-width = “The value you wish”</strong> and modifying the colour in <strong>stroke = “none”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*-PthAYkrtMUTirPc5XzrXw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*_SBQGg_e4EF4Af4-oE1xlA.png" /><figcaption>Try with different values in stroke-width</figcaption></figure><blockquote>Thanks for reading, and hopefully, this solves a problem for you.</blockquote><blockquote>Fidel</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2613497ad7be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Screenshot Studio v1.0: Automating Screenshot Collection for AI Model Training in Unreal Engine]]></title>
            <link>https://medium.com/@fidelhau/screenshot-studio-v1-0-automating-screenshot-collection-for-ai-model-training-in-unreal-engine-a1286908a7bb?source=rss-d4c452f933d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1286908a7bb</guid>
            <category><![CDATA[game-dev-guide]]></category>
            <category><![CDATA[generative-art]]></category>
            <category><![CDATA[technical-art]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[unreal-engine]]></category>
            <dc:creator><![CDATA[Fidel Hau (Senior Tech Artist)]]></dc:creator>
            <pubDate>Tue, 12 Nov 2024 04:19:03 GMT</pubDate>
            <atom:updated>2024-11-12T04:19:03.051Z</atom:updated>
            <content:encoded><![CDATA[<p>In my previous article about making Low-Ranking Adaptation Models, I mentioned the difficulty of capturing enough samples of my Metahuman to get good results in training.</p><p><a href="https://medium.com/@fidelhau/generative-ai-model-training-personal-walkthrough-part1-57cbb6fedb7c">Using Unreal’s MetaHuman for Image Generation: A Personal Walkthrough of LoRA Model Training</a></p><p>I’m not planning to only use one character but eventually expand it to more, not only Metahumans. I decided to create a tool to help me, and I named it <strong>Screenshot Studio</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gWZ9Y7C676Pon0jgTmUexA.png" /></figure><p>1 — The tool rotates the character (the “protagonist”) by a set interval determined by the number of frames until it reaches a full 360-degree rotation by default.</p><p>At each step, it captures a screenshot with the specified resolution in the widget.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FRABa8_LW4n8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DRABa8_LW4n8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FRABa8_LW4n8%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/0a0b0ad966b7883e0ffd30f457f01a1b/href">https://medium.com/media/0a0b0ad966b7883e0ffd30f457f01a1b/href</a></iframe><p>2 — I’m saving the values and settings to be used by the tool as Data Assets, which allows me to save time in the iterations. I create a new preset if I need to make captures using only one camera. This speeds up testing.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FBcc_Xxa_6M8&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DBcc_Xxa_6M8&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2FBcc_Xxa_6M8%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/b4405ffb5fa9aeb279d39de72565f760/href">https://medium.com/media/b4405ffb5fa9aeb279d39de72565f760/href</a></iframe><p>3 — The tool includes the following customizable settings:</p><ul><li>Protagonist. This is the character for whom the screenshot will be taken.</li><li>Cameras to render. It will capture the amount specified for each camera.</li><li>Light Sets: A group actor with lights per every camera. Automatically turning them On or Off.</li><li>Screenshot Resolution: Specify the final screenshot resolution.</li><li>Amount of frames: This is per light set, per camera.</li><li>Screenshot Prefix: Define a custom prefix for each file, including the preset name, camera angle, light set, and frame number.</li><li>Expressions: Choose face poses for the character, with each expression captured per light set and camera.</li><li>Delay Time: In some cases, the capture happens before the animation; this helps to wait a specified number of seconds before capturing.</li><li>Is looking at viewer: Enables eye tracking towards the camera, which turns off at 45 or on at -45 degrees.</li><li>Use Max Angle: Allows to capture only the desired range; for example, if Max Angle is 90, it will avoid capturing the character from behind.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dec0uofjZ45-dug092w5tQ.png" /></figure><p>4 — The tool automatically generates a .txt file for each screenshot with tags describing the character. This file is very useful since it saves me a lot of time when I submit a dataset.</p><p>The values specified in <strong>Prevalent Tags</strong> will be the first to appear in the file. However, the tool also adds other tags <strong>depending on the light set, the camera angle, and the character&#39;s angle.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y6DrfQEHqOjTBR9oZCL5VA.png" /></figure><p>5 — The main reason for specifying this set of tags is that some models work better with them than captions. Every tag mentioned is characteristic of the sample that can be changed; otherwise, it is inherent in the character. This is part of the reason why I’m excluding the tag Mohawk.</p><p>6 — The level comprises the available actors involved in the process.</p><ul><li>Cameras: Positioned for capturing multiple angles.</li><li>Light sets: Arranged for varied lighting conditions.</li><li>Protagonists: Selectable characters.</li><li>A Level Sequencer: Controls eye animations and facial expressions.</li></ul><p>Actors become visible only when needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wqnHVqMeJJeW6MTHHF_HjQ.png" /></figure><p>7 — The result is fast and creates a set of captures with various camera angles, lights, and expressions that will help train <strong>LoRA models</strong>, especially those needing more information like <strong>SDXL.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6KJgBkk3UmdT-5zeD4_8tA.png" /></figure><h4>8 — For Version 2.0</h4><p>I’m planning to add more support and other features I need.</p><ul><li>Support for full-body poses.</li><li>Extra tags regarding light (i.e. if the light comes from behind).</li><li>Support for custom background.</li><li>Support to save the settings directly within the tool.</li></ul><p>At the moment, I’m satisfied with the result, and I will start testing the datasets and learn what is needed to improve the process. Something like this will be helpful in a pipeline where the animations, renders, promotional and videos will be done using only AI.</p><h4><strong>9 — Disclaimer</strong></h4><blockquote>For the reasons expressed before, I do not take the ownership of the generated artwork, having experimenting with this technology make me realize of the inmense talent of the artists which artwork is taken to create AI models.</blockquote><blockquote>9.1 — But I also recognize the talent of the engineers that developed the technology to make this possible. — Fidel Hau</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*wF8u8i3MPhwtZN8c3Hkxrg.png" /></figure><blockquote>In my next article I’ll show the results with the data sets using models like SDXL and FLUX.</blockquote><blockquote>Thanks for reading.</blockquote><blockquote>Fidel</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1286908a7bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to populate DataTables cells of Vector and Struct type in Unreal Engine 5 using CSVs and…]]></title>
            <link>https://medium.com/@fidelhau/how-to-populate-datatables-cells-of-vector-and-struct-type-in-unreal-engine-5-using-csvs-and-c07f4ccc5739?source=rss-d4c452f933d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/c07f4ccc5739</guid>
            <category><![CDATA[unreal-engine]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[techart]]></category>
            <dc:creator><![CDATA[Fidel Hau (Senior Tech Artist)]]></dc:creator>
            <pubDate>Sat, 09 Nov 2024 04:39:48 GMT</pubDate>
            <atom:updated>2024-11-09T04:39:48.286Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to populate DataTables cells of Vector and Struct type in Unreal Engine 5 using CSVs and Python— Express Tutorial</h3><p><strong>This is a continuation of my previous express tutorial</strong>. In my previous express tutorial, I demonstrated how to use CSV files to populate DataTables with basic data types like strings, booleans, and floats.</p><p><a href="https://medium.com/@fidelhau/how-to-create-a-csv-using-python-to-populate-a-datatable-in-unreal-engine-5-express-tutorial-787dab46872e">How to Create a CSV Using Python to Populate a DataTable in Unreal Engine 5 — Express Tutorial</a></p><p>But what if the DataTable had other data types like Vectors and Structures? Those types have values inside the value itself, and each comma-separated value represents only one (as text).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PtbCSAI0Mqu6Y7ynuxk6GA.png" /></figure><h4>Importing Vector type values</h4><ol><li><strong>Vectors</strong> are represented by three values ( X, Y, Z) in the DataTable, and the first clue to knowing how to present this value in the CSV is how it is displayed in the row {“X”:0, “Y”:0, “Z”:0}</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SzCkqNbk8BTojWKHU9-Vpw.png" /></figure><p>2. I’ll update the enum in my script to include my characters’ initial positions as tuples with three floats representing (X, Y, Z).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*KKzhA0fNmVTwL-3PrJtMpQ.png" /></figure><p>3. In my custom node, I’ll write a new column with the values for the initial position.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*x_nlmUgVHSwkGKSSb9nypA.png" /></figure><p>4. Running the node creates the <em>CSV file</em> with the new column, and the tuple representing the vector is converted to a string.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*-wdjjDdwhAWSpMUFXE95Qg.png" /></figure><p>5. But this will cause a problem when reimporting the CSV as an Unreal data table. “<strong><em>Problem assigning string to property on row: Missing closing parenthesis.</em></strong>” The message is a bit unclear, but <strong>the real issue is that Unreal doesn’t recognize the string format as a valid Vector.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/549/1*-iya5xSucZQUYyuf_xwnaw.png" /></figure><p>6. Remember the clue I mentioned before? I’ll modify the output to ‘(X=0, Y=0, Z=0)’ by pulling each value from the tuple to match Unreal’s expected Vector format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GASdn8srfUtACQ-rBMIrJQ.png" /></figure><p>7. The new values are written in the specified format, and reimporting the CSV to the Unreal DataTable will be <strong>successful</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*uEeFhagHPob7M2wPC-I1Iw.png" /><figcaption>CSV file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dj3gp__AunZZaA76Z0xtHA.png" /><figcaption>After reimporting</figcaption></figure><blockquote>⚠️Heads up! Although Unreal may display the format as {‘X’:0, ‘Y’:0, ‘Z’:0}, the recognized format for vectors in CSV is ‘<strong>(X=0, Y=0, Z=0)</strong>’. You’ll receive an error if it doesn’t match.</blockquote><h4>Importing Struct type values</h4><ol><li>The process for Structs is similar; you need a single string that represents all the values within the Struct.</li></ol><p>(ValueAsString = “String”, ValueAsFloat = 0, ValueAsBool = True)</p><p>In my data table, the Main Ability column is a <strong>Struct</strong> with different value types for all its properties.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*A6wH56haugXbgBVecrCzzA.png" /></figure><p>2. In my code, I’ll create some enums for my abilities, populating them with the values I want to send to Unreal. The MainAbility Enum derives from the main Class Ability, filling each ability with a tuple.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*cVZaOg_P7LE4dXiliNmT9A.png" /></figure><p>3. In my custom node, I added a new column with the same name I have in Unreal, and I extract the attributes for each ability and assign them in the defined order. (<em>Character1 gets Ability1</em>).</p><p>The final value is created using a formatted string written in the row&#39;s last cell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s1KvGryTyxyznD8oBrmSGA.png" /></figure><p>4. Running the code results in the <em>CSV file</em> shows the new column and the values for the Main Abilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*yI9vCXU9gZ7_Y57HEV9a4Q.png" /></figure><p>5. Finally, after reimporting the CSV into the DataTable, each value maps correctly to the struct ‘Main Ability.’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WjEdhSRLeEFFsfWSyRelPw.png" /></figure><blockquote><em>Thanks for reading! For more tutorials, check out my other articles in this series.</em></blockquote><blockquote><em>Fidel</em></blockquote><ul><li><a href="https://medium.com/@fidelhau/how-to-draw-splines-into-textures-in-unreal-5-part-1-f2441f34bac4">How to Draw Splines into Textures in Unreal 5— Part 1</a></li><li><a href="https://medium.com/@fidelhau/how-to-create-a-custom-blueprint-node-using-python-to-create-a-file-in-unreal-5-express-tutorial-fb35ce54f163">How to create a custom Blueprint node using Python to create a file in Unreal 5 — Express Tutorial</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c07f4ccc5739" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create a CSV Using Python to Populate a DataTable in Unreal Engine 5 — Express Tutorial]]></title>
            <link>https://medium.com/@fidelhau/how-to-create-a-csv-using-python-to-populate-a-datatable-in-unreal-engine-5-express-tutorial-787dab46872e?source=rss-d4c452f933d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/787dab46872e</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[technical-art]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[unreal-engine]]></category>
            <dc:creator><![CDATA[Fidel Hau (Senior Tech Artist)]]></dc:creator>
            <pubDate>Sun, 27 Oct 2024 00:49:45 GMT</pubDate>
            <atom:updated>2024-10-27T00:49:45.624Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Create a CSV Using Python to Populate a DataTable in Unreal Engine 5 — Express Tutorial</h3><p>This tutorial addresses another topic that isn’t immediately intuitive in Unreal 5.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VhjG_9s1nRNsm8DTF-c1QA.png" /></figure><p>Creating Data Tables is straightforward. Start by defining a structure (Struct) to represent the columns in your Data Table.</p><p>For data types, I’m using a String, Enum, Integer, and Boolean.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*L0mkM-ch4-pTS-dNP7HJ9A.png" /></figure><p>You can then fill it with the necessary information by adding more rows. By default, the first row contains the names specified in your Struct, plus a new cell is added automatically for the Row Name, which is the row&#39;s ID.</p><p>This value is unique for each row, and it is used to get a reference for the row values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*Sr5PLeQOJJCKzk2wanUA3A.png" /></figure><p>My issue came when I needed to fill multiple data tables with information available in a different code. I found that the best way to input values was to use a ‘.csv’ (comma-separated values) file.</p><p>To be able to pass values, I only found doing it using a “<em>.csv”</em> (comma-separated values) file. So, I created my node using Python and then used it to fill out the DataTables.</p><p>And it is very simple.</p><p>1.1 — Import the module CSV to your Python script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/126/1*c6dLLF8WSSGBYfoghL2hug.png" /></figure><p>1.2 — Create a new function inside your class and add the proper decorators to use it in Unreal’s reflection system. (<a href="https://medium.com/@fidelhau/how-to-create-a-custom-blueprint-node-using-python-to-create-a-file-in-unreal-5-express-tutorial-fb35ce54f163">You can follow my other Express tutorial about making your node</a>).</p><p>1.3 — I’m saving the .csv file in my project’ saved folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*5VVU2RjLNSWF2CeAlDKBRQ.png" /></figure><p>1.4 — Use the statement “<em>with open(file_path, “w”)”</em> to safely open the file you created. Using “<em>with”</em> allows you to open or close files, ensuring the file is closed after finishing. The argument <em>“w”</em> is to specify to open the file for writing. By using “as file” I’m assigning the CSV to that variable.</p><p>1.5 — You must create a new writer to create the information inside the CSV. Use ‘csv.writer(file)’ to set up the writer for your CSV file.</p><p>1.6 — With the writer you can start using functions like “writerow()” and passing a list with the values for your first row, in this case it represent the same names as my Struct asset in Unreal that will also become the first row in my Unreal Data Table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*Wknt8HZrdvdTAyGwUoNOEw.png" /></figure><p>1.7 — A CSV file doesn&#39;t make distinctions for type; all values are strings, and it is up to the interpreter to decide its type. This means even if the cells contain numbers or floats, they will be considered texts.</p><h4>Filling the CSV File</h4><p>2.1 —I have a Class for all the characters in the first season of my game. Each character is a member of an enum with a tuple as its value (String, String, Float, Boolean)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*IXN5Re1qhIRGDmIP2b3iVw.png" /></figure><p>2.2 — In the code with my custom node, I’ll import my class as S1_Characters</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*hGIbFMvK8aUXj98sI1Ly4w.png" /></figure><p>2.3 — Using the function <em>“writerow()”</em> in the writer and iterating all the characters in my Season 1 class, I’m filling the CSV file with a list of values. Notice that by using <em>“character.name”</em>, I’m writing the enum&#39;s name in the row&#39;s first cell; this will be <em>“Row Name”</em> in Unreal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*hWmvWzazDxfN-vf4gRLBIg.png" /></figure><p>2.4 — To generate the CSV file, I run my custom node from an Editor Utility Widget in Unreal, which saves the file in my project’s ‘Saved’ folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*Us3waof7PCb7qppDOLUkrw.png" /></figure><p>2.3 — This will replace the Data Table’s current values with those in the CSV file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*56rIRUTFZAs_0oinSndRnA.png" /></figure><p>2.4 — In the Editor Utility Widget you can load the data Table and using the node “Fill Data Table from CSV File” with the path of your file. You can replace the values in the DataTable. You can also do this directly in the DataTable using the “Reimport” button and selecting the CSV file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eTcIMu44Q4h8ugvgxLvdBw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*kgPDjkw7TmNqszxZv82PMg.png" /></figure><p>2.5 — The cells are now filled with the information from the “csv file”.</p><p>2.6— Unreal does a pretty good job as an interpreter of the data from the CSV, even able to identify enums by their values or index. In this example, the Class is an Enum in the Struct, and the value is selected correctly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*Cq-acntBShburRZ0Zvjkyg.png" /></figure><blockquote>Thanks for reading! For more tutorials, check out my other articles in this series.</blockquote><blockquote>Fidel</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=787dab46872e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a custom Blueprint node using Python to create a file in Unreal 5 — Express Tutorial]]></title>
            <link>https://medium.com/@fidelhau/how-to-create-a-custom-blueprint-node-using-python-to-create-a-file-in-unreal-5-express-tutorial-fb35ce54f163?source=rss-d4c452f933d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb35ce54f163</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[technical-art]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[unreal-engine]]></category>
            <dc:creator><![CDATA[Fidel Hau (Senior Tech Artist)]]></dc:creator>
            <pubDate>Sun, 20 Oct 2024 01:07:54 GMT</pubDate>
            <atom:updated>2024-10-20T01:20:12.507Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to create a custom Blueprint node using Python to create a file in Unreal 5 — Express Tutorial</h3><p>It might seem surprising, but Unreal Engine doesn’t provide a built-in Blueprint node for creating a file directly. However, creating a node using Python and exposing it to Unreal using decorators provided by Unreal’s Python API is possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aGwKIB57kujtopHsf6sx9A.png" /></figure><p>1.1— Start by creating and saving a new Python file, ideally in a ‘Scripts’ folder within your project.</p><p>1.2 — In this file, you must use “<em>import unreal.</em>” This import allows you to access Unreal’s Python API and utilize functions to interact with Blueprints. Then, create a new class derived from unreal.Object.</p><p>1.3 —This indicates Unreal to treat it like an object and to be part of the reflection system. Use the decorator “<em>@unreal.uclass()</em>” to make Unreal recognize your custom class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*UJalaK4vMnKXIHMqvtSblQ.png" /></figure><p>1.4 — In the new Class, define a new function.</p><p>1.5 — I’ll use two string parameters: one for the file name, one for the content of the .txt file, and a boolean to optionally log the output file path in Unreal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*n3G1h8ztvDB3UDXE2PuJ6A.png" /></figure><p>1.6 — Use the “<em>@unreal.ufunction()</em>” decorator to expose the newly created function to the reflection system in Unreal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QORJkGvlqSNFeBCmeI4SVA.png" /></figure><p>1.7 — Using “<em>static=True”</em> means that the function can be called directly without needing an instance of the class, making it simpler to use as a node in Blueprint.</p><p>1.8 — In the parameters (<em>params=[]), </em>define the types of the same type as your Python function, in this case, str, str, bool. These values are where you can connect your variables in the node, and they’ll have the same names as your function’s parameters.</p><p>1.9 — The Metadata section lets you define custom behavior for the node, including how it appears and behaves in Unreal. One vital value to use is “<em>BlueprintCallable: True.</em>” This is where you tell Unreal to allow it access as a Blueprint node.</p><p>1.10 — The value assigned in DisplayName will be used for the node in Blueprint.</p><p>1.11 — Additionally, you can use more metadata such as Category, Tooltip and CompactNodeTile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*aL1HbH4xuog3NJBPz6Nb3w.png" /></figure><p>After following those simple steps, you must load your script in Unreal, and your custom node will be available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/230/1*j0gGiWVJaT5TbsZGBD0crA.png" /></figure><h4>Common issue</h4><blockquote>Not assigning an argument after a parameter with one creates an issue. Avoid, for example:</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*zQzXYSz6C2AdiZE8-1nt4A.png" /></figure><blockquote>use instead</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*n5GeAl05ilg88dS--n34kw.png" /><figcaption>or</figcaption></figure><h4>Creating a TXT file</h4><p>2.1<em>—</em>Create an empty variable to define the path to write the file. In this case, I’m using the same path for the screenshot folders<em> (</em>some folders are already defined in<em> “Unreal.Paths”</em> that you can use). This is the area where we define the file&#39;s name and extension.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*2MlgFRQu8J1fmezIJDIL6Q.png" /></figure><p>2.2 — Use the statement “<em>with open(file_path, “w”)”</em> to safely open the file you created. Using “<em>with”</em> allows you to open or close files, ensuring the file is closed after finishing. The argument <em>“w”</em> is to specify to open the file for writing.</p><p>2.3 — And with the function “<em>write()</em>,” you write the text provided in your “<em>content”</em> parameter.</p><p>2.4 — The “<em>log.path</em>” boolean is used to display the location of the created .txt file if enabled. Use unreal.log with a formatted text to log the path of the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5DxuxyizraPIqcOtBe8Lng.png" /><figcaption>Final python function</figcaption></figure><p><em>-Fidel</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb35ce54f163" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Unreal’s MetaHuman for Image Generation: A Personal Walkthrough of LoRA Model Training]]></title>
            <link>https://medium.com/@fidelhau/generative-ai-model-training-personal-walkthrough-part1-57cbb6fedb7c?source=rss-d4c452f933d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/57cbb6fedb7c</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[generative-art]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[unreal]]></category>
            <category><![CDATA[art]]></category>
            <dc:creator><![CDATA[Fidel Hau (Senior Tech Artist)]]></dc:creator>
            <pubDate>Tue, 08 Oct 2024 17:04:10 GMT</pubDate>
            <atom:updated>2025-01-31T00:32:49.172Z</atom:updated>
            <content:encoded><![CDATA[<p>Since image generation using AI became popular, I’ve been testing some generators (Midjourney, ChatGPT, and Microsoft Designer, among others). Writing an idea and waiting for the result is exciting, especially if you don&#39;t know what you&#39;ll get.</p><p>I know there are still gray areas regarding AI, including issues around copyright, ethics, accountability, transparency, privacy, and environmental impact. However, I believe this technology is here to stay, and we must adapt to different situations. By using it, we may not only address but also better understand some of these concerns (<strong>see Disclaimer at 6.0</strong>).</p><p>This first article is my introduction to documenting my learning curve from the past year. I’ll cover my experiences using platforms, techniques, and pipelines for generative AI.</p><p>I’ll explain some of the fundamental concepts of image generation and share my walkthrough of using the popular community platform Civitai, which allows users to train <strong>base models</strong> (<em>the foundational AI models used for generating image</em>s) and <strong>LoRAs </strong>(<em>Low-Ranking Adaptation models that fine-tune existing models</em>) in the cloud using your <strong>dataset </strong>(a <em>compilation of images for training a model</em>). I’ll dive deeper into these terms later on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tzN2jrojfqqCLFOehTbwpQ.png" /></figure><p>The platform’s most used base model is SDXL, an advanced version of Stable Diffusion 1.5 that allows users to create realistic and cartoonish images. This model is trained with approximately 2.3 billion images. Creating a dataset of that magnitude would be time-consuming.</p><p>Fortunately, there is a faster way to do it. A <strong>LoRA (Low-Rank Adaptation) model </strong>is used in AI training to fine-tune large models, such as SDXL, without requiring full retraining of the entire model. These smaller models are trained for specific needs, like a style or a character. The training is faster and doesn&#39;t need an extensive data set since it is trained on top of the billions of images the base model is composed of.</p><blockquote><strong><em>ELI5</em></strong> <em>👨‍🏫</em>: Imagine you are a very versatile Chef. You know how to make food from all parts of the world and use all kinds of techniques, and you are hired to make the cakes of a famous brand with the taste their customers love. This branch doesn&#39;t send you to cooking school again to relearn how to batter; they give you their recipes and teach you how to make cakes with the same taste. You are the model (like Stable Diffusion 1.5). Your knowledge is the data set; the new recipes are the LoRA models.</blockquote><h4>1.0 — First Test</h4><p>Who is the guy? This punkish mohawk-style boy with a yellow t-shirt is a <strong>MetaHuman</strong>. I designed him because I needed something to start, and I wanted him to have a unique set of characteristics (hairstyle, yellow shirt, facial features) that were easy to detect in generated images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*INm7E4w2ZmompxKamOe21A.png" /></figure><p><strong>1.1 —</strong> I compiled 170 screenshots from the web editor using different light sets, poses, and angles. These images didn&#39;t have a specific aspect ratio; I focused more on getting portrait shots and expressions and using the highest render quality possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*IkDTqxDe9Z5GrB_rvNPlHQ.png" /></figure><p><strong>1.2 —</strong> The next step was to pair <strong>each image</strong> with a <strong>tag-based description</strong>; some models work better with human-based descriptions, but not Stable Diffusion.</p><p>Civitai has an in-house service to auto-tag each image, but depending on the case, it might be better to use other methods like ChatGPT or do it manually. Though it might take some time, combining both methods is better. I decided to go with auto-tag.</p><p>This is an example of the tags generated for this image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*QEXqPZIU5X6sErDC4s2hdg.png" /><figcaption><strong>metapunkboy, 1boy, male focus, solo, realistic, grey background, portrait, simple background, blonde hair, shirt, closed mouth</strong></figcaption></figure><p>The tags describe traits <strong>not strictly tied</strong> to the character; for example, specifying that it has <em>blonde hair</em> means it’s possible to generate images with red hair. Thus, ignoring the tag <em>mohawk hair, </em>the model will learn to create images with that specific hairstyle.</p><p><strong>The first tag is the trigger word</strong> that will call for using the LoRA; it is not always necessary but gives control when using a LoRA with more details that can be called, like a different costume.</p><p>My LoRA will be trained using Stable Diffusion 1.5 with a bias towards Semi-Realistic; even though the option to train with SDXL is available, I decided to try that first.</p><p><strong>1.3 —</strong> Three essential parameters are used to train a model: <strong>Epochs, Number of repeats,</strong> and<strong> Batch Size.</strong></p><p>Assume you have a data set with 1000 images (samples). All images will be used in the training process, generating one epoch after completion. <strong>More epochs usually mean better training</strong>.</p><p><strong>1.4—</strong>Increasing the number of repeats to 2 means that each image will be loaded into the VRAM and used for training twice, effectively doubling the total number of samples to 200. Using this value for individual samples will help to better represent specific images. This is useful when you want to emphasize particular samples or when your data set lacks representation of others.</p><p><strong>1.5 —</strong> Not all the images are sent to the VRAM simultaneously; the training happens in batches, and the <strong>batch size</strong> is the number of samples sent to the VRAM to train the model simultaneously.</p><p>Having this value at 100 means each epoch will have 10 batches of the 100 samples to complete the 1000 images, and by having the number of repeats at 2 for each sample, we will have 20 batches of 100 samples for each epoch.</p><p><strong>1.6 —</strong> After almost 1 hour of processing my first LoRA with 12 epochs, which is very fast, this was my first result for some of the generations using the epochs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iYH5XWmThiID9XCg7Zy9Kg.png" /></figure><blockquote>Well… not what I was expecting.</blockquote><p>The generation of the images was successful, but not in the most artistic way. Still, the essential details from the sample images are visible: the mohawk hair, a yellow T-shirt with a black collar, the chest design, the cleft chin, and the lighting from the captures.</p><p>These generated images used simple prompts like:</p><p><em>semi realistic, handsome, 1boy, male focus, standing, serious, mohawk, light skin, blonde hair, muscular, yellow shirt, denims, boots</em></p><p><strong>1.7 — The LoRA can be used on other base models that were created on top of the original model (Stable Diffusion 1.5)</strong></p><p>After experimenting more with other prompts and base models, I obtained accurate results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wlabhkuLH7gC8P3SE0yTLQ.png" /><figcaption>I added in all the images the tags: clenched teeth, muscular, portrait</figcaption></figure><p>Still, the character is represented by his particular features, but it does not have the same design as the MetaHuman.</p><p>As I generated more images, I noticed the influence of the data set, how specific expressions and facial features translate into new images, the unnatural camera view from some of the captures, and the simplicity of the background.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2YyqF69PhawLAd0QYqH5_Q.png" /><figcaption><strong>Left:</strong> MetaHuman captures for dataset. <strong>Right:</strong> Genareted images from Civitai</figcaption></figure><p>The prompts used for the generation do not include specific expressions. No facial feature was specified in the generation of the LoRA and the tagging of those images, and of the 70 images in the data set, 19 show the character without a shirt and 23 with a frowning brow, possibly creating the bias.</p><blockquote>By not specifying the difference in expression for each image, the AI thinks the character is just like that, angry and naked all the time.</blockquote><p>This LoRA doesn&#39;t provide the results I wanted, though it helps create characters with a Mohawk hair design and thick eyebrows.</p><h4><strong>2.0 — Second Test</strong></h4><p>I decided to increase the number of samples with a strong bias toward portrait shots and expressions. I avoided using more than one light set, reduced the variety of poses and perspectives, and left his shirt on.</p><p>I used SDXL 1.0, which has a more extensive training set than SD 1.5, as the base model for the training.</p><p>The maximum recommended size for SDXL is 1024x1024, but my images are 512x512; this will help <strong>reduce the training time.</strong></p><blockquote>Training a SDXL LoRA with 1024x1024 images locally requires around 24–48 GB of VRAM. When using Civitai, the training is done in the cloud and one advantage of using lower-resolution images is that it reduces waiting time and costs.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*-DceIbeaRxUf5UAyXes0Cg.png" /></figure><p>I captured 70 images (samples) and increased the number of repeats to 4 to compensate. This means that each image will be used four times in the training, making a total sample of 280 images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/525/1*8Varjcp6MF3OBH1SvFjbSA.png" /></figure><p>Tags are more specific, with the most essential aspects being changeable elements like the position of the shot (e.g., <em>from the side</em>) and the direction of the subject’s gaze (e.g., <em>looking at viewer</em>)</p><p><strong>2.1—</strong>The result is way better than previously generated images, preserving all its characteristics and being more loyal to the original design. The lighting is similar to the sample images, and the hair looks more natural.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*6G9fK4jIgwCHkCpRSSeXPQ.png" /><figcaption>By not describing the character as 1boy, it created a female version.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PxE6_IS_l4a3XhM_4DKOpw.png" /></figure><p><em>civitametapunkSDXL, 1boy, male focus, realistic, solo, city background, neutral expression, yellow shirt, short neck</em></p><p>Something interesting about this LoRA is that it allowed me to transform the character into a female version by replacing the tag <em>1boy </em>with <em>1girl.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GwtXMrcr10wbYBI8y5cGzg.png" /></figure><p><em>civitametapunkSDXL, 1girl, female focus, realistic, solo, city background, neutral expression, yellow shirt, short neck</em></p><p><strong>2.2—</strong>The first issue I noticed is that some tags are not respected. For example, the <em>city background</em> tag was never applied; instead, the generator used a version of the data set image.</p><p>In some cases — though not necessarily a flaw — it generated images where a simpler background helped keep the character in focus. Some advanced prompts combined with additional LoRAs for styling resulted in various combinations, but in most cases, the distinctive features of the MetaHuman remained.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kf-hwDVZ7fgUFLz1G8_kPQ.png" /></figure><blockquote>One advantage of LoRAs is that you can combine them with others that focus on specific tasks, such as emphasizing an artistic style. In the image on the right, the professor uses my LoRA alongside another one for colorful illustration. I like how the eclipse design persists in some of the generations. It also has a bias towards yellow clothing unless a different color is specified in the prompt.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wgFk17fxsjKvnAnaghug1A.png" /></figure><blockquote>Even though I can create a variety of styles, I’m still limited to the same expressions, poses, and lighting. A positive aspect is that the images remain true to the original design.</blockquote><p><strong>2.3 —</strong> As I said, the last images were generated using SDXL 1.0 as the base model.</p><p>But <strong>what is SDXL?</strong> How does it compare with the Stable Diffusion base model?</p><p><strong>SDXL is a better version and is essentially a checkpoint of Stable Diffusion</strong> created by Stability AI. This model aims to generate higher-quality, photorealistic, and complex images than its predecessor. Text understanding is also better for training and generation.</p><p><strong>A LoRA is also a checkpoint</strong> on a lower scale than a model checkpoint.</p><p><strong>A checkpoint is a saved state of a model&#39;s training in which the newer model can start, and a Checkpoint Merge combines the base model checkpoint with LoRAs to create a final Checkpoint state.</strong></p><h4>3.0 — Third Test</h4><p>My MetaPunk LoRa uses SDXL as its base on its creation, which makes it compatible with other checkpoints based on SDXL. I changed to a more advanced checkpoint merge that fixes many issues for human faces.</p><blockquote>Its a checkpoint over checkpoint and so on:</blockquote><blockquote>Stable Diffusion 1.5 → SDXL 1.0 → SDXL Checkpoint→ MetaPunk LoRa</blockquote><p>The result is improving; it is closer to the MetaHuman character in design.</p><p>The differences are subtler: the head is still taller but not as tall as before, the ear is shaped differently, the eyebrows are styled differently, and the nose is narrower, but the quality and definition improved significantly, sometimes even too much, so that the images started to look better than the original character.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZZPM6glqD1QXq-vQ1jFvDg.png" /></figure><p><em>civitametapunkSDXL, 1boy, male focus, realistic, solo, city background, neutral expression, yellow shirt, short neck</em></p><p><strong>3.1 — </strong>Some prompt combinations allowed me to change the background, but when I’m not specific, the default blurriness from the data set is preserved but adapted to the style requested.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y-FS4hnsfu5RFbmISGaESQ.png" /><figcaption>It was still possible to transform the character to its female version.</figcaption></figure><p>Other SDXL-based models also improved the quality of the generations, but some of them diverged from the original design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k_dquTS7KYg_jScsJeYbLQ.png" /></figure><blockquote>One aspect I really like is how the color and the design from the shirt is translated depending on the prompt.</blockquote><h4>4.0 — Wrong Results</h4><p>Like any current AI image generator, there were many images with deformities, inconsistencies, errors, missing parts, and even unintentional NSFW results.</p><p>Not all models fit my <strong>LoRA</strong> since the target is more realistic. Those intended to create cartoon or anime images were either unfunctional, showed blurry images, or simply ignored the requested style.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LX5zcEjiQJePiJEdMhL85w.png" /></figure><blockquote>The character is trying to show, but it was unable to generate images using a model intended for anime. Diffusion models work with noising and denoising, so they are present in the images.</blockquote><p><strong>4.1 —</strong> The popular issue with extra fingers is regular, and even though there are techniques, prompts, and even <strong>LoRAs</strong> to avoid it, it is still challenging to get it correct, and a lot of trial and error is required. Another is trying to put two different characters in the same image, which might cause clones of the character to interact.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4xNR5eJJJ3Wwk9gerl0rtg.png" /></figure><p><strong>4.2 —</strong> When the character is at a far distance, faces might look deformed; eyes might pop, crooked faces might appear, and there might be light inconsistencies, missing body parts, or extra body parts, especially with incompatible models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PXw2MA8VHqJXtNNXAlaXTg.png" /></figure><p><strong>4.3 —</strong> A common issue is when the prompts are contradictory, such as asking for a hat on the head while asking for mohawk hair. The model is smart enough to choose what is better but avoid the conflict by being clear.</p><p><strong>4.4 — </strong>When you see AI images using celebrities, you see their resemblance, but there’s often a sense that something is off — the Uncanny Valley effect. I believe this remains one of the issues with generative AI. In some generations, the distinct fake look of the Metahumans was still present, making the images even stranger when combined with AI-generated defects.</p><h4>5.0 — Conclusions</h4><p>The first conclusion I can make is how fast this technology is growing. This is primarily thanks to many users in different communities experimenting with prompts, creating new models, giving support, and documenting their techniques. A vast amount of images are generated daily using services like Civitai, where the user is not bound by its hardware limitations.</p><p>5.1 — Image generation using those services is not complicated, and it makes it exciting, but getting specific results for art direction can be frustrating. You don&#39;t always have control over what you will get, and training a model requires time, patience and practice to understand what is needed.</p><p>5.2—There are still many open possibilities; one of the biggest advantages is that, when the technique is dominated, a lot of time can be saved in iterations for art-related tasks.</p><p>5.3 —The challenge of making a model without infringing copyright is still present; in some cases, signed images were created. Identifying the artist&#39;s name was difficult, but it was present.</p><h4>6.0 — Disclaimer</h4><blockquote>For the reasons expressed before, I do not take the ownership of the generated artwork, having experimenting with this technology make me realize of the inmense talent of the artists which artwork is taken to create AI models.</blockquote><blockquote>6.1 — But I also recognize the talent of the engineers that developed the technology to make this possible. — Fidel Hau</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/409/1*UvN8sw07QDviIi213Iq6sA.png" /></figure><blockquote>In future articles, I will cover more topics on AI image generation and my test with more models and data sets. Thanks for reading.</blockquote><blockquote>Fidel</blockquote><p>Exploration continues in Part 2:</p><p><a href="https://medium.com/@fidelhau/ai-image-generation-with-unreals-metahuman-and-flux-1-my-workflow-and-results-d8c855f32e7e">AI Image Generation with Unreal’s MetaHuman and FLUX.1: My Workflow and Results</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57cbb6fedb7c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Draw Splines into Textures in Unreal 5— Part 1]]></title>
            <link>https://medium.com/@fidelhau/how-to-draw-splines-into-textures-in-unreal-5-part-1-f2441f34bac4?source=rss-d4c452f933d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2441f34bac4</guid>
            <category><![CDATA[unreal-engine]]></category>
            <category><![CDATA[game-design]]></category>
            <category><![CDATA[unreal-engine-5]]></category>
            <category><![CDATA[technical-art]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Fidel Hau (Senior Tech Artist)]]></dc:creator>
            <pubDate>Fri, 21 Jun 2024 20:16:57 GMT</pubDate>
            <atom:updated>2024-06-21T20:16:57.888Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M__I49civ1Pz2bgmomEUdQ.png" /></figure><p>I can give you a whole explanation of why Splines are an important part of computer graphics, but I prefer to go straight to the topic. For reasons, I needed a way to transfer that information into a texture. It is easy; just grab a screenshot, crop it, save it, and end of the story. Do that every time you modify the spline and each you have; depending on your issue, it will take time.</p><p>My problem required an immediate square image every time I modified them, and I took this approach to get information and rasterize the images into a new file. I’ll explain the process in the form of a tool.</p><p>This first part is focused on taking the data from the spline and how to draw using a canvas in Unreal 5 editor. I marked the list with the completed objectives.</p><blockquote>I like to use the ELI5 Technique👨‍🏫 to explain some concepts, so you might see it in my articles.</blockquote><h4><strong>Main Objectives</strong></h4><p>✅This tool will allow the user to take an Actor with a Spline Component and draw it into a Texture asset; it is serialized into your project and behaves like any other texture file.</p><p>✅Any size spline can be drawn.</p><p>✅Consider only the X and Y planes.</p><p>☐The texture can be overwritten if the spline is modified.</p><p>☐Non-linear Splines are allowed. (Curves)</p><p>☐Open loops are allowed.</p><p>☐Output texture can be rectangular and non-POT.</p><p>☐Line Color can be changed.</p><p>☐Background colour can be changed.</p><blockquote><strong>Technical Requirements</strong></blockquote><blockquote>•Common UI Plugin</blockquote><blockquote>•Made with Unreal 5.3.1</blockquote><blockquote><strong>Best use cases</strong></blockquote><blockquote>1- To convert a Spline into a texture file.</blockquote><blockquote>2- To store a visual representation of a Spline.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Ff_5nqqdmqnA%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Df_5nqqdmqnA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Ff_5nqqdmqnA%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/50528475eb0a7062508fa61d328981c5/href">https://medium.com/media/50528475eb0a7062508fa61d328981c5/href</a></iframe><h4><strong>Part 1</strong></h4><p>I created an Editor Utility Widget for the tool. It shows a button that takes the information from the first selected Spline and creates a new texture in the Content folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hEqxAgALbC1Mj99a_Dv1Hw.png" /></figure><h4>Drawing lines and rendering the texture</h4><p>The tool uses a <em>Canvas Renderer Target</em> asset to create the texture; size and other properties for the generated texture are defined by it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ax4VxcPdZ8i_KZMavovnqg.png" /><figcaption>Canvas Render Target with a size of 512</figcaption></figure><p>Using <em>Begin Draw Canvas To Render Target</em> returns a <em>Canvas</em> object that can be used to draw within the area of the Canvas Render Target. After the drawing is finished using the node <em>End Draw Canvas To Render Target, </em>the rendering for the Render Target will be finished and ready to create a new texture using <em>Render Target Create Static Texture.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*rU1FJTnsc6Oci0SGrGK2XA.png" /><figcaption>Beginning the drawing</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*vl3pSv7ql6TvlrYt4bDnNQ.png" /><figcaption>Ending the drawing and making the Static Texture</figcaption></figure><p>The output texture will be stored in the same location as the <em>Canvas Renderer Target</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XAFv3pybZsM6PZs95-X3rw.png" /></figure><blockquote>ELI5 👨‍🏫: The <em>Canvas Renderer Target </em>is like a bloc of blank sheets of a certain size. Each sheet is a <em>Canvas </em>on which we draw the lines. After finishing, tear out the sheet and store it somewhere safe. The bloc is now clean, with a new sheet ready to use.</blockquote><h4><strong>This is the process of rendering the spline to a texture:</strong></h4><p>Once the Widget is ready with a button</p><ul><li>Call the On Clicked Event to trigger the process.</li><li>Get the Spline component of the first selected actor.</li><li>Get the number of Spline Points.</li><li>For each one, get the Position vector and assign them to a vector array.</li></ul><p>At this step, if the Spline is drawn into the canvas, the positions can be outside the bounds of the desired texture. The spline needs to be transformed into canvas space.</p><blockquote>More informortion on how to draw the spline is below.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ApFGOtUBRgGEyKzFGvibng.png" /><figcaption>This image represents the logic behind the tool; the spline itself is not transformed.</figcaption></figure><p>The spline needs to be resized in proportion to the Canvas and for that,</p><ul><li>Calculate the Scale factor.</li><li>Use the Maximum size of the AABB (Axis Aligned Bounding Box), which is the largest between its height and length; it is obtained with the formula:</li></ul><pre><br>Float SizeAABB = Max( Max X - Min X, Max Y - Min Y)<br>// X is the width of the Spline<br>// Y is the height of the Spline</pre><blockquote>For the calculations of the spline, use the AABB, which is an imaginary square aligned to the axises, this is specially important when calculating the center reference of the Spline and align it to the canvas’s center.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*ouZLxol5KPD-PprpkcTHoQ.png" /><figcaption><em>Notice the difference between the center of both Bound Boxes.</em></figcaption></figure><blockquote>Another common mistake is calculating the centroid of the spline, this also results in wrong aligment specially with concave shapes.</blockquote><ul><li>Next, calculate the canvas&#39;s size. If the texture is square, the sizes X or Y will be the same for this part.</li><li>The scale factor is obtained by dividing the size of the AABB by the size of the canvas.</li></ul><pre>Float SizeAABB = Max( Max X - Min X, Max Y - Min Y)<br>// X is the width of the Spline<br>// Y is the height of the Spline<br><br>Float ScaleFactor = (SizeAABB / SizeCanvas)</pre><ul><li>Multiply a float to reduce the Spline to a lower scale to have a margin. Using a value of 0.9 will leave a margin of 10% when you draw the spline.</li><li>The scale factor is then multiplied by each of the Spline Positions Positions in the array.</li></ul><p>If the spline is drawn, its size will be proportional to the canvas, but the position is outside its bounds. Moving the spline requires calculating the Centers of its AABB and the Canvas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zVfh7BXkKBr7CMqE_6CHcw.png" /><figcaption>This image represents the logic behind the tool; the spline itself is not transformed.</figcaption></figure><ul><li>To calculate the Center of the AABB, use</li></ul><pre>Vector2 AABBCenter = (x: (Max X + Min X)/2 , y: (Max Y + Min Y /2))</pre><ul><li>To Calculate the Center of the Canva, use</li></ul><pre>Vector2 CanvasCenter = (x: CanvasRenderTarget.SizeX/2, y: CanvasRenderTarget.SizeY/2)</pre><ul><li>Move each Point Position by adding the difference between the canvas&#39;s and AABB&#39;s centers.</li></ul><pre>For Each element in the array SplinePointPositions:<br>  SplinePointPosition[index] = SplinePointPosition[index] + (CanvasCenter - AABBCenter)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rd5Jfb-xH5G5e46D3_cecg.png" /><figcaption>This image represents the logic behind the tool; the spline itself is not transformed.</figcaption></figure><p>All the points are inside the canvas, and the complete spline is centred. To draw the lines composing the spline into the Canvas.</p><ul><li>The <em>Canvas Render Target</em> must be clear before starting a new drawing, otherwise previous spline will be rendered into the output texture.</li><li>To start the drawing, call the node <em>Begin Draw Canvas to Render Target, </em>this will output a <em>Canvas Object Reference</em> that we can set into a new variable.</li><li>Then, use the Draw Line node and select the Canvas Object Reference as the target. The Canvas Object Reference is not the Canvas Render Target. Draw Line will accept two screen positions. Connect your first position of the array to the next.</li><li>Select the colour for the lines.</li><li>Once the Lines are drawn, end the drawing using the node <em>End Draw Canvas to Render Target.</em></li><li>Lastly, create the texture using the node<em> Render Target Create Static Texture Editor Only</em> and using the <em>Canvas Render Target</em> as Target, choose a name, and the output destination will be the same as the <em>Canvas Render Target</em> location.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*mZ-JsB8glvGBfqxwZmBbhQ.png" /><figcaption>The returned texture is stored in the same location as the Render Target.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*Am0MOqTG9MHL98WcR15N1Q.jpeg" /></figure><blockquote>This tool has a lot of opportunities for improvements that I will cover in a future story, but you can see the main logic behind it. One of the most interesting objectives is drawing a curve, there is not a node for that and I will have to manually calculate the position of each steps.<br>Thanks for reading,<br>Fidel.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2441f34bac4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spline Presets Tool in Unreal 5]]></title>
            <link>https://medium.com/@fidelhau/spline-presets-tool-e38cfc0f8342?source=rss-d4c452f933d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/e38cfc0f8342</guid>
            <category><![CDATA[unreal-engine]]></category>
            <category><![CDATA[technical-art]]></category>
            <category><![CDATA[techart]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[technical-artist]]></category>
            <dc:creator><![CDATA[Fidel Hau (Senior Tech Artist)]]></dc:creator>
            <pubDate>Fri, 14 Jun 2024 01:34:43 GMT</pubDate>
            <atom:updated>2024-07-04T14:10:15.114Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c15HyKJSJWzWjkelOmradw.jpeg" /></figure><h3>Spline Preset Tool in Unreal 5</h3><p>I needed a way to store my splines and reuse them elsewhere. Splines are now my little obsession; there are a lot of uses for them, but I couldn&#39;t find a way to save them or keep them as preset to spawn them in the world later.</p><p>So, I made this system to create… let&#39;s call them Presets. In reality, they are data assets with all the information from the spline that the tool later uses to recreate and spawn them.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FLdJO1qiH9Zk%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLdJO1qiH9Zk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FLdJO1qiH9Zk%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/744f17b181a28f75a09302d9ce20d2f2/href">https://medium.com/media/744f17b181a28f75a09302d9ce20d2f2/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QyZi7xOsfGHzGscpVsE1Mg.png" /></figure><blockquote>I like to use the ELI5 Technique<em>👨‍🏫</em> to explain some concepts, so you might see it in my articles</blockquote><p><strong>Main Objectives</strong></p><p>✅The tool allows the user to spawn a 2-point Spline Component into the world; it can be reshaped, and more points can be added.</p><p>✅The first selected asset with a Spline Component is stored in the selected folder as a preset (as a Data Asset).</p><p>✅A preset list allows the user to spawn the selected Spline.</p><p>✅The user can overwrite the selected preset with the spline chosen in the world.</p><p>✅The new spline has the same behaviour as any other.</p><p><strong>Technical Requirements</strong></p><ul><li>Common UI Plugin must be enabled</li><li>Made with Unreal 5.3.1</li></ul><p><strong>Best use cases</strong></p><p>1- To save a Spline information such as</p><ul><li>Number of Spline points</li><li>Location of the Spline Points</li><li>Rotation of the Spline Points</li><li>Tangents of the Spline Points</li><li>Type of the Spline Points</li><li>Closed Loop Value</li></ul><p>2- Information is saved in a Data Asset</p><p>3- To spawn a stored Spline into the world.</p><p>For some reason, the way to create a Spline in Unreal Engine 4 is to create your own Blueprint actor with a Spline Component. Then, you can drag it to your level and edit the Spline Points.</p><p>It took me some time to figure it out but to add more Spline Points; you need to click any one, click Alt, and move the point to create a new one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/1*n2nxoeZsqIrs-rJWQR46oQ.gif" /></figure><h4>What are the main components of a Spline?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*YCXENzLvy2OnfRzb2JkShA.png" /></figure><p>Each Spline is composed of a Spline Point array, and a Spline Point is a structure made from more values that define its behaviour.</p><ul><li><strong>Location</strong> is the position in local or world space of the Spline Point</li><li><strong>Rotation</strong></li><li><strong>Scale</strong></li><li><strong>Arrive Tangent</strong>. This vector defines the curvature with the previous Spline Point.</li><li><strong>Leave Tangent</strong>. This vector defines the curvature with the next Spline Point. (The curvature is controlled by the Leave and Arrive tangents of two Spline Points.)</li><li><strong>Type</strong> defines if the Spline is linear or if it accepts curves.</li><li><strong>Closed loop</strong> indicates if a new line between the last and the first Spline Point is true.</li></ul><blockquote>More parameters can be obtained from a Spline, but those are the most important to recreate it again. Duration, Default Up Vector and the colors can also be stored in a preset data asset.</blockquote><h4>Creating the Preset Data Asset</h4><p>What I&#39;m calling a Spline Preset is a Data Asset Blueprint in which we store the values from the selected Spline to use them again to recreate it somewhere else.</p><p>To make a Data Asset directly in the Editor, create a new Blueprint with the class <em>PrimaryDataAsset.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*drRUdBsm5zwiHpTF88lyNg.png" /></figure><p>Any logic is needed; only the variables to save the values from the Spline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*BZ7mYt8-d11KvYckAApNNA.png" /></figure><p>The SplinePoints are of the type SplinePoint array that already has location, rotation and scale.</p><blockquote>Notice that even when the <em>Type</em> for the SplinePoint is already saved in the SplinePoint structure, I’m creating a separate array for them. This is because the value needs to be obtained differently rather than directly accessing the SplinePoint.</blockquote><p>I will use this DataAsset Blueprint to create the presets.</p><p>Now that I have the two Blueprints needed—the Blueprint actor with a Spline Component and a Blueprint Data Asset—I can create the Presets.</p><p>The third one I’m using is an Editor Utility Widget.</p><p>These are the main functionalities of my tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*b8d3K-U6PPb8xFmdGaJnvQ.png" /></figure><ul><li><strong>Spawn New Spline</strong> creates and automatically selects a new Spline with two points in the level.</li><li><strong>Preset Name</strong> is the name of the file that will be created, starting with the prefix <em>Spline_Preset_</em></li><li><strong>Save As Preset</strong> saves the information of the first selected spline into a new preset; the file&#39;s location is defined directly in the Blueprint.</li><li><strong>Overwrite Preset</strong> replaces the values of the selected Spline Preset with those of the first selected spline.</li><li><strong>Spline Preset</strong> allows you to select from a list of available presets in the project.</li><li><strong>Create Spline From Preset</strong> spawns a new spline using the selected preset.</li></ul><p>The first step is very straightforward: calling the On Clicked function for the SpawnSpline button and spawning a new actor using the blueprint with the spline component as the class, then renaming the spawned actor and using the Editor Actor Subsystem immediately select it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QcbdVXgZgs-_ieBiSCJpdg.png" /></figure><p>After modifying the Spline to the desired state, a new preset file must be created to save the values.</p><p>To create a new asset in the project, use the Create Asset node and, connect Get Asset Tools as the target, specify the class for it in the Asset Class sections; in this case, I’m using the Data Asset with the Spline variables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9nZ63U0T315w_ZYhUFgsDg.png" /></figure><p>The preset is empty by default. For this purpose, I created a new function to get the values from the selected spline and save them in the preset.</p><p>This function is also called to overwrite a preset.</p><blockquote>One crucial part of Splines is that even though each spline point has a type and a variable accessible inside the structure, the value is obtained using the GetSplinePointType node, the type is what defines if the line between two points is a curve or a flat line. The rest of the values, like location and rotation, are saved directly from each Spline Point.</blockquote><p>This logic will result in a new Preset with the values from the selected Spline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zx0E-Daz6xiufiIRkygiYA.jpeg" /></figure><h4>Recreating the Spline from a Preset</h4><p>The Spline I use to recreate it from a preset derives from a Base blueprint with the Spline Component, but in this new blueprint, I added a new function in charge of adding points and assigning its new values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k8ZYpNSGdKh0pS4wfm-KKQ.jpeg" /></figure><p>This function is called when a preset is selected and the Create a Spline from Preset button is pushed.</p><p>The Preset is selected from an asset picker made using the <em>Single Property View</em> widget and then assigned to the Preset variable inside the function of the Spline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZLqP8RTWfNuZ_3aKSQ-9IA.png" /></figure><p>Following the steps will spawn a new Spline actor with the values from the selected preset.</p><blockquote>⚠️Important note: In the new blueprint check Overwrite Construction Script for the Spline Component, this indicates the spline has been modified from its default state, otherwise the Spline will become pink and result in weird behaviours.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*4aOhtG24c2Lq0pZ2FJBTdQ.png" /></figure><h4>Overwriting a Preset</h4><p>Overwriting a preset is practically the same process as creating one, but we use the value from the Single Property View (the selected preset) in the <em>Store Values to Preset</em> function. I added a <em>Show Message Dialog</em> to avoid accidentally overwriting a preset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GtKJxLU61Iet_8tyQE1BUQ.png" /></figure><blockquote>I’m a big fan of presets and shortcuts, whatever makes the pipeline faster is a good improvement. This tool helped me to solve a two basic problems; spawning a spline actor, just like I mentioned creating a blueprint with a Spline component seems to be the only way to do it, the second is sharing complex shapes between my levels. Once this logic is completed you can use the Spline at your needs, maybe creating a road path or attaching static meshes. Up to you, for me I will continue exploring possibilities with Splines.<br>Fidel.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e38cfc0f8342" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tips for developers to design successful iOS Stickers]]></title>
            <link>https://medium.com/@fidelhau/tips-for-developers-to-design-successful-imessage-stickers-c93dab94b1cf?source=rss-d4c452f933d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/c93dab94b1cf</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[game-design]]></category>
            <category><![CDATA[stickers]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Fidel Hau (Senior Tech Artist)]]></dc:creator>
            <pubDate>Mon, 14 May 2018 00:36:52 GMT</pubDate>
            <atom:updated>2018-05-14T00:39:28.634Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you seen all of the cool Stickers that iMessage offers? People love to use these cool expressions on their conversations, you can express feeling that words can´t say, after all, “<strong>a picture is worth a thousand words”.</strong></p><p>For our new update on the Appstore and celebrating the new iOS 11, we were ready to launch our first pack of animated stickers using our main character named <strong>“Ty the tiger”</strong>from our game <a href="https://itunes.apple.com/app/wooly-blast/id1200934994"><strong>Wooly Blast:Matching Puzzle</strong></a><strong> developed by TokyoPlay,</strong> which has received a lot of good reviews and acceptance in our targeted audience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BrdS-fj54-FC7O0m." /></figure><p>There is a <strong>series of tips</strong> I would like to share if you want to create your own pack of stickers for your game or app. It’s not that difficult as you may think, but you may require a certain knowledge of design and animation.</p><ul><li>Make a good design for your character. Make sure that very sticker is easy to identify in a white background, which is the color that most people have in their conversations. This can be a problem when your game main character is white. Consider the use of a dark stroke, hard shadows, recognizable shapes, and gestures.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Qv3j_B9qv7z35bKp." /></figure><ul><li>Don’t be afraid to change the original design of your character if it doesn’t look good when you use it as a sticker. Try making a simple versión of your character, famous licenses like Frozen or Angry Birds make this changes. Just try to make sure people relate the original with the sticker design.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jOkRjhSQAbgg_bIh." /></figure><ul><li>If you are planning to make animated stickers, consider the use of a 2D animation software like ToonBoom, Spine or Motion. I recommend that you use a Puppet base animation for your stickers.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/0*5Wd_3jDr19RrPjID." /></figure><ul><li>There are some important technical requirements that you need to follow if you want to create a Sticker pack in Xcode. Message support three sizes for your stickers and they need to <strong>weight less than 500KB. </strong>Unless you want to crash the message app every time someone tries to use your stickers.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/0*LCiISY59HfaXS6y4." /></figure><ul><li>What about formats? I recommend to use <strong>APNG</strong> if you are making animated stickers, you can export a sequence of images using a freeware software called “APNG anime maker”, just remember that even animations should weight less than 500KB.</li><li>You will be required to create a set of Sticker Pack Icons, these will be used in the AppStore and in the Sticker menu. These icons are very recognizable for their <strong>rectangular shape</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/0*cZn0u812Ekmulu1I." /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/0*jFFToZW8zWutgCNO." /></figure><p>Keep them simple and <strong>easy to capture the attention of your users.</strong> In our case, we use the original design of our character in the AppIcon, so people can easily relate our game with the stickers. We tried to center the attention of the composition with the use of visual lines made by our cubes and background.</p><p>Once you have your animated stickers and your set of App Icons, you are ready to create a sticker pack in Xcode. You can follow a video tutorial provided by Apple with the instructions for Xcode.</p><p>I’m sure stickers still have a long way, they are simple and cute, that’s why I’m really excited for the new animojis in iOS11.</p><p><a href="http://woolyblast.com/">Wooly Blast: Matching puzzle</a> is our second mobile game developed by TokyoPlay. Available on the AppStore and Google Play.</p><p>#gamedev #mobilegames #iOS11 #appstore #apple #stickers #LinkedInLearning #design #gamedesign</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c93dab94b1cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>