<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tâm Trần Ngọc</title>
    <description>The latest articles on DEV Community by Tâm Trần Ngọc (@tamtranngoc).</description>
    <link>https://dev.to/tamtranngoc</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3784621%2F58c75d52-86ac-4c6c-9fdc-55c0d01d931f.png</url>
      <title>DEV Community: Tâm Trần Ngọc</title>
      <link>https://dev.to/tamtranngoc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tamtranngoc"/>
    <language>en</language>
    <item>
      <title>I Let Two Gradients Do All the Terrain Coloring for Me — Here's How It Works</title>
      <dc:creator>Tâm Trần Ngọc</dc:creator>
      <pubDate>Wed, 18 Mar 2026 11:43:35 +0000</pubDate>
      <link>https://dev.to/tamtranngoc/i-let-two-gradients-do-all-the-terrain-coloring-for-me-heres-how-it-works-gi7</link>
      <guid>https://dev.to/tamtranngoc/i-let-two-gradients-do-all-the-terrain-coloring-for-me-heres-how-it-works-gi7</guid>
      <description>&lt;p&gt;Been working with &lt;a href="https://assetstore.unity.com/packages/tools/terrain/polaris-summit-low-poly-terrain-tool-286886" rel="noopener noreferrer"&gt;Polaris&lt;/a&gt; for terrain in Unity and wanted to share one of its shading modes that I keep coming back to — Gradient Lookup.&lt;/p&gt;

&lt;p&gt;The idea is straightforward. Instead of building a splat map stack or painting texture layers by hand, two gradients drive the entire terrain color.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Color By Normal&lt;/strong&gt; reads the surface slope. A face pointing straight up is flat ground — a face pointing sideways is a cliff. Map colors across that range and your terrain automatically separates cliffs from flat areas without any manual painting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Color By Height&lt;/strong&gt; reads elevation. Bottom of the gradient is the lowest point of your terrain, top is the highest. Set your altitude zones — sand, grass, rock, snow — and every part of the terrain picks up the right color automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Blend By Height&lt;/strong&gt; is a curve that controls which gradient wins at each elevation. Keep it low at the bottom and top so height color dominates — pure sand at the riverbed, pure snow at the peaks. Raise it in the mid-range so the slope gradient takes over where cliffs are most prominent.&lt;/p&gt;

&lt;h2&gt;
  
  
  The catch to watch for
&lt;/h2&gt;

&lt;p&gt;The gradients map across your terrain's full height range, not just where your sculpt actually sits. If your terrain never reaches its maximum height setting, the upper gradient colors never appear. Adjust your gradient stops to match where your terrain actually lives.&lt;/p&gt;

&lt;h2&gt;
  
  
  On top of that
&lt;/h2&gt;

&lt;p&gt;You can paint an albedo map and a metallic map over the gradient result for close-up detail — dirt paths, mossy patches, wet rocks. The gradient handles the broad color, the painted maps handle the finishing touches.&lt;/p&gt;

&lt;p&gt;Full tutorial with the complete walkthrough: &lt;a href="https://youtu.be/L02TODoxHEk" rel="noopener noreferrer"&gt;Youtube&lt;/a&gt;&lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>gamedev</category>
      <category>indiedev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Why mesh terrain is often a better choice than Unity terrain for stylized mobile projects</title>
      <dc:creator>Tâm Trần Ngọc</dc:creator>
      <pubDate>Sun, 22 Feb 2026 06:47:08 +0000</pubDate>
      <link>https://dev.to/tamtranngoc/why-mesh-terrain-is-often-a-better-choice-than-unity-terrain-for-stylized-mobile-projects-1hja</link>
      <guid>https://dev.to/tamtranngoc/why-mesh-terrain-is-often-a-better-choice-than-unity-terrain-for-stylized-mobile-projects-1hja</guid>
      <description>&lt;p&gt;Unity’s built-in Terrain system is powerful. It has years of tooling behind it: sculpting, painting, vegetation, LOD, detail maps.&lt;br&gt;
But it was designed around one core assumption:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Terrain is a heightmap rendered as a smooth surface.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That assumption becomes a constraint when your project does not want smooth terrain.&lt;/p&gt;

&lt;h2&gt;
  
  
  The core limitation: Heightmap-locked topology
&lt;/h2&gt;

