<?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 Chandika Prabhashwara on Medium]]></title>
        <description><![CDATA[Stories by Chandika Prabhashwara on Medium]]></description>
        <link>https://medium.com/@lwcprabhashwara?source=rss-4f0466dd5443------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RlRH1_2ITGzZ4DKfmMzDfQ.png</url>
            <title>Stories by Chandika Prabhashwara on Medium</title>
            <link>https://medium.com/@lwcprabhashwara?source=rss-4f0466dd5443------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 18:46:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lwcprabhashwara/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[Matching Mesh Orientation in Houdini with PCA and Dihedral Rotation]]></title>
            <link>https://medium.com/@lwcprabhashwara/matching-mesh-orientation-in-houdini-with-pca-and-dihedral-rotation-1f034d07b783?source=rss-4f0466dd5443------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f034d07b783</guid>
            <category><![CDATA[houdini]]></category>
            <category><![CDATA[pipelinetools]]></category>
            <category><![CDATA[geometry-processing]]></category>
            <category><![CDATA[technical-art]]></category>
            <category><![CDATA[vex]]></category>
            <dc:creator><![CDATA[Chandika Prabhashwara]]></dc:creator>
            <pubDate>Sat, 10 Oct 2026 19:36:05 GMT</pubDate>
            <atom:updated>2026-10-10T19:36:05.938Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>A procedural approach for finding a meaningful orientation from arbitrary geometry and matching it to a target mesh.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uc6f44RVrmC4IAFE29cX0A.png" /></figure><h3>Introduction</h3><p>While working on a procedural geometry workflow in Houdini, I ran into a problem that initially seemed surprisingly simple:</p><p><strong>How do you reliably match the orientation of one arbitrary mesh to another?</strong></p><p>The goal was to take meshes from their existing world-space positions and orientations and bring them into a consistent coordinate space — specifically, aligning them to a common axis and position.</p><p>Houdini provides powerful tools for manipulating transforms, and there are convenient ways to match properties such as scale. However, I couldn’t find a straightforward, general-purpose approach for answering a more fundamental question:</p><blockquote><strong><em>Given two arbitrary meshes, how can we determine their meaningful orientations and make one match the other?</em></strong></blockquote><p>The challenge becomes especially apparent when the meshes don’t already have a clean transform axis that can simply be copied.</p><p>So instead of trying to infer orientation from an arbitrary vertex or manually define two points, I started looking for a way to derive an orientation <strong>from the geometry itself</strong>.</p><p>That led me to two concepts:</p><p><strong>Principal Component Analysis (PCA)</strong> and Houdini’s <strong>dihedral()</strong> function.</p><h3>2. The Problem</h3><p>Imagine having a source mesh:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*j6-QweBXV06vB70K9Ey3Nw.png" /></figure><p>and a target mesh:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*f0ken2g039WuhpN6rGN0oQ.png" /></figure><p>They may represent similar objects, but their world-space orientations can be completely different.</p><p>The desired result is:</p><pre>Source Mesh<br>     │<br>     │ determine orientation<br>     ▼<br>Source Direction<br>     │<br>     │ match<br>     ▼<br>Target Direction<br>     │<br>     ▼<br>Aligned Source Mesh</pre><p>The problem is that a mesh doesn’t inherently contain a single vector that says:</p><blockquote><em>“This is my forward direction.”</em></blockquote><p>You need to derive one.</p><h3>3. The First Discovery: dihedral()</h3><p>While investigating how to perform the actual rotation, I came across a very useful VEX function:</p><blockquote><em>dihedral()</em></blockquote><p>Houdini describes it as a function that computes the rotation matrix or quaternion that rotates vector <strong>A</strong> onto vector <strong>B</strong>.</p><p>Conceptually:</p><blockquote>A → B</blockquote><p>This was exactly the mathematical operation I needed.</p><p>If I could determine:</p><ul><li>a meaningful direction for the source mesh</li><li>a meaningful direction for the target mesh</li></ul><p>then the orientation problem could be reduced to:</p><blockquote>Source Direction → Target Direction</blockquote><p>The difficult part was therefore no longer the rotation.</p><p><strong>The difficult part was finding those two directions.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*D5pRqeEQND1oKhMjuA8tLQ.png" /></figure><h3>4. The Question: How Do We Find a Meaningful Direction?</h3><p>Initially, one obvious solution was to manually choose two points:</p><pre>Point A -------------------- Point B</pre><p>and use:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/126/1*lMmt73a1vgC_FZ_vimy4ug.png" /></figure><p>This works, but it introduces a significant problem.</p><p>For every new mesh, you need to know which two points represent its orientation.</p><p>That makes the workflow:</p><ul><li>manual</li><li>dependent on point numbering</li><li>difficult to generalize</li><li>unsuitable for a procedural pipeline</li></ul><p>I wanted the geometry itself to determine its orientation.</p><p>That’s where <strong>Principal Component Analysis</strong> became useful.</p><h3>5. Using PCA to Understand the Geometry</h3><p>PCA is commonly used for dimensionality reduction and statistical analysis, but it can also be very useful for geometry processing.</p><p>The basic idea is that PCA identifies the directions in which a collection of points has the greatest variation.</p><p>For an elongated mesh, the first principal component generally follows its dominant direction.</p><p>Conceptually:</p><pre>PCA direction<br>                      →<br>        __________________________<br>      /                            \<br>     /                              \<br>    |                                |<br>     \                              /<br>      \____________________________/</pre><p>Instead of manually deciding which points define the object’s direction, the geometry can determine it statistically.</p><p>The first principal component becomes a candidate for the object’s dominant orientation.</p><h3>6. Why the Convex Hull?</h3><p>Rather than directly using every point in the original mesh, I first derive a <strong>convex hull</strong>.</p><p>The convex hull provides a simplified representation of the overall spatial distribution of the geometry.</p><p>This is useful because the orientation I’m interested in is not necessarily determined by small details such as:</p><ul><li>topology</li><li>surface noise</li><li>local features</li><li>individual protrusions</li></ul><p>I’m interested in the <strong>overall spatial form</strong>.</p><p>The workflow therefore becomes:</p><pre>Original Mesh<br>      │<br>      ▼<br>  Convex Hull<br>      │<br>      ▼<br>      PCA<br>      │<br>      ▼<br>Dominant Direction</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*Zhxqa9Ulaf_dlqn6sDXf2w.png" /><figcaption>original detailed mesh</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*v6TJWhFMpsk4kFuygJwCig.png" /><figcaption>Convex hull with its PCA direction represented as a line.</figcaption></figure><h3>7. From PCA to a Usable Line</h3><p>For my workflow, I wanted something very simple:</p><blockquote><strong><em>A line represented by two points that describes the mesh’s dominant orientation.</em></strong></blockquote><p>So after determining the principal direction, I generate a line with exactly two samples.</p><p>Conceptually:</p><pre>Convex Hull</pre><pre>      __________________<br>    /                    \<br>   /                      \<br>  |     •------------•     |<br>   \                      /<br>    \____________________/</pre><pre>        PCA Line</pre><p>Those two points now give me a practical representation of the mesh orientation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/141/1*WQ8PfZnNUpwb_8nXKiLNSA.png" /></figure><p>This is much more useful downstream than simply having an abstract PCA vector.</p><p>It gives the rest of the procedural system something tangible to work with.</p><h3>8. Apply the Same Process to the Target</h3><p>The important part is that the same process can be applied to the target mesh.</p><p>So both meshes go through the same procedure:</p><pre>SOURCE                              TARGET</pre><pre>Source Mesh                         Target Mesh<br>     │                                   │<br>     ▼                                   ▼<br>Convex Hull                         Convex Hull<br>     │                                   │<br>     ▼                                   ▼<br>    PCA                                 PCA<br>     │                                   │<br>     ▼                                   ▼<br>2-point PCA Line                    2-point PCA Line<br>     │                                   │<br>     └──────────────┐   ┌────────────────┘<br>                    │   │<br>                    ▼   ▼<br>               Orientation<br>                  Match</pre><p>Now I have:</p><pre>Source Direction<br>       ↓<br>       A</pre><pre>Target Direction<br>       ↓<br>       B</pre><p>And this is where dihedral() becomes useful.</p><h3>9. Matching the Orientations</h3><p>The source direction and target direction can now be passed to the rotation calculation.</p><p>Conceptually:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*h_BDf4fHFrPGvqKeDwZmyg.png" /></figure><p>The resulting rotation transforms the source orientation into the target orientation.</p><p>So instead of saying:</p><blockquote><em>“Rotate this object 37° around Y and 18° around Z.”</em></blockquote><p>the system simply says:</p><blockquote><em>“Take the orientation represented by this geometry and make it match the orientation represented by that geometry.”</em></blockquote><p>That makes the approach much more procedural.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kWT2PTM5qltS-YfzgD8zZw.png" /></figure><h3>10. The Complete Approach</h3><p>The final methodology can be summarized as:</p><pre>          SOURCE MESH<br>               │<br>               ▼<br>          Convex Hull<br>               │<br>               ▼<br>              PCA<br>               │<br>               ▼<br>        2-Point PCA Line<br>               │<br>               │<br>               ▼<br>        Source Direction<br>               │<br>               │<br>               │   dihedral()<br>               │<br>               ▼<br>        Target Direction<br>               ▲<br>               │<br>        2-Point PCA Line<br>               ▲<br>               │<br>              PCA<br>               ▲<br>               │<br>          Convex Hull<br>               ▲<br>               │<br>          TARGET MESH</pre><p>The result is a reusable way of deriving and matching orientation <strong>directly from geometry</strong>.</p><h3>11. Why This Approach Is Useful</h3><p>The main advantage isn’t simply that it can rotate a mesh.</p><p>The advantage is that it removes a manual dependency.</p><h3>Traditional approach</h3><pre>Mesh<br> ↓<br>Inspect geometry<br> ↓<br>Find suitable points<br> ↓<br>Manually define A and B<br> ↓<br>Calculate direction<br> ↓<br>Rotate</pre><h3>Procedural approach</h3><pre>Mesh<br> ↓<br>Convex Hull<br> ↓<br>PCA<br> ↓<br>Orientation<br> ↓<br>Automatic alignment</pre><p>This makes the workflow much more suitable for:</p><ul><li>procedural asset processing</li><li>batch processing</li><li>geometry normalization</li><li>asset preparation</li><li>automated pipelines</li><li>Houdini HDAs</li><li>large collections of differently oriented meshes</li></ul><p>And because the orientation is derived from the geometry, the method doesn’t depend on a specific point number or manually authored transform.</p><h3>12. An Important Limitation</h3><p>PCA doesn’t necessarily describe what an artist would consider the object’s “forward” direction.</p><p>It describes the <strong>direction of greatest variance</strong> in the point distribution.</p><p>For an elongated object, these are often the same thing.</p><p>But for a roughly spherical or highly irregular object, the principal direction may not correspond to a meaningful artistic orientation.</p><p>There may simply not be a strong dominant axis.</p><p>So I see this approach as a solution for <strong>geometry where a meaningful dominant spatial direction exists</strong>, rather than a universal definition of orientation for every possible mesh.</p><p>That’s also one of the interesting things about technical art: sometimes the most useful solution isn’t a new algorithm, but finding the right mathematical representation of the problem.</p><h3>13. Turning It Into a Houdini HDA</h3><p>After establishing the method, I packaged the workflow into a Houdini Digital Asset.</p><p>The HDA only requires two inputs:</p><pre>Input 0 → Source Geometry<br>Input 1 → Target Geometry</pre><p>The internal process automatically derives the orientation from both geometries and performs the matching.</p><p>This keeps the interface simple while hiding the underlying geometric analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t4TCNKxKfB_t-TzKFWWg5A.png" /></figure><h3>14. Final Result</h3><p>The final workflow gives me a way to take differently oriented meshes and bring them into a consistent orientation based on their own geometry.</p><p>What started as:</p><blockquote><em>“How do I manually find two points that describe this object’s orientation?”</em></blockquote><p>became:</p><blockquote><em>“Can the geometry itself determine its dominant orientation?”</em></blockquote><p>And that led to:</p><p><strong>Convex Hull → PCA → 2-Point Orientation Line → Dihedral Rotation → Orientation Match</strong></p><p>This approach was developed specifically to solve a pipeline problem I encountered in a real Houdini workflow, but I found the underlying idea useful enough to turn into a reusable procedural tool.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f034d07b783" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fixing the “Cannot find procedure ‘asLabel’” Error in Advanced Skeleton (Maya)]]></title>
            <link>https://medium.com/@lwcprabhashwara/fixing-the-cannot-find-procedure-aslabel-error-in-advanced-skeleton-maya-feb165a9ba4f?source=rss-4f0466dd5443------2</link>
            <guid isPermaLink="false">https://medium.com/p/feb165a9ba4f</guid>
            <category><![CDATA[technical-artist]]></category>
            <category><![CDATA[advanced-skeleton]]></category>
            <category><![CDATA[maya-rigging]]></category>
            <category><![CDATA[3d-animation]]></category>
            <category><![CDATA[autodesk-maya]]></category>
            <dc:creator><![CDATA[Chandika Prabhashwara]]></dc:creator>
            <pubDate>Mon, 04 May 2026 08:56:01 GMT</pubDate>
            <atom:updated>2026-05-04T08:56:01.342Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview</h3><p>While working with <strong>Advanced Skeleton</strong> in Autodesk Maya, you may encounter the following error when using the <strong>Biped → Bake FK to IK</strong> function:</p><blockquote><strong><em>Error:</em></strong><em> </em><em>Cannot find procedure &quot;asLabel&quot;</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/252/1*GBBOXpq56CVqJ9n5xvLcWw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yxbMbUC8daCMmF1y3-EO0w.png" /></figure><p>This error is confusing because it appears without any clear documentation or solutions in forums. After investigation, the issue turns out not to be a broken rig or installation problem, but a <strong>tool initialization issue</strong>.</p><h3>Root Cause</h3><p>The error occurs when the <strong>Advanced Skeleton UI has not been initialized</strong> before using certain biped tools.</p><p>Some Advanced Skeleton procedures (including asLabel) are only loaded <strong>when the Advanced Skeleton window is opened</strong>. If you directly access the Biped menu and try to bake FK to IK without opening the main UI, Maya cannot find the required procedure.</p><h3>Solution</h3><p>The fix is simple: <strong>open the Advanced Skeleton window first</strong> before performing the bake operation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*yfxFIXMGgfqxfx9WHxb2uA.png" /></figure><h3>Step-by-Step Fix</h3><ol><li><strong>Open Maya</strong></li></ol><ul><li>Load your scene with the Advanced Skeleton biped rig.</li></ul><p><strong>2. Open Advanced Skeleton UI</strong></p><ul><li>Go to:</li></ul><pre>AdvancedSkeleton → Advanced Skeleton</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/1*EyR44tcKnUJEph5rl4Zysw.png" /></figure><ul><li>Make sure the Advanced Skeleton window opens fully.</li></ul><p><strong>3. Access the Biped Menu</strong></p><ul><li>Navigate to:</li></ul><pre>AdvancedSkeleton → Biped</pre><p><strong>4. Bake FK to IK</strong></p><ul><li>Choose <strong>Bake FK to IK</strong> (or IK to FK as needed).</li><li>The operation should now run without errors.</li></ul><h3>Why This Works</h3><p>Opening the Advanced Skeleton window initializes and loads all required internal MEL/Python procedures, including asLabel. Without this initialization step, some biped-related tools fail silently and trigger missing-procedure errors.</p><h3>Conclusion</h3><p>If you encounter the <strong>“Cannot find procedure ‘asLabel’”</strong> error in Advanced Skeleton:</p><p>✔️ <strong>Always open the Advanced Skeleton window first</strong><br> ✔️ Then proceed with Biped baking operations</p><p>This small step can save significant debugging time and avoids unnecessary reinstallation or rig rebuilding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=feb165a9ba4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Fix Invisible TextMesh Pro Text on Transparent Materials in Unity]]></title>
            <link>https://medium.com/@lwcprabhashwara/how-to-fix-invisible-textmesh-pro-text-on-transparent-materials-in-unity-3be90fcb360d?source=rss-4f0466dd5443------2</link>
            <guid isPermaLink="false">https://medium.com/p/3be90fcb360d</guid>
            <dc:creator><![CDATA[Chandika Prabhashwara]]></dc:creator>
            <pubDate>Sun, 17 Mar 2024 03:15:03 GMT</pubDate>
            <atom:updated>2024-03-17T03:15:03.362Z</atom:updated>
            <content:encoded><![CDATA[<p>Creating augmented reality (AR) projects in Unity offers endless possibilities for innovation and creativity. However, sometimes, unexpected issues can arise, such as the one I encountered with TextMesh Pro text becoming invisible when placed on transparent materials. After scouring various forums for a solution, I found a simple yet effective fix that involves adjusting the “Order in Layer” setting in the TextMesh Pro component. In this article, I’ll walk you through the problem and its solution, step-by-step.</p><h4>The Problem</h4><p>When working on an AR project in Unity (version 2021.3.17f1), I came across an issue where TextMesh Pro text would become invisible when placed on a transparent material. This was particularly frustrating, as the text was crucial for the user interface of my AR application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*-YbkppXPOduI5iFw-1Cbcw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*JshIC_fQkNEsd7VYO744Tg.png" /></figure><h4>The Investigation</h4><p>After extensive research and testing different settings, I realized that the issue was related to how Unity renders layers and handles transparency. The TextMesh Pro text was being rendered behind the transparent material, making it invisible to the camera.</p><h4>The Solution</h4><p>The fix for this issue is surprisingly simple. It involves changing the “Order in Layer” setting in the TextMesh Pro component under the “Extra Settings” section. By default, this value is set to 0, which can cause rendering issues with transparent materials. To resolve the invisibility problem, follow these steps:</p><ol><li><strong>Select the TextMesh Pro GameObject</strong>: Navigate to the hierarchy and click on the GameObject that contains your TextMesh Pro text.</li><li><strong>Open the TextMesh Pro Component</strong>: In the Inspector window, find the TextMesh Pro — Text component. Scroll down to the “Extra Settings” section.</li><li><strong>Adjust the Order in Layer</strong>: Change the “Order in Layer” setting from 0 to a value greater than 0. This will ensure that the TextMesh Pro text is rendered on top of the transparent material, making it visible.</li><li><strong>Apply and Test</strong>: After adjusting the setting, play your scene to test if the TextMesh Pro text is now visible over the transparent material.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*y3JkT0q0XtZagEU0m1pB0g.png" /></figure><h4>Conclusion</h4><p>This simple fix can save a lot of time and frustration when working with TextMesh Pro text and transparent materials in Unity. By understanding how Unity’s rendering order works and adjusting the “Order in Layer” setting accordingly, you can ensure that your text remains visible, maintaining the integrity of your AR project’s user interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*UfCxOwG9ec2sBQmTzygecA.png" /></figure><p>Remember, when encountering issues in Unity, sometimes the solution is as straightforward as tweaking a single setting. Keep experimenting, and don’t hesitate to dive into forums and the Unity documentation for insights and solutions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3be90fcb360d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>