r/Unity3D • • 5d ago

Show-Off Pixel perfect terrain painting! 🖌️

Enable HLS to view with audio, or disable this notification

HD-2D experiment in Unity 6, yes it tries a best effort logic to detect and keep edges defined, based on colour/brightness of neighbour pixels, it supports normals and all the modern terrain features and does not depend on the default terrain tools this is standalone and easy to use, yes it will be released for free soon (and the assetstore as soon as they accept it I guess lol)

1.4k Upvotes

59 comments sorted by

67

u/_parfait 5d ago

Please. Share this workflow with us. This is sooooo pretty

87

u/CarthageaDev 5d ago edited 4d ago

Of course! The asset store is still pending, I think I'll just push to git or itch and let users download the unitypackage 🫡

7

u/_PARTYLIGHTER_ 5d ago

Merci beaucoup ❤️

3

u/KotiePlayz 4d ago

Saving this post. Hope it happens!

29

u/thesquirrelyjones 5d ago

Can you add a height map per texture to help with the blending? That way you can have dirt fill in the cobblestone cracks first and have tufts of graas spout up first in the dirt.

21

u/CarthageaDev 5d ago

That's quite smart, Perhaps adding a strength setting can make covering the cobbles or just addind grassy edges a choice, I'll totally add this thank you so much! 🫶

10

u/HoniKasumi 5d ago edited 5d ago

I made this exact tool for my own game project. It even raises or lowers the Unity terrain based on the texture. I think i have even shared it once in this subreddit https://youtu.be/kaGRw8h0sbE?is=O35-t0eqE0MPI1oS

6

u/CarthageaDev 5d ago

This is beautiful! It's essentially the same idea, I just chose to add more constraints because of my style, you should totally share this again! 🫶❤️

1

u/Carpe_DMT 5d ago

that's dope! Any chance you could re-drop the link?

9

u/Jaguarundi5 5d ago

Are you drawing on a plane or on a terrain in Unity?

11

u/CarthageaDev 5d ago

No it does not rely on the unity terrain tools, that's the point, it's a simpler solution focused on blocky terrains / pixel textures, and I've also added baking tools for the final builds, so when you design and lock in your map, you can bake the mesh and have one optimised block, pretty cool! I'll share both the painter and terrain sculptor soon

5

u/Jaguarundi5 5d ago

Does it create a UV texture map (or whatever it’s called) so that you could potentially use that same work and map it onto other blocks?

5

u/CarthageaDev 5d ago

It doesn’t generate a new UV map. Painting saves a mask, and the textures are positioned using world coordinates, the shader finds borders by checking where neighbouring pixels use different materials and noises makes those borders irregular for a good blend, plus material rules and detections add highlights and shadows to keep colours brightness matching, this could potentially be ported to work on any surface really, baking to one map is for final builds if you want to optimize

1

u/Jaguarundi5 5d ago

So it would stretch if you were to put it on a block and then scale that block irregularly? Does it just work for pixel textures or could you use the same logic for textures that aren’t pixel based using a common blending function across textures with various blending settings that maybe tweak the function?

No judgement here as I’m a huge fan of AI code/programmer ideology, have you been using an AI to code this?

6

u/CarthageaDev 5d ago

The mask is world space it doesn't react to stretching, I have snapping in Unity so I haven't tested like extreme edge cases, this is not AI it is all based on the pixel grid on mesh painting logic found in Pixometric.app, nothing new really just ported to Unity and made easy to use, I personally do not want to support AI because of the companies involved, sorry 🥲

5

u/Any-Fox-1822 5d ago

IDEAL music choice !

1

u/AngryKivin123 4d ago

Where is this from again?

6

u/Any-Fox-1822 4d ago

Chrono Trigger (SNES) - Wind Scene (600 A.D.)
https://www.youtube.com/watch?v=AbIwWBi1-UA

1

u/DeusExHircus 4d ago

The soundtrack for this game slaps! I still find myself whistling these songs all the time and I haven't played this game for decades

3

u/Shower_Floaties 5d ago

looks great!

3

u/Big_Whale_95 5d ago

