How it's Made: Rover Mechanic Simulator | Cleaning Minigame - How to Paint a Texture Unity Tutorial

Sdílet
Vložit
  • Äas pÅ™idán 27. 08. 2024
  • 🎮 Get the game Rover Mechanic Simulator cmonkey.co/hum...
    â¤ï¸ Using this Affiliate Link helps support the channel!
    ✅ Get the Project files and Utilities at unitycodemonke...
    🌠Get my Complete Courses! ✅ unitycodemonke...
    👠Learn to make awesome games step-by-step from start to finish.
    🎮 Get my Steam Games unitycodemonke...
    🤖 Follow the Steam Curator store.steampow...
    💬 Here is the game Rover Mechanic Simulator which features some interesting mechanics and systems.
    Let's check out the Cleaning Minigame and see how it works.
    This is a really fun thing that is actually quite simple to implement. It's all based on Textures and playing around with GetPixel() and SetPixel() along with a custom shader to mix the clean texture and the dirty texture.
    Very easy to implement and it's a pretty fun minigame.
    Also it's #madewithunity !
    How It's Made: How Mechanics and Systems from various Games work • How it's Made: How Mec...
    Game Dev REVIEWS - Learn Game Design • Game Dev REVIEWS - Lea...
    Modular Spritesheets as used in Battle Royale Tycoon • Modular Spritesheets a...
    How to Make Awesome Effects with Meshes in Unity • How to make a Mesh in ...
    🌠Get Code Monkey on Steam!
    👠Interactive Tutorials, Complete Games and More!
    ✅ store.steampow...
    If you have any questions post them in the comments and I'll do my best to answer them.
    🔔 Subscribe for more Unity Tutorials / @codemonkeyunity
    See you next time!
    📠Support on Patreon / unitycodemonkey
    🤖 Join the Community Discord / discord
    🎮 Grab the Game Bundle at unitycodemonke...
    📠Get the Code Monkey Utilities at unitycodemonke...
    #unitytutorial #unity3d #unity2d #unity​ #gamedev​ #indiegame​ #gamedevelopment #madewithunity​ #indiedev​
    --------------------------------------------------------------------
    Hello and Welcome!
    I'm your Code Monkey and here you will learn everything about Game Development in Unity using C#.
    I've been developing games for several years with 8 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.
    I do Unity Tutorials on just about every topic, Unity Tutorials for Beginners and Unity Tutorials for Advanced users.
    You can see my games at www.endlessloopstudios.com
    --------------------------------------------------------------------
    - Other great Unity channels:
    Brackeys - / brackeys
    Dani - / @danidev
    Jabrils - / @jabrils
    BlackthornProd - / @blackthornprod
    Sykoo - / sykootv
    Jason Weimann - / @unity3dcollege
    Jonas Tyroller - / @jonastyroller
    --------------------------------------------------------------------
    - Website: unitycodemonke...
    - Twitter: / unitycodemonkey
    - Steam: store.steampow...

