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

Комментарии • 88

  • @mixandjam
    @mixandjam 3 года назад +89

    Thanks for this collaboration! You all rock!

    • @TNTCProject
      @TNTCProject  3 года назад +4

      Thanks André it was really cool!

    • @dclxviclan
      @dclxviclan Год назад

      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?

  • @TNTCProject
    @TNTCProject  3 года назад +19

    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

    • @qdesnikk
      @qdesnikk 3 года назад

      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)

  • @AlexBlackfrost
    @AlexBlackfrost 3 года назад +12

    I learnt 2 things with these videos:
    1 you guys rock
    2 I have no idea about shaders

    • @TNTCProject
      @TNTCProject  3 года назад +3

      hahaha
      1 Thank you, very kind
      2 shaders can be a tricky topic but very addictive

  • @DragonSight_
    @DragonSight_ 2 года назад +5

    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!

  • @Blinkers2007GameDev
    @Blinkers2007GameDev Год назад +2

    THANK YOU!!!! I NEED THIS FOR MY PAINTBALL GAME

  • @맹구-i2y
    @맹구-i2y 3 года назад

    I think you're an angel who releases such good code for nothing.

  • @mattmura51
    @mattmura51 3 года назад +3

    Best channel ever

  • @Madalaski
    @Madalaski 3 года назад +6

    Aha! A fellow shader lover! Love the concept and the editing!

  • @MalbersAnimations
    @MalbersAnimations 3 года назад

    Coming from Mix and Jam!! instant subscribed!!

  • @fess24
    @fess24 3 года назад +1

    Very useful video! Thank You!

  • @WizardsCode
    @WizardsCode 3 года назад +1

    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 ;-)

  • @prakashgamedev4335
    @prakashgamedev4335 3 года назад +1

    awesome !

  • @NoxideActive
    @NoxideActive 3 года назад +5

    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.

  • @elenagalloni9146
    @elenagalloni9146 3 года назад

    Amazing video, really useful!

  • @zombieinject
    @zombieinject 9 месяцев назад +2

    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???

  • @vegettosandev
    @vegettosandev 3 года назад +1

    Nice!!!

  • @trunghieu974
    @trunghieu974 Год назад +2

    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?

  • @damianromero1383
    @damianromero1383 3 года назад

    it's amazing

  • @BencioDj
    @BencioDj 3 года назад +1

    Booyah!

  • @annaritadintrono2131
    @annaritadintrono2131 3 года назад

    Amazing and interesting work :)

  • @supaquizz
    @supaquizz 3 года назад

    great !

  • @kaiser9321
    @kaiser9321 3 года назад +3

    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

  • @USBEN.
    @USBEN. 3 года назад

    Thankyou very much

  • @-vanitas5229
    @-vanitas5229 3 года назад

    very good content

  • @很好的开始
    @很好的开始 3 месяца назад

    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);

  • @seunghokim9855
    @seunghokim9855 9 месяцев назад +3

    I'm sorry to ask you this, but is there a way to measure how much is painted.

  • @sprythedragon2253
    @sprythedragon2253 3 месяца назад

    Is there an updates for the new unity version because this breaks with it

  • @chilpox3671
    @chilpox3671 3 года назад

    Ah yes, i totally understood that

  • @User33423
    @User33423 3 года назад +3

    can i somehow recreate this in hdrp shader graph

  • @luxvr1
    @luxvr1 2 года назад

    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

  • @damianromero1383
    @damianromero1383 3 года назад

    geniuses

  • @usamaazmat7159
    @usamaazmat7159 Год назад

    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

    • @xdedeone
      @xdedeone Год назад

      Im working with default unity meshes and works great

  • @ErikHashimoto
    @ErikHashimoto 6 месяцев назад

    How do we get this to apply to submeshes beyond material element 0 in skinnedMeshRenders?

  • @Wikkit
    @Wikkit 3 года назад +2

    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?

    • @qdesnikk
      @qdesnikk 3 года назад

      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)

    • @Wikkit
      @Wikkit 3 года назад

      @@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.

    • @qdesnikk
      @qdesnikk 3 года назад

      @@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?

  • @muhammadbaqir3545
    @muhammadbaqir3545 2 года назад

    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

  • @aqibsadiq92
    @aqibsadiq92 3 года назад

    Great Work Guys. I am thinking that is there a way to count how much of area is painted and how much is remaining

  • @lejohn2340
    @lejohn2340 Год назад

    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 ?

  • @earrgames
    @earrgames 2 года назад

    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.

  • @DrFross09
    @DrFross09 3 года назад +1

    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.

    • @shatganseven4927
      @shatganseven4927 3 года назад

      It Works in 3D Meshes, did u add a collider?

    • @Blinkers2007GameDev
      @Blinkers2007GameDev Год назад +1

      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

    • @DrFross09
      @DrFross09 Год назад

      @@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.

    • @Blinkers2007GameDev
      @Blinkers2007GameDev Год назад

      @@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!

  • @scrfur
    @scrfur 3 года назад

    Hey look it’s the bloblober 3:54

  • @АведикОганесян
    @АведикОганесян 3 года назад

    Hey can you explain me how can I know which part of an object was painted in percentages ?

  • @yoyomario
    @yoyomario Год назад

    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...

  • @quackers2620
    @quackers2620 2 года назад +2

    This sounds great! Does it work with the HDRP render pipeline though?

  • @homevideos.
    @homevideos. 2 года назад

    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?

  • @maikawnah2908
    @maikawnah2908 2 года назад

    Is possible to make liquid paint?

  • @swanitvaidya1756
    @swanitvaidya1756 2 года назад

    Hello,
    Is there a way to blend two colour in this?

  • @btarg1
    @btarg1 3 года назад +2

    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.

    • @IronFreee
      @IronFreee 3 года назад +1

      You can use a color mask on your terrain floor to detect on what color you stand.

  • @elrymoe
    @elrymoe 3 года назад +1

    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 ?

    • @TNTCProject
      @TNTCProject  3 года назад

      Hey:) The Github link is in the video description!

  • @RegenerationOfficial
    @RegenerationOfficial 3 года назад

    almost nobody will bring this up because they want to use decals

  • @SamHalen5150
    @SamHalen5150 3 года назад

    Awesome video! Is this something only designed to run on desktop/vr? would this have good performance on mobile?

  • @josrigterink5960
    @josrigterink5960 2 года назад

    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?

    • @xdedeone
      @xdedeone Год назад

      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.

  • @googlereviewguy7574
    @googlereviewguy7574 3 года назад

    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.

  • @Cyberfoxxy
    @Cyberfoxxy 3 года назад

    Took them long enouugh to cough up a shader editor.
    Before it was 100 bucks for shaderforge

  • @bigjiggly7490
    @bigjiggly7490 3 года назад

    How did you handle islands? Oversize them?

    • @bigjiggly7490
      @bigjiggly7490 3 года назад

      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.

    • @TNTCProject
      @TNTCProject  3 года назад

      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

  • @emilionavarro1453
    @emilionavarro1453 8 месяцев назад

    Great video, im trying im exploring the code to make this work in a 3d cube but im falling Xd

  • @waynehuras116
    @waynehuras116 3 года назад

    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 :)