Splatoon - Painting Effect in Unity
HTML-код
- Опубликовано: 9 фев 2025
- Painting in video games is a very common practice, more than one might think.
It's often used to paint or interact with the environment,
but also it is used to dirt the player and create consistency between him and the game world.
Today we'll recreate this effect on Unity.
@mixandjam video:
• Recreating Splatoon's ...
Our sound designer and trusted musician Matteo Balasso (who composed the awesome background music):
/ matteo.balasso
/ mrcaffeine
Models:
skfb.ly/6WO8D
skfb.ly/6uZRP
skfb.ly/6tAVu
skfb.ly/6RYx9
hdrihaven.com/...
GitHub:
github.com/Tou...
github.com/mix...
DISCORD:
/ discord
Instagram:
/ tntcproject
Twitter:
/ tntcproject
Twitch:
/ tntcstreaming
WEBSITE:
toughnuttocrac...
FACEBOOK:
/ toughnutocrack
#Splatoon #Unity
Thanks for this collaboration! You all rock!
Thanks André it was really cool!
Hi friends, i download this project from git, but i have issue with collision paint, i try use collission paint in Mix and Jam scene, but its not paint it's start delete paint material, then i try open TNTC scene, and all work, but collisison dont work , i use default scene TNTC, not break parametrs, and use bu default, why collision method not work?
Hello and thanks for watching!
Huge thanks to André from Mix and Jam for this awesome collaboration.
Check his video: ruclips.net/video/FR618z5xEiM/видео.html
i cant understand some things from this video and i have some questions, maybe you can help me or give me more information. i really need your help.. (sorry for my english)
I learnt 2 things with these videos:
1 you guys rock
2 I have no idea about shaders
hahaha
1 Thank you, very kind
2 shaders can be a tricky topic but very addictive
Took some time to understand it.
The approach for painting the texture by comparing world position from the mesh vertices and paint input was brilliant!
THANK YOU!!!! I NEED THIS FOR MY PAINTBALL GAME
I think you're an angel who releases such good code for nothing.
Best channel ever
awwwwwwwww :)
Aha! A fellow shader lover! Love the concept and the editing!
haha, thanks!
Coming from Mix and Jam!! instant subscribed!!
Thank you! welcome :)
Very useful video! Thank You!
Thank you for watching!
Great stuff. Thank you. I'll be using this and the Mix and Jam one in a new game. Happily letting the ads play on this one ;-)
awesome !
Thanks!
Incredible, I love learning about this kind of stuff.
I also wanted to ask if you would make a quick tutorial showing how to make that colored ink as a stand alone material. I tried imitating what you made using the shader graph but I think I missed a few things.
Amazing video, really useful!
Im new to unity and i need the paint effect like you showed at 3:38 in the background painting purple. The project is very big and I don't know what is responsible for what. I only need the paint on mesh part. Can anyone help me???
Nice!!!
happy you like it :)
is there anyone can please explain for me the code at 1:33 : uv.xy = (v.uv.xy *2 -1) * float2(1, _ProjectionParams.x) ? why do we need to convert uv to range ( -1, 1) then multiply with screen ration?
it's amazing
Booyah!
Booyah
Amazing and interesting work :)
Thank you so much!
great !
I’ve been wanting to create a proper version of this effect since I made a very basic particle paint shader in 2018 that was inspired by Super Mario sunshine
oh, cool!
Thankyou very much
very good content
Thank you very much for your video. I want to modify the code in the Shader to draw footprints or other special shapes instead of circles. How should I make these modifications? Is it this part in the Shader:
float4 col = tex2D(_MainTex, i.uv);
float f = mask(i.worldPos, _PainterPosition, _Radius, _Hardness);
float edge = f * _Strength;
return lerp(col, _PainterColor, edge);
I'm sorry to ask you this, but is there a way to measure how much is painted.
Is there an updates for the new unity version because this breaks with it
Ah yes, i totally understood that
can i somehow recreate this in hdrp shader graph
+1
Thanks, subscribed, do you have a tutorial to paint in space and not on surface , also so painting can be done with both left and right controllers at the same time
geniuses
Hello, This is working superb, I wanted to know that is there any way of coloring mesh that doesn't have a pro builder mesh filter?
I'm unable to color meshes that doesn't have a pro builder mesh filter
Im working with default unity meshes and works great
How do we get this to apply to submeshes beyond material element 0 in skinnedMeshRenders?
I have been trying to understand shaders, and I wanted to use this project to create a slime trail for a character.
So far I've learned a lot about the shader graph, how code interacts with it, and I have a general idea of how this concept works, but still don't fully understand. It was a lot of copying and importing the assets from the project, but it's been very educational..except I can't get it to work even within the cloned project. The scenes that already exist work, but if I add a new object, give it Paintable, and the same paintable material with the same settings, nothing still happens. What am I missing that will allow me to create a new basic object and have that be paintable as well?
I have same problems. I try a lot, but... nothing. I think we need to do some fixes in proBuilder or work with UV. please help us. (ps sorry for english)
@@qdesnikk I managed to be able to add new paintable objects in the cloned project, it worked the next time I tried (probably magic).
I've given up on this video and have moved on to other shader tutorials. Maybe one day when I learn more, this will make sense.
@@Wikkit i solved problem with new objects, problems was with UV, just need to right scale and position in ProBuilder - UV edit.
But now i have another problem: when i create environment object (for example house with textures from asset) i cant paint on it. Maybe somebody have some solutions or how i can do that?
i have made my own shader graph and want to use that instead of a paintable shader graph it already has, can u tell me how to do that? i don't know much about shadders
Great Work Guys. I am thinking that is there a way to count how much of area is painted and how much is remaining
How did you manage to make a script that auto remap your UV to have a unic space on the 1*1 texture for each side of your gameobject ?
Is there too much difference between blit and setpixels/apply? Some years ago attemped a bloodsplatter with set pixels, but a bit overkill for the cpu, didn't however try with blit as seemed a bit arcane at the time (and still does tbh). Thanks.
Amazing! I got this to work in my game however it only works with 3D planes, and my game is in 2D, I'm trying to figure out a way to make this work in 2D. The furthest I've gotten just makes the tilemap turn unlit when the colliders hit.
my particles are still using 3D world space, and I just set the initial Z velocity over time to shoot straight into a background layer that's some 10 units behind the scene.
if I had to assume what's going wrong, it's with the shader. to be honest I'm new to 'drag and drop' method and don't know what I'm doing with it.
It Works in 3D Meshes, did u add a collider?
My plan is to use this paint effect in combination with the bullet(kind of like an explosion of paint) when shooting. Currently doing a paintball game. I don't really know if this works in 2D though. It's more ideal for 3D
@@Blinkers2007GameDev yeah no, I made it work in 2D. Took some rigging, but I have a plane that is slightly off to the side (+Z) the paint shoots out to the side, you don’t even notice that it’s doing that.
I used this effect to make some very realistic blood spatters as far as (physics is concerned). You can follow each drop until it lands.
@@DrFross09 That sounds fun! I'm going to implement that today in my paintball game. Yesterday I did keybinds for the player. Game dev and life is just going well in general and i'm happy. Seems like things are going well for you too, then? Good luck with your 2D game KING!
Hey look it’s the bloblober 3:54
Hey can you explain me how can I know which part of an object was painted in percentages ?
I do not understand how do you use a look-up texture in your code? You're just paitning with a radius at certain point with strength applied? But I don't see the lookup texture in use...
This sounds great! Does it work with the HDRP render pipeline though?
how processor heavy is this? would something similar work if i want a blank world that colors in as the players collider collides with it?
Is possible to make liquid paint?
Hello,
Is there a way to blend two colour in this?
This is a bit late, but can this system be adapted to allow for detecting when you're standing on your team's colour and swim around in it like in Splatoon? I'd love to see an open-source remake of the game's mechanics, it would be a great start for a Splatoon PC FPS.
You can use a color mask on your terrain floor to detect on what color you stand.
Im currently working on a Splatoon-esque game and i would love to have a deeper look inside the project and how the code works without copying the youtube snippets, do you have this as a repo somewhere ?
Hey:) The Github link is in the video description!
almost nobody will bring this up because they want to use decals
Awesome video! Is this something only designed to run on desktop/vr? would this have good performance on mobile?
it does not work and does not give any errors it just doesnt paint i have done everything the same anyone know how to fix this?
It works fine.
You need check few things
1- Your object material is with the shader "Shader Graphs/Paintable " type
2- Your Object need to have attached Paintable script
2- Your Object need have attached a Collider (Box, Circle, Mesh etc)
3- With the MousePainter or the Collision painter, in your color box you need to set the Alpha of the color to 1
4- You need an Instance of the Paint Manager with the referenced Shaders in the scene.
I have a question: I want to have it so ingame objects can be visible when an object touches it. "
question: Is it possible to have it so when the paint touches an object, only the areas of the object that were hit with paint will reveal the original texture of the object that is currently invisible." This way, if you hit the object that is invisible with paint, you can see sections of the object are now revealing a object. I would really like to learn how to do that.
Took them long enouugh to cough up a shader editor.
Before it was 100 bucks for shaderforge
How did you handle islands? Oversize them?
Nvm, figured it out. By streching the islands out in the shader it closes the seams. Works very well, will definately be using this in future projects.
Your video was an okay explination on how to achieve this affect however it does not provide enough information. After some research I was able to conclude how this is achieved and achieve it myself.
The video is basically a showcase of the technique we used. If you like, you can see the full implementation in the repository of the project that we did with Mix and Jam.
github.com/mixandjam/Splatoon-Ink
Great video, im trying im exploring the code to make this work in a 3d cube but im falling Xd
Hello, wonderful video! I'm having issues with collision painter on objects other than planes and spheres. I recreate the paintable object using the default cube and the resulting painted surface is not what is expected: imgur.com/a/PEUxljK. Think you could help me out?
Edit: Oddly enough it seems to work fine on a default cube imported from Blender, but not a default cube from Unity.. I guess I no longer need help but that's an odd bug :)
What did you do to use Collision Painter? Did you add "Collision Painter" script on a cube?
Are you fix this problem?