Komentáře • 177

  • @CodeMonkeyUnity
    @CodeMonkeyUnity  PÅ™ed 3 lety +7

    💬 What other games have interesting mechanics you'd like to see? â¤ï¸ Get my Courses unitycodemonkey.com/courses
    🎮 Get the game Rover Mechanic Simulator www.humblebundle.com/store/rover-mechanic-simulator?partner=codemonkey
    🌠Videos Referenced: How It's Made: How Mechanics and Systems from various Games work czcams.com/play/PLzDRvYVwl53ttN_5uyfqs3nnOn0Jd4s92.html
    Game Dev REVIEWS - Learn Game Design czcams.com/play/PLzDRvYVwl53t9P5npsxhCW1toO4R905_D.html
    Modular Spritesheets as used in Battle Royale Tycoon czcams.com/play/PLzDRvYVwl53vvAulzdE3kG_7zUsvG9nB7.html
    How to Make Awesome Effects with Meshes in Unity czcams.com/video/11c9rWRotJ8/video.html

    • @DanTheHuman
      @DanTheHuman PÅ™ed 3 lety

      Physics based race game

    • @Pixel_Entriment24
      @Pixel_Entriment24 PÅ™ed 3 lety

      can make mask? ,in shadier graph than you control interact with mask to clean

    • @shanmukhajagadeesh
      @shanmukhajagadeesh PÅ™ed 3 lety

      Please Make a video RDR2

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 3 lety

      @@shanmukhajagadeesh I did actually make the DeadEye effect and Needs System a long time ago
      czcams.com/video/QMtyhaWnIJc/video.html
      czcams.com/video/iHmnaXRYsc0/video.html

    • @lucassivolella
      @lucassivolella PÅ™ed 3 lety

      It would be interesting to see your approach on a loot system (with an option for random drop chances).

  • @MarkRiverbank
    @MarkRiverbank PÅ™ed 3 lety +20

    Big fan of this format: 10/10.

  • @allecandy9508
    @allecandy9508 PÅ™ed 3 lety +29

    Your channel is so underrated. You know how to explain stuff very well and the videos aren't too long. I'm looking forward to more of your videos

    • @DanTheHuman
      @DanTheHuman PÅ™ed 3 lety +1

      Yeah he does it really well

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 3 lety +4

      Thanks! I'm glad people like the videos!

    • @KalponicGames
      @KalponicGames PÅ™ed 3 lety +1

      yeah, he does it really well. what takes like 2 hours of course content for other people he explains that in like what 1/2 hour? If you get stuck you watch it again then you understand more and more. But if you followed that 2-hour course content it would take u 4 hours instead of 1 hour.

    • @JediMediator
      @JediMediator PÅ™ed 3 lety

      Agreed!

  • @gargaroots
    @gargaroots PÅ™ed 3 lety +1

    I find it amazing how you get a mechanic from a game and not just perfectly replicates it, but also make it look and feel 10 times better. Kudos bro!

  • @Dk-Ang
    @Dk-Ang PÅ™ed 3 lety +10

    I think it would be nice if you create a small series of each of this type of videos where you explained step by step how to create it. Because they way you explained makes me think it is easy but I have never done anything like that and I am a bit lost, maybe because of my lake of experience

    • @GDarrenGould
      @GDarrenGould PÅ™ed 2 lety +5

      I second this. Please make a detailed tutorial, there are too many details missing to follow this without in depth prior knowledge.

  • @phildonahue3158
    @phildonahue3158 PÅ™ed 3 lety +9

    Liked this format a lot

  • @RugbugRedfern
    @RugbugRedfern PÅ™ed 3 lety +8

    Really cool! Looks like a fun mechanic.

  • @roshanthapa1297
    @roshanthapa1297 PÅ™ed 3 lety +3

    Breaking down how they do it, helps us lot for understanding the logic and trick behind it. Expecting more in future. 😃

  • @nottheguy4328
    @nottheguy4328 PÅ™ed 3 lety +4

    A mechanic that I would really love to see explored that may have a similar solution to this one is excavation from Spectrobes. It involves lazering, drilling, and air blowing bits of rock away to uncover a rotated 3D model of a fossil beneath. The fossil has health, so damaging it influences the quality of the creature revived from it.

  • @McFlyT28
    @McFlyT28 PÅ™ed 3 lety +3

    Love the format!
    Suggestions for what's next(these are rather big topics, so this might be good for a series of videos):
    Something destruction related i.e. Red Faction Gorilla
    2D game where every pixel is stimulated like Noita

  • @arcday4281
    @arcday4281 PÅ™ed 3 lety +3

    Great format! Go on! And we are waiting for new courses !

  • @blendjams
    @blendjams PÅ™ed 3 lety +4

    Love this type of analysis and implementation type of videos. Keep going :)

  • @DanTheHuman
    @DanTheHuman PÅ™ed 3 lety +5

    New video!!! Les go

  • @jozefbizon5280
    @jozefbizon5280 PÅ™ed 3 lety +6

    You could check out Hardspace: shipbreaker next

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 3 lety +1

      Yeah I definitely have that one on my list, I think I might wait until it's out of Early Access to give it a shot

  • @freezinfire
    @freezinfire PÅ™ed 3 lety +1

    hmm, that's cool. didn't thought that something this simple would require such logic. great video.

  • @y01cu_yt
    @y01cu_yt PÅ™ed 3 mÄ›síci

    Another awesome tutorial. Thanks Code Monkey!

  • @zekiozdemir420
    @zekiozdemir420 PÅ™ed 2 lety +1

    You might have saved my life here

  • @geri4367
    @geri4367 PÅ™ed 3 lety +2

    That's so cool. I wonder what the approach would be if you could dip the pieces into water for example.
    So how could we clean everything below a certain point instead of raycasting the texture

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 3 lety +1

      Hmm calculating where the line hits would be the tricky part. Maybe with an overlap box along the water plane? And if there's a collision then do a raycast to find the UV point. Then move the test point along the water plane to find another point to get the line equation. Tricky but should be doable.
      After you know the equation for the line then painting under it would be relatively simple.

    • @Chayat0freak
      @Chayat0freak PÅ™ed 3 lety

      @@CodeMonkeyUnity If you assume the water level is perpendicular to the ground you just need to know the point of collision and the object's rotation relative to the water object.

  • @369gamedesign7
    @369gamedesign7 PÅ™ed 3 lety

    Really enjoy this format. Please continue.

  • @StigDesign
    @StigDesign PÅ™ed 3 lety +1

    Love this Format :D

  • @PRodi_
    @PRodi_ PÅ™ed 3 lety +2

    I would love to see this mechanic converted to damage system!!!

  • @r1pfake521
    @r1pfake521 PÅ™ed 3 lety

    Awesome tutorial, the only "downside" is that you need a good uv / texture setup with some spacing, otherwise your brush radius might hit areas that are somewhere else on the object, so be careful if you use bought assets

  • @ahadnazari9110
    @ahadnazari9110 PÅ™ed 3 lety +1

    Really cool

  • @srbisonte
    @srbisonte PÅ™ed 2 lety

    that was awesome!! been looking for something like that for a longo time! would be cool another for screwing bolts etc...

  • @JediMediator
    @JediMediator PÅ™ed 3 lety

    Love the format! More, please!

  • @akash_the_phenomenal942
    @akash_the_phenomenal942 PÅ™ed 5 mÄ›síci

    Please make more detailed and optimized Tutorial for this ...if possible â¤

  • @HaniSharif
    @HaniSharif PÅ™ed 2 lety +1

    Quick question. What about the performance of this shader? Can this method be used on mobile platforms? Great video btw!!

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 2 lety +2

      It depends how often you call it and how big is your brush, writing a tiny amount of pixels isn't too costly, but writing a massive amount with a huge brush gets a bit more expensive.

    • @HaniSharif
      @HaniSharif PÅ™ed 2 lety

      @@CodeMonkeyUnity so u r saying that my best bet is to use a small brush so that minimal pixel calculation are performed. Gotcha!! Thank u for replying and thanks for the only cleaning video on whole of youtube

  • @goldone01
    @goldone01 PÅ™ed 3 lety

    Loving those videos - really useful!

  • @goldone01
    @goldone01 PÅ™ed 3 lety +1

    You could potentially show ragdoll physics like in TABS

  • @robbenlanso7766
    @robbenlanso7766 PÅ™ed 3 lety

    Great tutotial! Thanks for making this video, your explanation combined with the video edits make the topic really clear.
    I would love to learn how the water from breakwaters works. It is also made in Unity. But it might be a bit too difficult for this video format since to me it seems like a very difficult mechanic. But too be fair this mechanic seemed difficult before this video as well. 😅

  • @waseku
    @waseku PÅ™ed rokem

    Does someone has a clue why would it work without problem in editor but no change registered at all in build. There are no errors.

  • @efs515
    @efs515 PÅ™ed 3 lety

    Absolutely love your videos!

  • @mahmututkuu
    @mahmututkuu PÅ™ed 3 lety +4

    this minigame looks like cif's ads

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 3 lety +1

      Heh yup I instead of cleaning a rover you could make a kitchen cleaning simulator!

  • @guimero_art
    @guimero_art PÅ™ed 3 lety

    Awesome! I was wondering how to manipulate textures!!

  • @algs5483
    @algs5483 PÅ™ed 3 lety +1

    You are cool, Hugo.

  • @RedaHaskouri
    @RedaHaskouri PÅ™ed 3 lety +2

    plz sir we want a tutorials how to make puzzle game like LIMBO . im so noob and 5 months and no see what i want :'(
    mechanics physics .. and that loading without out from scene... many things i need to learn but iddnt find ; plz help

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 3 lety +1

      You need to learn how to build individual parts and in the end put them all together.
      I covered a character controller here czcams.com/video/Bf_5qIt9Gr8/video.html
      And level handling here czcams.com/video/3I5d2rUJ0pE/video.html

    • @RedaHaskouri
      @RedaHaskouri PÅ™ed 3 lety

      @@CodeMonkeyUnity thank you sooo muuch siiir

  • @Warpgatez
    @Warpgatez PÅ™ed 3 lety

    I like this format. I’d like to see more of these. I don’t use steam a lot so I won’t follow the curator page. But just letting you know

  • @kken8766
    @kken8766 PÅ™ed 3 lety

    Thanks. This is very helpful

  • @sonicbelmont300
    @sonicbelmont300 PÅ™ed 3 lety

    This is awesome! Have you ever considered doing a tutorial for cutting something out ala Amateur Surgeon? Where the player follows a dotted line with their mouse and after completing the shape it's popped out and can be moved/collected?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 3 lety +2

      Cutting meshes is an interesting topic that I've always wanted to research but never had the time, maybe one day!

  • @Dk-Ang
    @Dk-Ang PÅ™ed 3 lety

    keep doing videos like this one!!

  • @KalponicGames
    @KalponicGames PÅ™ed 3 lety +2

    Will you make anymore course this year?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 3 lety

      Yup I'm working on a course right now! Should be out by the end of this month

    • @KalponicGames
      @KalponicGames PÅ™ed 3 lety

      @@CodeMonkeyUnity wow that is amazing news. Must collect everything you make ðŸ˜

  • @Chuck_Greene
    @Chuck_Greene PÅ™ed rokem +1

    This seemed really cool and wanted to investigate it more so downloaded the files. But had a bunch of errors to do with shaders etc. Im not too familiar with the different shader modes just now. Do I need to open the project file using a certain pipeline? Also do you have a video that shows how you would do something like the unscrewing part that you showed in the beginning of this video. Ive always wondered how something like that would be done, with the camera movement etc.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed rokem

      What errors? Maybe you don't have the Universal Render Pipeline installed, maybe it's Cinemachine. Look at what the error says to figure out what is missing.
      For unscrewing objects, it's really just identifying what object is in front of the camera, similar to what I did in the Pick up Objects tutorial unitycodemonkey.com/video.php?v=2IhzPTS4av4
      Coupled with the Crafting unitycodemonkey.com/video.php?v=_aC3NVIQ-ok
      Or just any interaction system unitycodemonkey.com/video.php?v=LdoImzaY6M4

    • @Chuck_Greene
      @Chuck_Greene PÅ™ed rokem

      ​@@CodeMonkeyUnity Turns out most of the issues were because I didnt have URP installed. I still got some issues to do with LWRP but once i reverted back to an older version of the editor all errors went away. Thanks for the previous response. I did also have to set the render pipeline in the projects settings, (in case anyone else is new to the shader stuff and is struggling :) )

  • @MarceloLemosRossi
    @MarceloLemosRossi PÅ™ed 3 lety

    It's very nice when a professional makes this kind of analises. Thanks a lot. An doubt, if instead use this technique how about use the render pipeline (URP or HDRP) to choose what is shown? Like we paint the surface with invisible color and the render pipeline doesn't show the dirt layer (like how they make the character visible when behind other gameobjects in Unity open project). It's possible? Which one has less computational weight?

    • @MarceloLemosRossi
      @MarceloLemosRossi PÅ™ed 3 lety

      Thanks!

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 3 lety +1

      That would be a very weird way to do it, you would need to play around with multiple layers, maybe some custom shaders to write some stencil data. It would technically be possible but needlessly complex.

    • @MarceloLemosRossi
      @MarceloLemosRossi PÅ™ed 3 lety

      @@CodeMonkeyUnity thanks! I'm still learning how shades works. They seems to be very powerful

  • @Venineitor2000
    @Venineitor2000 PÅ™ed 3 lety

    I like too much this format

  • @margheritaparacini7729
    @margheritaparacini7729 PÅ™ed rokem

    Thanks! I am in a pokemon fangame team, we need to make a washing minigame

  • @VaupellGaming
    @VaupellGaming PÅ™ed 3 lety

    Excellent, now do one in 3D space, like the "power wash" simulator. . :D
    Cleaning a 3d game object in 3d space..
    I would exspect it to work similar, but with raycast from camera to gameobject instead to find "where" plr is cleaning. (possible, also the angle)

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 2 lety +1

      Yup the object in this demo is 3D so it's really the same thing, the only difference is you're moving the camera around and using the camera center position as the raycast origin and the camera transform forward as the direction, just like I did in my third person shooter czcams.com/video/FbM4CkqtOuA/video.html

  • @ozguroz5340
    @ozguroz5340 PÅ™ed 3 lety

    Thanx, so good knowledge

  • @alir8zana635
    @alir8zana635 PÅ™ed 3 lety

    Hey CodeMonkey
    Please do a video on a product customization tool for online shops
    I have seen some by Nike, Audi and other brands
    I have no idea how someone should approach a project like that
    thanks for your great channel

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 3 lety +1

      For the most part it's just changing a material.
      Unity actually has a tool for exactly that, Unity Forma czcams.com/video/RQvZog9cb9c/video.html

    • @alir8zana635
      @alir8zana635 PÅ™ed 3 lety

      @@CodeMonkeyUnity Thank you so much

  • @CyberStudios
    @CyberStudios PÅ™ed 3 lety

    Could you possibly make a tutorial on how to achieve the digging holes and dirt mechanics from the Sons of the Forest trailer. Please I can't find anything closely related to such mechanics on the net unless I am searching for the wrong terms. This tutorial also helps give an idea of how to achieve the wiping the dirt off the window also from the demo

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 3 lety +1

      Hmm I'm not familiar with that trailer but if it is digging physical holes then I'm guessing they're modifying the terrain during runtime. That's actually a topic I haven't researched so not entirely sure how it's done but I'm sure the Terrain API has some commands for changing it in runtime.

    • @CyberStudios
      @CyberStudios PÅ™ed 3 lety

      @@CodeMonkeyUnity thank you for this! Always helpful... love your videos

  • @kushalbaid
    @kushalbaid PÅ™ed 3 lety +1

    Nice

  • @zildeos9858
    @zildeos9858 PÅ™ed 3 lety

    Solid video as always but i actually came in thinking this is all just shaders cause i imagine getting a single pixel every frame using the cpu would be kinda costly

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 3 lety +1

      As always it depends on the size of the brush and your target device. For a Desktop PC this approach works perfectly fine, if you're targeting low end mobile devices then maybe you need some extra optimization.

  • @GDarrenGould
    @GDarrenGould PÅ™ed 2 lety +1

    I am having some trouble implementing this in 2D. Using Physics2D obviously and the only other difference is that the textureCoord is equal to hit.point rather than hit.textureCoord. Apart from that I haven't changed much, but can't seem to get it to work. The raycasts are working properly, but the texture is not being updated. Any suggestions or ideas on what the main issue may be?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 2 lety

      Hmm I haven't tried this specific method in 2D, you could still use the same method on a Mesh Quad. When using a SpriteRenderer I'm not sure how it would change, you might need a diferent method converting the mouse world position into a sprite local position and calculate the UV, not sure

    • @GDarrenGould
      @GDarrenGould PÅ™ed 2 lety +2

      @@CodeMonkeyUnity You pointed me in the right direction and I figured it out, thank you! For anyone wondering, the key is to use the physics2D GetRayIntersection, and then do a transform.InverseTransformPoint on the raycastHit.point, and multiply that by the sprites pixels per unit to keep it consistent across different scales. Then you've just got to offset that to account for the fact that the sprites (0,0) is in the center, rather than in the bottom left as it is on the Texture2D, and then everything else is the same!

    • @GDarrenGould
      @GDarrenGould PÅ™ed 2 lety +3

      Vector2 textureCoord = transform.InverseTransformPoint(hit.point) * pixelsPerUnit;
      textureCoord.x += spriteRenderer.sprite.rect.width / 2;
      textureCoord.y += spriteRenderer.sprite.rect.height / 2;

  • @kuma4an
    @kuma4an PÅ™ed 9 mÄ›síci

    Hi, could you suggest some other way to implement this feature, since in my case, attempts to clear the object leads to a drop in fps from 160 to 5 frames per second

  • @leventebalog8696
    @leventebalog8696 PÅ™ed 3 lety +1

    can you make a video on how to make rebindable controls? I mean like the default for "forward" is W but if I want it to be Uparrow I can do it or if I want it to be G I can do it.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 3 lety

      It should easily be doable with the new Input System but I haven't looked into it much yet

    • @leventebalog8696
      @leventebalog8696 PÅ™ed 3 lety

      @@CodeMonkeyUnity I made it like i'm listening for an event and if it's a key (Keydown or up event) i get the keycode from it but I can't listen for the event Every Update because of performance issues even crashing unity so I used your time tick system(thanks for that system)

  • @qiangqiangpan2362
    @qiangqiangpan2362 PÅ™ed 3 lety

    Wow, Your tutorial is really rich. Could you explain how to make a replay system for the game? I need to make a simple game replay system for a combat system. Any ideas?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 3 lety

      The simplest approach is to just store all the inputs every frame then play them back exactly the same. So you store "frame: 126; isPunchButtonDown: yes; playerPosition: 10, 2, 5"
      That's the simplest approach but will lead to massive save files. The better but more complex approach would be to only save data when something changed like when a button is pressed.
      You could try to get a prototype up and running with that method, just save that data like any other data czcams.com/video/6uMFEM-napE/video.html

  • @CJ-mr8dn
    @CJ-mr8dn PÅ™ed 3 lety +1

    Others : i cant make a game in unity cuz i dont know how to code
    *Me: i cant make a game in unity because my pc cant handle unity :'-)*

  • @MuhammadBilal-gn8gb
    @MuhammadBilal-gn8gb PÅ™ed 3 lety

    Hello, i am getting issue with the solar panel shader after importing package to project ,,can you please help me ?

  • @lemangkuk
    @lemangkuk PÅ™ed 9 mÄ›síci

    Hello have a question here, so I've follow the tutorial, and manage to do it, but have a question here, how do I change from a mousePosition and raycast to detect if I'm hitting the object that need to clean to a 3D object that can clean, for example you are holding a wipe cloth in VR, and you move the cloth and it will clean the object.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 9 mÄ›síci

      You can implement a texture and dynamically modify that texture, like I did here unitycodemonkey.com/video.php?v=Xss4__kgYiY

    • @lemangkuk
      @lemangkuk PÅ™ed 9 mÄ›síci

      @@CodeMonkeyUnity Hello again, Okay. I manage to change from using mouse to using a line raycast to detect if I'm hitting object so I can spray on object. but now I have a bit off an issues. It seem that when I spray the spray is a bit offset from the texture. I have a link showing my issues. Maybe you could help me out on this. The camera used is from my VR camera perspective.
      Link : czcams.com/video/6nNVxRrvrqQ/video.html

  • @lemetamax
    @lemetamax PÅ™ed rokem

    I don't understand the part about cleaning the object... Is the GetPixels and SetPixels method different from the shader graph method?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed rokem

      Not sure what you mean, SetPixels is being used to "paint" the mask texture which the shader then uses to show/hide the dirt.

    • @lemetamax
      @lemetamax PÅ™ed rokem

      @@CodeMonkeyUnity I understand that part, thanks. But...what's the need for GetPixels

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed rokem +1

      It uses GetPixels to read the brush mask so you can use a brush that is not just a solid square

    • @lemetamax
      @lemetamax PÅ™ed rokem

      @@CodeMonkeyUnity oh, okay. That clarifies it. Thanks CM!!

  • @JadianRadiator
    @JadianRadiator PÅ™ed 3 lety

    1:47
    This had better be available for Linux.
    Because if it isn't, why would they use a Tux penguin from old Linux logo's?

  • @roeyk7409
    @roeyk7409 PÅ™ed 3 lety

    So It's a weird Questions. But what are the chances that you can make a Video on how to create a Grid System without using you Utilities?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 3 lety

      The utilities have all their source code included, there's nothing stopping you from taking the functions in those classes and pasting them directly in the Grid class. But that will just add needless bloat to your Grid class, your code should be cleanly separated.

  • @lolk3722
    @lolk3722 PÅ™ed 3 lety +3

    Hi, who know how i learn blender modelling?

    • @lolk3722
      @lolk3722 PÅ™ed 3 lety +2

      I want learn but i don't find good sources

    • @shehrozk.3275
      @shehrozk.3275 PÅ™ed 3 lety +2

      @@lolk3722 Highly recommend The donut 🩠series by blender guru.

    • @lolk3722
      @lolk3722 PÅ™ed 3 lety +1

      @@shehrozk.3275 thanks

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 3 lety +1

      I'm not familiar with Blender myself but Blender Guru is the main recommendation I've heard.
      I've seen some of his videos on making some shader effects and they were great.

    • @shehrozk.3275
      @shehrozk.3275 PÅ™ed 3 lety

      @@CodeMonkeyUnity Great they are!

  • @Venineitor2000
    @Venineitor2000 PÅ™ed 3 lety

    Epic!

  • @rb76768
    @rb76768 PÅ™ed 2 lety +1

    Is this also possible in the normal Unity template?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 2 lety

      What do you mean by normal Unity template? This is just a mesh object, nothing related to any template.

    • @rb76768
      @rb76768 PÅ™ed 2 lety

      @@CodeMonkeyUnity Is the shader editor part also possible with coding the shader?

  • @arctic7555
    @arctic7555 PÅ™ed 8 mÄ›síci

    Hey code monkey I want to make a car mechanic simulator but I can’t find any assets to use what do I do?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 8 mÄ›síci

      Not sure what specific assets you're looking for but there's mountains of stuff on the unity asset store, both free and paid cmonkey.co/unityassetstore

  • @lemarisaacs7427
    @lemarisaacs7427 PÅ™ed 2 lety +1

    Hello sir can you create a game on unity on a normal laptop because I am poor?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 2 lety +1

      Unity runs on just about anything so yes, it all depends on what game you're making, don't try making a massive open world game on a small laptop

    • @lemarisaacs7427
      @lemarisaacs7427 PÅ™ed 2 lety

      Just to let you know I would like to create a game like BeamNG on mobile and a mechanic game that is almost similar to the PC versions

  • @blackorzarblack1655
    @blackorzarblack1655 PÅ™ed rokem

    Hi Code Monkey, great video. But I have one problem. I have several objects in the scene, and when I start washing dirt on one of them, it washes it on all objects at the same time. Could someone help me? Thank you

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed rokem +1

      Sounds like you're either drawing on top of the same texture every time or the materials you're drawing over have reused uv positions

    • @blackorzarblack1655
      @blackorzarblack1655 PÅ™ed rokem

      @@CodeMonkeyUnity yes, the problem is in the UV positions, but I don't know how to fix it. I try everything I can think of but nothing works :D

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed rokem

      You probably need to edit the model itself to not reuse UV positions

  • @Dippps
    @Dippps PÅ™ed 3 lety

    Do you need to use colliders for raycast detect?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 3 lety +1

      Yes, without a collider the raycast wont hit anything

  • @BrockJolet
    @BrockJolet PÅ™ed 3 lety

    A+ Great!

  • @TimBuhrs
    @TimBuhrs PÅ™ed rokem

    It doesnt seem to work when i try to build the game, do you happen to know what the issue could be?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed rokem +1

      What exactly doens't work? Maybe you forgot to set the texture as ReadWrite, look in the build logs to see if there's any error

    • @TimBuhrs
      @TimBuhrs PÅ™ed rokem

      Hey thank you so much for the response! It turned out that the model needed to also be set as Read/Write according to the devbuild errors! But luckily I figured it out this morning! Thank you for the help and great tutorials as always!!

  • @ddouble1839
    @ddouble1839 PÅ™ed 3 lety

    How can ı get like this textures?

  • @TheUnarmedBlackManShow
    @TheUnarmedBlackManShow PÅ™ed 9 mÄ›síci

    is there a course for making this game?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 9 mÄ›síci +1

      Not really but most of it is just interactions with objects, so if you combine my Interact with NPCs video and my Crafting video you can build the core mechanic
      unitycodemonkey.com/video.php?v=LdoImzaY6M4
      unitycodemonkey.com/video.php?v=_aC3NVIQ-ok

    • @TheUnarmedBlackManShow
      @TheUnarmedBlackManShow PÅ™ed 9 mÄ›síci

      @@CodeMonkeyUnity u the best around nobody Eva gonna bring u down!

  • @iamaim2847
    @iamaim2847 PÅ™ed 7 mÄ›síci

    How to make png files to such texture variable?
    I'v tryed SpriteRenderer with MeshCollider
    Texture2D texture = renderer.sharedMaterial.mainTexture as Texture2D;
    Diesn't return anything because no material.
    Tryed
    Texture2D texture = spriteRenderer.sprite.texture as Texture2D;
    Hit coodinate are allways zero, pixel on GetPixel is allways (0,0,0,0). Like it is an empty texture;
    Is it textured 3d model, or can you make it somehow withuout external programs?
    Rewatched this 3 times, I can see only:
    dirtMaskTexture.SetPixel
    appered from nowhere.

    • @iamaim2847
      @iamaim2847 PÅ™ed 7 mÄ›síci

      Solved it with sprite mask. In init
      Sprite maskSprite = Sprite.Create(maskTexture, new Rect(0, 0, maskSource.texture.width, maskSource.texture.height), new Vector2(0.5f, 0.5f));
      mask.sprite = maskSprite;
      in update
      mask.sprite.texture.SetPixel
      And no shaders

  • @asyncoperator
    @asyncoperator PÅ™ed 2 lety

    Hi Code Monkey, I just playing around with the project files and try use Robot Kyle from asset store but the issue is when I try to clean its one of the arm or leg because its using the same texture on both parts they get clean simultaneously. Playing with wrap mode but couldnt achieve to prevent this happening. Hope you have a solution for this, thanks

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 2 lety +2

      Sounds like the asset was made to reuse parts of the texture, you would need to remap the UV to make sure all the parts are unique.
      I'm not an expert 3D modeller so not entirely sure how that process is done, I'm sure Blender can do it but not sure how.

    • @asyncoperator
      @asyncoperator PÅ™ed 2 lety +1

      @@CodeMonkeyUnity Thank you so much even 6 month passed from the video you've been upload still answering question. I really appreciated your hard work

  • @user-qu2sr8xo6l
    @user-qu2sr8xo6l PÅ™ed 7 mÄ›síci

    Can I apply that in Unity VR?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 7 mÄ›síci

      Yes, how you move the camera doesn't really matter, you can move it by a mouse or a headset, the cleaning logic is the same. Although in VR you probably want to do a raycast from something the player is holding raather than their face

  • @dabtap7385
    @dabtap7385 PÅ™ed rokem

    How to do it in Unreal Engine?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed rokem +1

      That's a completely different engine so it would be completely different

  • @TheRealMobiius
    @TheRealMobiius PÅ™ed 2 lety

    Aw man, MARS rover, not the failed British car manufacturer MG Rover. I was hoping to see mechanics fix blown head gaskets and replacing rusted out body panels before the company goes bust!

  • @bogumiwyrwa216
    @bogumiwyrwa216 PÅ™ed 2 lety

    How make similar cleaning system for 3d models?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 2 lety

      These are 3D models, the Raycast gives you the UV point

    • @bogumiwyrwa216
      @bogumiwyrwa216 PÅ™ed 2 lety +1

      @@CodeMonkeyUnity is there any tutorial available?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 2 lety

      @@bogumiwyrwa216 It's right there in this video

    • @bogumiwyrwa216
      @bogumiwyrwa216 PÅ™ed 2 lety +1

      @@CodeMonkeyUnity ok, thank you. This video is to difficult for me.

  • @tingzhang6580
    @tingzhang6580 PÅ™ed 2 lety

    where to watch the full tutorial?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  PÅ™ed 2 lety

      This is the full tutorial, you can download the project files linked in the description to see all the code

    • @tingzhang6580
      @tingzhang6580 PÅ™ed 2 lety

      @@CodeMonkeyUnity thanks

  • @leagueoffiora4484
    @leagueoffiora4484 PÅ™ed 3 lety +3

    First pog

    • @DanTheHuman
      @DanTheHuman PÅ™ed 3 lety +1

      Pogchamp

    • @shehrozk.3275
      @shehrozk.3275 PÅ™ed 3 lety

      I thouth comment section would be empty when i came (7 min after upload)

  • @IlmarAlamsyah
    @IlmarAlamsyah PÅ™ed 3 lety

    Sir need review new mega bundle unity asset

  • @abhisheksinhagaming
    @abhisheksinhagaming PÅ™ed 3 lety

    Make more course with Coding

  • @Siddhantmane03
    @Siddhantmane03 PÅ™ed 3 lety +1

    If you want to play this game come to my house😂😂😂.

  • @lolk3722
    @lolk3722 PÅ™ed 3 lety +2

    First

  • @sahilsharma2867
    @sahilsharma2867 PÅ™ed 3 lety

    When will be the Face reveal!!!

  • @alimontcalm4144
    @alimontcalm4144 PÅ™ed 3 lety +1

    اشرح بالعربي
    Explain in Arabic

  • @jalapenoandbanana
    @jalapenoandbanana PÅ™ed 3 lety

    Lol I am very confused on how 3d games are made