&lt;p&gt;Unity Terrain is fundamentally a heightmap grid:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vertex density is tied directly to heightmap resolution.&lt;/li&gt;
&lt;li&gt;Topology is uniform across the entire terrain.&lt;/li&gt;
&lt;li&gt;Normals are generated for smooth shading by default.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want a &lt;strong&gt;faceted low poly look&lt;/strong&gt;, you are fighting the system.&lt;br&gt;
You can fake flat shading in shaders, but:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Geometry shaders are not available on most mobile targets.&lt;/li&gt;
&lt;li&gt;Even when available, they are not ideal for performance-sensitive projects.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So you end up with a mismatch:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The engine assumes smooth terrain.&lt;/li&gt;
&lt;li&gt;The art direction requires faceted geometry.
That mismatch is what led me to explore &lt;strong&gt;mesh terrain&lt;/strong&gt; instead.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is Mesh Terrain?
&lt;/h2&gt;

&lt;p&gt;A mesh terrain system does not rely on Unity’s built-in heightmap renderer.&lt;br&gt;
Instead, it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generates a regular mesh from height data.&lt;/li&gt;
&lt;li&gt;Controls topology explicitly.&lt;/li&gt;
&lt;li&gt;Can duplicate vertices per triangle to guarantee hard edges.&lt;/li&gt;
&lt;li&gt;Decouples polygon density from heightmap resolution.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This makes a major difference.&lt;br&gt;
With mesh terrain, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Preserve true flat shading.&lt;/li&gt;
&lt;li&gt;Control where polygons are dense and where they are sparse.&lt;/li&gt;
&lt;li&gt;Optimize specifically for stylized or mobile environments.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why this matters for mobile
&lt;/h2&gt;

&lt;p&gt;Mobile platforms amplify these constraints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Geometry shaders are largely unavailable.&lt;/li&gt;
&lt;li&gt;Overdraw and fragment cost matter.&lt;/li&gt;
&lt;li&gt;Uniform high vertex density wastes performance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A mesh terrain approach allows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Explicit triangle budgeting.&lt;/li&gt;
&lt;li&gt;Dynamic polygon density.&lt;/li&gt;
&lt;li&gt;Clean faceted normals without shader tricks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That makes mesh terrain particularly suitable for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Low poly games&lt;/li&gt;
&lt;li&gt;Stylized environments&lt;/li&gt;
&lt;li&gt;Mobile and VR projects&lt;/li&gt;
&lt;li&gt;Projects that require predictable geometry&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where Polaris fits in
&lt;/h2&gt;

&lt;p&gt;This exploration eventually became &lt;strong&gt;Polaris&lt;/strong&gt;.&lt;br&gt;
Polaris is a &lt;strong&gt;mesh terrain system for Unity&lt;/strong&gt; designed specifically for faceted and stylized environments.&lt;br&gt;
Instead of wrapping Unity Terrain, Polaris:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generates terrain as mesh geometry.&lt;/li&gt;
&lt;li&gt;Allows dynamic polygon density.&lt;/li&gt;
&lt;li&gt;Preserves flat shading by design.&lt;/li&gt;
&lt;li&gt;Avoids reliance on geometry shaders.&lt;/li&gt;
&lt;li&gt;Targets workflows where topology control matters.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In short:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Polaris exists because mesh terrain solves problems that heightmap terrain does not.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is not a shader trick layered on top of Unity Terrain.&lt;br&gt;
It is a topology-first terrain system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tradeoffs (because there are always tradeoffs)
&lt;/h2&gt;

&lt;p&gt;Unity Terrain still has advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mature ecosystem.&lt;/li&gt;
&lt;li&gt;Built-in vegetation and detail workflows.&lt;/li&gt;
&lt;li&gt;Strong tooling for realistic environments.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For desktop projects targeting realistic smooth landscapes, Unity Terrain combined with shader-based stylization can still be sufficient.&lt;/p&gt;

&lt;p&gt;But when your goal is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Explicit faceted geometry&lt;/li&gt;
&lt;li&gt;Mobile compatibility&lt;/li&gt;
&lt;li&gt;Polygon density control&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A mesh terrain system becomes a cleaner solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;Mesh terrain is not universally “better” than Unity Terrain.&lt;br&gt;
It is better when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Geometry style matters more than heightmap convenience.&lt;/li&gt;
&lt;li&gt;You need true faceted shading.&lt;/li&gt;
&lt;li&gt;You care about triangle distribution.&lt;/li&gt;
&lt;li&gt;You target mobile or performance-constrained platforms.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is the space Polaris was built for.&lt;br&gt;
If you’re interested in the longer development story behind building a mesh terrain system from scratch, I wrote about it here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.pinwheelstud.io/post/why-i-ended-up-building-a-mesh-terrain-instead-of-using-unity-terrain" rel="noopener noreferrer"&gt;👉 Original article on Pinwheel Studio&lt;/a&gt;&lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>terrain</category>
      <category>lowpoly</category>
      <category>gamedev</category>
    </item>
  </channel>
</rss>
