Announcement

Collapse
No announcement yet.

Creating custom trees. Tutorial

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Creating custom trees. Tutorial

    Ok, so here's the steps I follow to make trees(from what I've learned and tested).
    Might not be the best technique, nor the most accurate, but I hope it helps.
    PS: A lot of games use this kind of technique, or simmilar from what I've seen.
    Enjoy!



    I'm going to be using Blender, but you can do this in any 3D software, I guess.
    The whole tutorial is going to be split into 2 parts.

    1) MAKING THE TEXTURE

    The first thing is getting some sort of general information of the tree you'll be doing. In my case, I'll be doing the Alpine Larix decidua pine tree (yea, complicated). So type in google that and geather some info on wikipedia.



    After that, go check out google pictures and at first you'll find a lot of trees (from the most weird stuff to the stuff you're looking for).



    Then after much scrolling, you'll eventualy find the picture you are looking for.



    Now then, It's time to open up Blender. So we have to model everything all the way from the tiniest needles to the large branches.
    We will start with modeling the needles. It's enough to model somwhere around 20 different needles.




    In my case, the larix deciduas tree needles are from 2 to 4 cm long and are light green. So now that that's done, lets put them together to form a cluster. Make sure that the origin of all the needles is in the center of the cluster. It's easier to rotate the needles in the cluster and for the future step. You can use some sort of displace modifer to deform a cluster and give it a bit more deformed look (in blender I used the ocean modifier (stupid, I know)).


    #2
    Lets project them from the top and texture them one by one. (kind of long step). First choose a light green and paint the whole cluster. Next, choose the blending to be 'multiply' (with the same light green) and softly paint the middle. Finally choose the blending to 'add' and paint the edges like on the picture below.


    Ok so now we have 3 different clusters that are painted. The next steps are going to be time consuming if the 3D software you are using doesn't support particles. Lets model The branches!


    It's quite simple really. You check some of your concept or reference and you model accordingly to that. Have the sub branches seperated from the main branch. One last thing, subdivide the branches acouple of times ( it's important for the next step).


    With that done, you can unwrap the branches and place a texture. Have this in mind when scaling the UV's, if you scale the UV's too much, the final result is going to look as if there is only one colour on the branches. If you don't scale enough, you'll get this chunky, pixelated, crapy looking result. Be wise!


    I hope you are still with me. The next thing is placing the needles. As I said before, you can place the needle clusters manualy [ ], or you can use particles. So if we decide to use particles, we are going to have other worries. Lets choose the particles from emitter to hair and choose them to be emitting from verticies.The needles on the main branch should be larger (wider) than the ones on the sub branches, so 2 particle emittors are used.


    When happy with the results, try making some more branches. In my case, I just coppied some sub branches, scaled them to fit and used them elsewhere.



    You can stop here, if you want. You can just place the camera to fit, change some options and render the branches. But why not make something more!? Lets make a bigger branch! First we need to make a larger branch than the ones we used. On this main branch we'll put the smaller branches that we made. Don't forget to unwrap the main branch.

    Comment


      #3
      To add alittle more detail (as with real branches), make alittle bevel in some places. On these bevels, place the branches.


      Now you should have something like this!! At least I have...


      In the final stages, place the camera to fit the whole branch (or ajust the branch).


      And finally, make sure that everything is in place. It's crucial.


      I've set my texture to be 1024x1024, maximum resolution and ambient occlusion set to 'add' by a value of 0,4. Render it, save it. Ooh and by the way, go ahead and render the ambient occlusion map too, because we are going to need it in photoshop. And the normal map..
      Now I'm not going to cover the whole photoshop editing, just the final result, because I'm assuming that you have a basic knowledge. Or in any other image editing software.


      There, the texture is finally finished!! To make new textures, just place the branches differently, maybe change the particle emitter, different colour. It's easier now that you've got everything.

      2) USING THE TEXTURE

      Now that we've made textures (I assume you made more but that's ok if you haven't), we are ready to use them. We'll be making the larix decidua as we started.
      First, we need to make the trunk.


      If you're not sure how the tree is constructed, look up your reference again.


      Make sure that you compare it with the reference and rescale it if needed.

      Comment


        #4
        Mark the seams. Don't forget to delete the bottom face of the trunk. It would cause problems when unwrapping.


        By the way, It's best if you use the same texture for the trunk as used for the branches.



        Ok, the trunk is completed. Now onto the branch placing.
        Again, open up your reference image, you'll need to be looking at it alot in this step.
        First let's make the actual plane where the texture will be applied. Unwrap it!


        Place the UV's of the plane on a branch in your texture that you are going to use.


        Make sure that the bottom edge is still touching the branch, or else you are going to have problems when placing the planes on the trunk.


        And rescale the plane if there is stretching, or to your hearts desire.

        Comment


          #5
          With that completed, we just need to make it NOT flat, so follow these steps. First make a loop cut on the middle and align the branch to be in the middle (the vertical)



          Then make another one on the other middle (the horizontal). Bend the end of the branch a bit uppward. In the reference image, the branch is sloped upwrad.


          Were almost there.. Now to place the branches. Sadly, it's a time consumer.
          Load up the reference image so that you have it on the background and place the branches accordingly to the image. PS: In the previous step, I made another branch with needles and a dead branch and packed everything in one 1024 texture. I've used the dead branch at the bottom.




          And you just completed your larix decidua pine tree !! good job (if you really have).
          I'm using UDK to render the tree so here's the final result!


          In my opinion, my final result dosen't look full. Maybe needs alittle more needles. Hope you made it better looking than I have.
          Might not be the best tutorial or even the best technique, but hope it helps at least 1 person.
          Comment on what you think, if you have any questions, if you didn't understand something,...ΒΈ

          Here's my original thread http://forums.epicgames.com/threads/979615-Trees

          Ohh and post your work!

          Comment


            #6
            I am a big fan of modeling trees. The way I do it is kind of like yours in a way.

            I model the base trunk, and 3 different branch types, along with 3-4 different 2d branch types in photoshop. They are placed on a simple 2 faced polygon and arranged on a branch. I do 4 unique branches, then duplicate and group them together. Grid arrangements I hand place for fullness and randomness.

            Here is a few screenshots of my most recent work in Counter-strike GO, my map de_serenity:

            http://img109.imageshack.us/img109/1...3041300001.jpg
            http://img16.imageshack.us/img16/2898/2013041300005.jpg
            http://img689.imageshack.us/img689/9...3041300002.jpg

            Comment


              #7
              Nice work you have there. I see you used cross planes for the leaves. The only difference between your trees and mine, are the branch and leaves placement. Gonna have to try and make those kind of trees.

              PS I've heard that when making those kind of trees, it makes them look even better if you use a trifoliate geometry ( 3 crossed planes that go along the x, y and the z axis) instead of simple crossed planes for the leaves.

              Comment


                #8
                Thank you I like your work too. Not all trees have to be full to look good. If you have the form and believable branches that look unique it can work very well

                It does look awesome with more planes but really adds to the polygon count even if its 2 simple faces if your trying for a realistic full tree.

                Ive always been inspired by the Crysis series. they know how to make believable foliage. I think personally that the secret to good video game trees are in the branch/leave textures themselves. You can "fake" fullness with a good branch texture. One technique the Crytek guys use is to only model the base of a branch, and the rest of it is a 2d texture. Sounds bad, but works out well with so many other branches in the model it makes a believable full tree. They do this alot in Crysis 3.

                And dont get me started on speedtrees lol, I hate them. Cheap bad looking shortcut with repeating sprites. Looks so bad and fake. To me their only use is for distant objects in the background.

                Comment


                  #9
                  Hmm the technique they use sounds quite good. Actualy, this could add more control (if you wanted to rotate the branch) and alot more detail. Bad thing is, the polly count can get really high, but then again, next gen is here and the foliage now uses so much memmory. Gonna have to do some research on the metods crytek use for making trees and foliage, thanks for mentioning it.

                  Well, since you mentioned speedtree, the one good thing about it is that it makes nice trunk models with sub branches. I actualy studied from it long time ago. But yeah, it's preety wrong, because people in the industry tend to use sprites instead of actual static planes. It's like the leaves are watching you.

                  Ohh and here's the result of the pines when useing more planes. The polly count is around 2000 on each tree, so I'm using LODs.
                  It really does look better as you said

                  Comment


                    #10
                    Looks very good looking forward to seeing your competed forest or whatever scene/map your making.

                    Comment


                      #11
                      Thx. I have something in mind though. One bad thing, I won't know what to do with the completed map . Since geting a job in the industry is imposible, I'll probably upload everything on a new thread!

                      Comment


                        #12
                        Thats a great job matjo, those trees(especially the final picture) look wonderful!

                        Comment


                          #13
                          Looks good , i would suggest adding more polygons to branches/leaves to make masked area as small as possible

                          Comment


                            #14
                            Nice! So many people ask how to make trees and here is your tutorial. I have 1 tree for my game so far - tree branchs are nice, but leaves X.X - I am never sure about the angles, polygons... does it look right... so thanks man, your tutorial and your chatting above with skilled tree people like Xyos212 will be taking me through that process

                            Comment


                              #15
                              LordNelson7: Thx, your the man !

                              Adrenen: Yeah I saw that on Epic's trees, thought it was a waste of geometry, did some tests and research and found out that having less alpha opacity on a plane actually uses less memmory, as you said. Some detailed information by Eric Chadwick (http://wiki.polycount.com/TransparencyMap#Alpha_Blend)

                              Snipe34: You know, I've been in your position as well. I also looked for tutorials or anything in particular about this. Never found anything ( exscept tree generators (the good ones usually cost, and I don't want to spend money :P)), so I decided to start research and went to the alps, took pictures, read about trees, ask people and eventually tried something. Just do it!
                              ___________
                              If anyone's interested, I could post the textures I'm using for the needles and more!

                              Here's another picture I made using less opacity and more pollygons. I also have 3 LOD's, so basicly it runs smooth. It looks like **** but it's a start:

                              Comment

                              Working...
                              X