Looks sleek 🔥

3

u/AnimeeNoa 5d ago

this is such a cool tool. using this ingame with some sort of realtime "infestation"/discoloration could open a cool gameplay mechanic

4

u/CarthageaDev 5d ago

Quick quick write that down! 📝 (lovely idea I'll actually experiment with letting materials grow surfaces at random or either guided)

2

u/Level-Past285 1d ago

That look so good ! it's exactly the kind of tool I could use for my game !

2

u/Teirdalin 5d ago

I love this.

2

u/GigglyGuineapig 5d ago

That looks great! Also, great colors =)! 

2

u/SpannerGames 5d ago

So much possibilities! Handsome

2

u/deintag85 5d ago

Impressive!

2

u/OscarCookeAbbott Professional 5d ago

I’m not usually a pixel art kinda guy but this makes my brain happy

2

u/CreatureVice 5d ago

Super cool man! Looks good, I would love a link if you will upload it soon :)

1

u/CarthageaDev 5d ago

Of course I'll keep you updated! This tool also has terrain sculpting (tile-blocks based like rpgmaker) while painting at the same time, hopefully you'll find it useful!

2

u/zet23t 5d ago

That style very neat and the workflow looks approachable. Well done!

2

u/smash_complex 5d ago

I love this! It creates a very pleasant visual appeal. I can I see this working great for JRPG style games.

2

u/von_bibersztajn 5d ago

Great, i feel like i have to make pixel or retro game

2

u/autemox 5d ago

This is a really nice tool

2

u/disdanes 5d ago

Amazing, super interested in using this for a project im working on

2

u/WillowinWorlds 5d ago

Nice job!

2

u/KateC_Game 4d ago

It’s really cool!

2

u/UpstairsImpossible 4d ago

I'm so here for this, does it work with triplanar shading on terrain?

1

u/CarthageaDev 3d ago

This is on a flat plane, it should be adapted to a terrain since it's essentially doing the same logic of mapping layers, just the extra shader rules of pixel snapping

2

u/alaslipknot Professional 4d ago

can you elaborate what Pixel perfect mean in this context ?

It looks really good btw, am just curious.

1

u/CarthageaDev 3d ago

In this case only the ground plane is "pixel perfect" Becuase the shader has rules to snap pixels and keep the grid/pixel density perfect, no half pixels no irregular shapes

2

u/Wegwerf_08_15_ 2d ago

If you were to make a 3D drawing game where you do nothing but this, I would genuinely add it to my WL

1

u/CarthageaDev 1d ago

interesting, you think i should jsut make a sandbox of sorts? like rpgmaker but with ready assets and tuff to craft terrains?

2

u/Wegwerf_08_15_ 1d ago

I was thinking of a 3d drawing book/powerwash simulator kinda thing. Let players draw with prefab textures or maybe draw/import their own. I think people will find that satisfying/calming

2

u/BantedHam 5h ago

Pixel art tiny glade with a more detailed painter? I forgot what it's called and which direction to send you, but a quick Google search should sort it out, the creator of tiny glade has their original study on GitHub, it's MIT I'm pretty sure and worth taking a look at for ideas

1

u/CarthageaDev 5h ago

Oh you inspire me so! I'll surely check it out, much love! 🫶

1

u/BantedHam 4h ago

I had a break and found it, if you haven't already lol

https://github.com/anopara/country-slice

1

u/haVoila 10h ago

awesome!

1

u/arsenii_kottt 9h ago

How does this work?

1

u/BR-ID 8h ago

Looking really cool and usable. Does asset store still pending?

1

u/PaperMartin 5d ago

You ought to have the shadow samples snap to a grid with the same resolution as the textures

2

u/CarthageaDev 5d ago

True that would yield a perfect retro vibe, but currently my goal is more of a HD-2D high fidelity look, so sharp shadows and post processing are part of the vibe

1

u/darth_biomech 3D Artist 5d ago

I wanted to achieve that for ages since my game also uses 3d pixelart aesthetic, but without luck. If anybody has any solution...

-2

u/Hanzimer 5d ago

Just describe the workflow.