Search Unity

How can i paint the "EXACT LOCATION" of terrain?

Discussion in 'Getting Started' started by jfamap, Dec 30, 2016.

  1. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    Edit: Dear moderators, you can delete this topic if you want. It was a fault to ask for help. Or it was my fault because i have answered the people trying to minimize me.

    How can i paint in the square?

    1-) Editing brush for the exact size of grid squares
    2-) Correct the grid size for the exact size of "ANY" size of brush
    3-) Prevent the other terrains copy the paint of other terrains
    4-)
    Scale brush size like 0.8, 0.5 etc etc instead of 1,2,3,4 etc etc

    I want to do only one of them.

     
    Last edited: Jan 8, 2017
  2. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    If you want precise terrain, I would abandon the unity tools and manually draw the height and splat maps in an external image editor.

    You also don't need to create three threads to ask the same question, replying to your existing threads is more appropriate.
     
  3. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    First of all, i have created 2 treads, not 3. And first tread was different question. It was about the grids, but it is about brushes -_-

    Second is, how can i do the thing you said with external image editor?

    I found but it says Assets/Gizmos but i cannot see anything about gizmos

     
  4. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    External image editor. As in Paint, Photoshop or similar.

    Wait what? Who said anything about Gizmos? I would suggest some time in the learn section and the manual to pick up the basics of Unity before going further.
     
  5. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    All four of your threads amount to 'I can't get the terrain to behave how I want'.
     
  6. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,192
    It's expecting you to create a folder named Gizmos in the Asset folder.
     
  7. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    And i am asking "how to do"

    It seems this section is about "getting started" i would be happy if you can tell me which section i need to create topic without disturbing experienced users.

    Edit: Ok now i am sure it is not about the brush. Same problem continues. I will be happy if you return first post. I cannot paint the entire square. How can i paint the exact location?
     
    Last edited: Dec 31, 2016
  8. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,192
    Right-click->Create->Folder. It's shown in the very screenshot you posted.

    There are better sections for topics covering the terrain but most of them will assume you have basic knowledge of the engine which you seem to be lacking. If you have not already done so I highly recommend you set aside what you're working on and start with the official tutorials.

    https://unity3d.com/learn/tutorials
     
  9. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    I already did but i cannot find anything that adjusting grids. Since 3 days i am looking for solution.
     
  10. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    You are totally all over the place. What are you actually trying to do?

    Start from the beginning. And explain it step by step. I'm convinced there is an easier way to do whatever you are asking. I just don't know what you are trying to do.
     
  11. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    Check the first post. I want to paint the exact grid.
     
  12. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Paint the exact grid on what? With what?
     
  13. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    This is what i am asking. Let me expand the details for you. Look at the first post. Imagine it is 256x256 square. And i want to paint 256x256 NOT 256x240 or 257x240. I want to paint inside the grid. If it is size 200x200 i want to 200x200 if it is 8000x8000 i want to 8000x8000
     
  14. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Okay. Got ya.

    So before we go further, why terrain? The Unity terrain system is not brilliant. A simple mesh might suit your problem better.

    You are going to have to go to an external tool to get the presicion you are after. The in built tools won't cut it.

    I would suggest starting with something like paint.net. Photoshop will also do the job if you can afford it. Lay out your grid there. Then you can import it into Unity and use it as a splat map. You will get the pretty precise results you are after that way.

    You will have to do some reading up on how Unity handles terrain, splat maps and probably height maps. A splatmap uses each channel in a rbga texture to assign which texture should be used. A height map uses greyscale values to determine how high the terrain is.

    The process is slightly simpler with a mesh, which you could build completely in Blender or equivalent and import straight into Unity.
     
    DroidifyDevs likes this.
  15. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,192
    You misunderstood my post. My point wasn't that you should look for a very specific tutorial but that you should go through all of the available tutorials (ideally starting with the project tutorials) and follow along with them. That you didn't know how to create something as basic as a folder tells me that you have literally no knowledge of the engine.

    Once again you need to set aside your current project and go do the tutorials. Until you've done that the assistance being given to you is like trying to speak Chinese to someone who only speaks English. It won't make any sense.
     
  16. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    Ok thanks now look at here. This is my Warcraft III Modification



    My objective is transfer my Warcraft III map into Unity. Yes i am new on unity. I have a 3 friends for the unity and i have decided to start with terrain first.

    As you can see, i have already calculated my map size. It is 64x64. And i have already created terrain for this. But my problem starts in there. And it never fills the grid.



    I had 2 choices (maybe there is more ways to do it but i do not know)

    1-) Find a way to costumize grids
    2-) Find a brush that fills the grid.

    I have created 256x256 and 256x276 brushes and i have realized, it is not about my custom brush. My main problem is grid.
    Then i have tried to set terrain x and z with dots (i mean 0.12 or 0.15 instead of 1-2-3) and it worked but still i had empty areas. After this i have tried to set brush size with dots but it accepts only 1-2-3-5 etc etc. Not 0.12 something.

    Now you can suggest "anything" for me. I hope you understand my main problem.
     
  17. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    I really do feel like a broken record. If you want to use terrain, construct the hightmaps and splatmaps outside of Unity, then import them.

    If you don't want to use terrain, you can build the whole thing as a mesh and import into Unity.

    Finally if you game is inherently tile based, you can use a tile map.
     
  18. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    Thanks but how i will construct hightmaps and splatmaps? Any documentation, video, website about it? As i said i am greenhorn and unity is a huge program for the check and learn "everything"
     
  19. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
  20. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    Ok thanks then. I will check and if i cannot find i will create new topic named "how to create heightmap"

    Thanks.
     
  21. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,192
    You don't need to create multiple threads and doing so will just spread out the answers. You won't necessarily get more.

    A heightmap is simply a monochrome image where pure black is the lowest point, pure white is the highest point, and the remaining shades of gray represent the levels in between. For example if I wanted to create a tall square on a heightmap it would look like this. This process has been mentioned multiple times in previous posts.

    Additionally, like @BoredMormon, I'm out. If you can't be bothered to learn Unity properly then you won't get anywhere and I'm certainly not interested in spoon-feeding you the information covered by the Unity learn section.

    heightmap.png
     
    Last edited: Dec 31, 2016
    DroidifyDevs likes this.
  22. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    Ok thanks but did you understand my problem? Grids are 10x10 in Unity. BUT the smallest brush fills 9x9

    I need to create 9x9 grids OR i need to create 9x9 brush.

    And the annoying part is, 4 days passed and still i cannot start about this grid system.

     
  23. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    Ok now listen please. Still i am trying to find solution. i have searched and read many things. Still i didn't find any solution about that. I told myself to "ok forgot it, find another way" but i cannot find. I will be happy if someone can help me because it is 4'th day and still i cannot find solution.

    And important note. Please do not talk about "go search, look youtube" etc etc because i already did. If you can help, i would be happy.

    And happy new year to everyone.
     
  24. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    I don't wanted to create new topic, so let me ask in here.

    https://docs.unity3d.com/Manual/Layers.html I read it but i want to use the layer system like the photoshop.
    In this program, if i edit one layer, it affects other layer too.

    Is there a way to work on two layers like the photoshop? My terrain problem doesn't solved and nobody found a solution, at least let me work on 2 layers.

    Extended explanation for the tell what i want.

    1-) I am duplicating terrain 1 (T1) with named T2
    2-) I get 2 terrains with named T1 and T2
    3-) I am painting T1 but it affets T2 too.

    How can i prevent other terrains getting painted?
     
  25. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    Anybody knows anyone can help me about one of these problems? Since 6 days i was looking videos, checking guides and still i haven't solved any of these problems.

    OR

    Do you know another website or someplace else for the learn how to do this?
     
  26. DroidifyDevs

    DroidifyDevs

    Joined:
    Jun 24, 2015
    Posts:
    1,724
    Dude. Stop trying to use the terrain editor to fill a square. It's not made for that, and it does what it's designed for (making hills and painting textures and trees) rather poorly. It's like trying to pound a nail with a screwdriver.

    Put in some of your own effort to learn something on your own. NO ONE is going to spoon-feed you anything unless you show effort on your end. If you do a few tutorials, you'll know how to get around the engine and do simple things by yourself (such as creating a new folder). I bet if I asked you something like "What is the Canvas", "How do you use GetComponent<>" or "Why should you mark static objects as static in the Inspector", you'd have no idea what I'm talking about. Once you have basic knowledge, we can help you. But don't expect a genie telling you how to make a AAA title step-by-step, ESPECIALLY if you've shown no effort on learning anything yourself.

    Almost 2 years ago I was in the same situation (look at the very first questions I asked). I was someone who had no knowledge at all in C# or game development. Now I can get around the engine, I know most of the concepts, I can write C# less-than-decently. I asked stupid questions, got 2 accounts banned off StackOverflow, and after all that useless question-asking, I came to realize the most important thing: To receive help, you must know the basics yourself. So instead of asking "How to fill a square", receiving very helpful answers, then ignoring them and doing stuff the way you were doing (with no result), go to the tutorials page, do some tutorials, learn a bit of C#, look in the docs, and then you'll realize that the terrain editor is not for filling squares.
     
    Last edited: Jan 4, 2017
    Kiwasi and Ryiah like this.
  27. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    But i am telling people i have just started and i don't know how to use this program as a professional like your

    Ok. Since 7 days i am watching videos, reading tutorials, watching terrain lessons, creating topics, asking on another sites and i cannot find anything that solves my problem. Half of my internet history full of "unity terraining, unity grid size, unity brush sizes" etc etc. 1 full of week i am searching, trying things by myself over and over again.

    I am waiting for someone who can do this

    "Hello jfamap. Open your unity, click this, click there and it is ok"

    Your answer is not solved my problem like the other users but at least maybe you think you have tried. Thanks anyway and have a nice day.
     
  28. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,192
    Exactly. You just started using Unity. That's why you need to set aside your project, open the learning section of this website, and go through the tutorials duplicating the work in the video. You may believe this is a waste of your time because none of the tutorials seem to match your situation but nothing could be further from the truth.

    Your first game engine will always be the hardest to pick up. Jumping in and attempting to learn Unity by trial and error is only a valid approach if you have past experience with another game engine (Warcraft 3 doesn't count here).

    You won't find much about Unity's terrain system. Here are just some of the reasons.
    • Many developers will simply use meshes created with an external modeler (like Blender) because the terrain system isn't capable of creating complex features (ie overhangs) and is lacking in performance.
    • It's a traditional heightmap-based system. Once you've learned the basics of one of them you've learned them all.
    • Most of the complexity with using the terrain system isn't with the actual terrain system but with the Unity editor interface itself. Once you've gone through the Unity learn tutorials properly you will have what you need to use it.
    Right. You're waiting to be spoonfed. We're willing to assist people with learning the engine but we're not willing to write down every single step you need to create your game. At that point we may as well create the game ourselves.
     
    Last edited: Jan 4, 2017
    DroidifyDevs likes this.
  29. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    I do not understand you are trying to help me or not. You are spending your time just for reply my topic but still you want to watch torture myself. How much weeks you need for the answer? In this 1 week i opened Unity 15 or 20 times in a day and closed without doing anything.

    Yes i know Warcraft 3 World Editor very well and back in the days if i see someone trying to do things, first i am telling them what actions or conditions they need but if i see the same person cannot find solution, i am telling them how to. Even sometimes i am opening World Editor, creating code and sending him. I am a person like this. So this is why i find merciless most of you. I was helped many people but nobody helping me. That hurts. Thanks anyway.
     
  30. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,192
    We are helping you. You just don't like the answer.
     
  31. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    This one still going?

    Did you ever bother to try create a height map outside of Unity? I'm curious to see your attempts.
     
  32. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,192
    Yes, because I foolishly clicked the thread again to read the post by @DroidifyDevs which led to posting again. :p
     
    Kiwasi likes this.
  33. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    Yes i did. Why are you still here? You are not here for help everbody can see this. I am here for question and i am asking very specific question and looking for solution.

    No? Then why still i can't paint between the grids? Or why still i can't find a way create brush that fits between the grids? Can you see what am i missing?

    By the way just realized. You guys you don't know too :D or you have a personal problem with me. 1-) You know but you do not want to help
    2-) You too don't know answer
     
    Last edited: Jan 4, 2017
  34. DroidifyDevs

    DroidifyDevs

    Joined:
    Jun 24, 2015
    Posts:
    1,724
    I'm sorry :(. I'll gift you a cookie for your sufferings.

    Why don't you look at the answers. No one is going to tell you what to do, button by button. So far you've had very good answers when summed up, that state the following:
    • Don't use the terrain editor to fill squares.
    • Do some tutorials on unity3d.com/learn/tutorials, even if they don't talk about filling a square.
    • I've used Gimp and it could probably do that as well.
    So why not do tutorials so you know what we're talking about, and then follow those answers?
     
    Ryiah likes this.
  35. DroidifyDevs

    DroidifyDevs

    Joined:
    Jun 24, 2015
    Posts:
    1,724
    The answers are:
    • Don't use the terrain editor to fill a square
    • Do that in Gimp, Paint, Photoshop, Pain.net
    • Import meshes and sprites; don't make them inside Unity
    • Learn something on your own, even if it's not about filling a square
    Finally, you're insulting users who've used Unity for 2-4 years, you know about 0.0001% of what we do about Unity, and you're telling us that we're not helping AND/OR we don't know how to do it. Yes, I know how to add a square to my scene in Unity: UnitySprite.PNG
     
    Kiwasi and Ryiah like this.
  36. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    First, thank you because finally someone answered my question. And the second is, i want you to read my comment about it.

    Thank you so much. When i finish my job, i will check it and i will post when i do.
     
  37. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Because I like this place. I'm also bored, unemployed, and my wife is out of the country. So I might have just a little too much time on my hands right now.

    And what happened... What worked, what didn't. We can't help you without details.

    Behold, a perfect square grid in unity terrain. Built exactly the way I suggested to do it. (Although I would suggest upping the resolution for production. There are some ugly artifacts in there. And the terrain really doesn't know what its supposed to do at the grid intersections.)

    Capture.PNG
     
    DroidifyDevs and Ryiah like this.
  38. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,192
    We have been trying to help. It's just that the answer you need is not the answer you want.

    Here is my solution built using constructive solid geometry using an open source third party asset called SabreCSG. If you want to know why I didn't recommend it earlier it's because you're simply not at the point where you are capable of using it.

    Beginners need to start with beginner topics. This solution is anything but a beginner topic. We've been here for years, we've gone through the Unity tutorials. If you think you know something we don't you are seriously mistaken. We don't recommend these tutorials for giggles. We recommend them because they are necessary to move beyond the beginning stages.

    CSG.png
     
    Last edited: Jan 4, 2017
    DroidifyDevs likes this.
  39. DroidifyDevs

    DroidifyDevs

    Joined:
    Jun 24, 2015
    Posts:
    1,724
    Just out of personal curiosity, did you use a heightmap? I've never used heightmaps before but I know the jist of how they work.

    Lucky you! I'm sitting here working my ass off in high school, and I have no idea as to what college I'm going to after that. Also you mentioned that you're doing freelancing, so that's not exactly unemployed ;)
     
  40. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    It is when you have no jobs running.

    Yeah, that's a height map solution. I basically exported a blank height map from Unity, opened it in photoshop and drew a grid on it. Then I imported it back to Unity. As you can see the Unity terrain is not well equipped to draw perfect squares, which is probably why there is no square brush in the firmest place.

    Another alternative I considered is to do it via script. I have a scripting tool that I use to generate Unity terrain from noise. It's built fairly modular, so it's actually possible to replace the noise module. I could plug in a square function and output square terrain, complete with splat maps.

    But I considered that cheating for the purposes of this thread.
     
    DroidifyDevs likes this.
  41. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,192
    I thought you might have simply grabbed a checkerboard pattern from Google Images as there are a ton of them with all sorts of variations but following your own steps as you outlined does eliminate any of the nonsense that they're somehow unhelpful.

    At the same time I felt someone had to show the OP the difference between using the terrain system for a purpose it was simply never designed to fulfill and using a solution that is capable of making perfect squares. You would have to greatly increase the resolution of the terrain to give an approximation of my solution but that would destroy performance.

    Then you have the simplest solution - using Unity's plane and cube primitives - but the OP wouldn't know about those because he hadn't gone through the Roll-a-Ball tutorial. One of the simplest tutorials would have given him a solution that would have reduced his days of work to minutes. Stubbornness just doesn't pay.
     
    Last edited: Jan 5, 2017
    Kiwasi and DroidifyDevs like this.
  42. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    Guys i am bit of busy just came to home and need to sleep when i woke i will read your comments and try your suggestion. Need to sleep and thanks all of you again.
     
  43. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    Thank you for your help.

    Yes. If someone comes and asks very specific question to you and if you realize he is greenhorn and still you can't give specific answer, you cannot say "he is insulting me"

    In this situation there is 2 things you can do

    * Exact answer for him
    * Ignoring him

    I already told you i am new and i do not know. And again i already told you since 1 week i cannot find the solution. But still you are not giving "exact" answer.

    Here is the simple logic for the kind and nice persons. If you see someone was waiting for spoon-feeding you do not need to help him actually. But if you see he is trying for few days, watching tutorials, videos, reading and searching, yes you can tell him. Because he is trying to do something. NOT WAITING WITHOUT DOING ANYTHING.

    During my Warcraft III World Editor days (2002-2016) i have helped lot of people but this world is evil. It was my fault actually. I was hoped someones like me comes and see my efforts and decides to help me. My fault. Sorry for everything.
     
    Last edited: Jan 7, 2017
  44. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    You could have just stopped with thank you. :p

    Out of curiosity which method did you go with? Show off a screen shot of your result.
     
    DroidifyDevs likes this.
  45. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,192
    Here is the simple logic for someone who is new and asking for directions... they should listen to the advice given. We told you that the best way to get started was the Unity learning section but you simply threw out the advice and labelled us as trolls.

    If your goal is to never progress from the beginner stages of development... you're going about it the correct way. Very few people dive into an engine head first rather than listen to our advice and most of them are never seen from again.

    The relative few who discover that the head first approach was a very foolish mistake and decide to give the learning section a try end up becoming productive developers and graduate beyond the beginning stages.
     
    Last edited: Jan 5, 2017
    DroidifyDevs and Kiwasi like this.
  46. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    Here is the problem.

    Person 1: Guys i have watched, checked, looked, read many tutorials in 8 days
    Person 2: Read tutorials

    It is impossible to communicate person 1 and person 2.
     
  47. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,192
    Watched and read which tutorials though? Additionally was it following along or simply watching and reading? I would hope that if you had already gone through the Unity learn section or a similar resource for learning the basics of the engine you would already know how to create a folder in Unity. Just about every tutorial with any substance to it covers that.

    Knowledge of the basics, or lack thereof in your case, tends to point out whether someone has gone through the appropriate steps of learning an engine and a folder is one of the most basic concepts for the editor there is.

    Once again my only conclusion is that you are attempting to dive in head first. Hope you don't drown.
     
    Last edited: Jan 6, 2017
  48. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Completing the learn section in eight days is an impressive feat. It requires a genius intellect. (And possibly a Harry Potter style time turner, it must be getting close to having more then eight days of material there.)

    It puzzles me how such a genius/wizard also cannot follow simple instructions to generate a height map in an external tool such as photoshop.

    But I'm a mere mortal. It took me several months to complete the learn section. And another year to consider myself competent with the engine. It's not my place to question those with Godlike powers.
     
    Ryiah and DroidifyDevs like this.
  49. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    Ok.

    Edit: Problem is not solved. I cannot paint top of the sprites..
     
    Last edited: Jan 7, 2017
  50. jfamap

    jfamap

    Joined:
    Dec 26, 2016
    Posts:
    41
    Me again. I cannot paint top of the sprites. That means still i cannot find solution. Is there another way to do that?

    For an example Correct the grid size for the exact size of "ANY" size of brush

    OR

    Editing brush for the exact size of grid squares

    OR

    Scale brush size like 0.8, 0.5 etc etc instead of 1,2,3,4 etc etc

    OR

    Any method you know?

    Edit: This time i will not discuss. As i told you i am here for solution. No more i care pointless posts.