Monday, 22 February 2016

Implementing my Assets into UE4

Not that I have different variations of rocks, grass and palm trees I am going to export them into Unreal Engine, straight away all I have to do is apply the material to the rocks and they are good to go, however I am going to add a little bit more detail to the grass and palm trees to make them look more natural and life like, I could just leave them as they are however they would just be still assets and wouldn't have any movement and simply wouldn't look as natural and life like as they will once I have applied an opacity and wind node to my grass and palm tree leaves.  I will start off with the grass, I started by using the grass texture that I had previously edited in Photoshop.  I wasn't really all that happy with my grass texture at first as I thought there was still a halo effect visible, not much thought but still enough that it would be visible to the player in my opinion, this would mean that there will be a small white outline on my grass and I don't want this at all because it would effect my grass aesthetically as it won't look as good or realistic with a white outline around them.  I brought the texture back into Photoshop and made the background layer green, this will not necessarily get rid of the halo effect however it will now change it from white to green so the player will not even be able to tell and my grass will now look more realistic and natural.  Alternately I could have gotten another grass texture and started again however there wasn't really much point as I was happy with this grass texture and all I had to do was change the background layer.
Now that I have fixed the halo effect problem I am going to get rid of the green background on my grass texture so that it will just be my grass the player sees, this process was quite simple, I started by changing the blend mode to masked, this would then allow me access to the opacity mask setting which I need in order to make the background in my texture invisible, next I changed my shading node to two sided foliage so Unreal Engine will recognise that I am creating foliage for my level and will give me access to the world position offset option that will let me use the wind node that I will be using soon and finally I ticked the two sided box so that my grass would be visible for both the front and the back rather that it just having grass on one side and being black on the other.  Next I created a link from my texture into opacity however I did not get the outcome that I was expecting, instead of making the background invisible it made the grass invisible which is not what I want at all as I obviously want my grass visible and my background invisible.  To fix this problem all I had to do was to break the link from my texture to opacity and then I simply created a new link from my texture into opacity mask, this has now gotten rid of the background and left me with just my grass texture visible.  Finally I am going to create a wind node that will add a wind effect to my grass material which will make it look as though there is wind blowing through it.  To do this i dragged a pin out from world properties offset and created a !!!!!.  I was then able to experiment with the wind intensity and wind weight, I set the wind intensity to 0.15 and the wind weight to 0.35 so that I just looked as though there were a gentle breeze running through my grass rather that a strong wind as a gentle breeze would be more suited to a tropical environment.  Here you can see my final grass material:
l am now going to do this process for my palm tree leaves, this process was pretty much the same as my grass material however I did not have to bring this texture back into Photoshop as there was no halo effect on my leave which is great as there will not be any visible white outlines around my palm tree leaves.  I did run into a similar small problem though that I encountered when making my grass material, whenever I connected the palm tree leaf texture to opacity it did not get rid of the background but it got rid of the leaf itself instead.  However I learned from previous mistakes and this problem was very easy to fix as all I had to do was simply break the link from my palm tree leaf into opacity and replace it by linking my palm tree leaf texture to opacity mask, this successfully got rid of the background and left me with just the leaf.  The only other thing that I done differently with my palm tree leaf was some slight adjustments to the wind intensity and wind weight within the wind node, I changed both the wind intensity and wind weight up to 0.45.  The reason I done this was because palm leaves are considerably bigger than grass and therefore when wind hits them they will move a bit more than the grass would.  I think my palm leaf look great however if I had the option of going back and changing anything I have considered and experimented with more leaf variations, however I'm still really happy with how it turned out.  Here you can see my final palm tree leaf material:

















Now that I have done this I am going to use the foliage painting tool to paint put them into my landscape, I will start with the grass.  First I dragged and dropped my grass assets into the paint tool, this will allow me to paint on these eight assets simultaneously, I can also adjust the brush size which means I have the option of making my brush big so I can cover large chunks of my landscape or alternately I can reduce my brush size which will be useful for filling small areas, patches that I may have missed, corners, etc.  I can also adjust the density of the brush which basically means I can adjust how close or far apart my assets will be.



Above you can see how I have begun to use the foliage paint brush, already I have to say that it is incredibly fast and places the grass on the landscape very accurately as I had anticipated that not all of the grass assets would stick to the ground and may either go through it or float above it, but needed had worried, this looks great.  I set the brush size to a medium size here just so I can get a familiar with the foliage paint tool and I set the brush density quite high as grass will obviously be very close together.  Alternately I could have just simply dragged and dropped my grass assets into my scene manually however this would have taken an incredibly long amount of time and more than likely would not have looked as natural as when I use the paint brush.    
And I am now going to use the same method for my palm trees however I will make some minor adjustments, first I have to untick the grass assets the the paint editor when I drop in my palm trees as I only want to paint on my palm trees now and not my grass, I then adjusted my paint brush to be quite big and set my brush density very low.  The reason I have done this is because I wanted my palm trees to be mush further apart than my grass, I could have just left it at the same settings from when I made my grass however my palm trees would be much to close together and they'd all be overlapping each other.  Again, I could have just dragged and dropped my palm trees into my level but it would have taken so much longer and the paint brush does a great job at spreading them randomly for a more natural look.

And here you can see the results:



I am so happy with how this turned out, the grass looks great, it really looks like there is a slight breeze running through it, I simply did not expect it to turn out that well from what I had seen in Photoshop and Maya, if I had time I would have went back and created some more variation and added some grass clumps with flowers through them, however even though I have not had the time to do this I am still so happy with how it turned out.

I am also really happy with my palm trees, they look life like and the leaves look as though there is wind blowing through them, there isn't really anything I would have done differently with this process other than maybe add some more leaf variations however its not really that big of a deal as I think they turned out extremely well.  Actually, I would have went back and used Crazy Bump to apply a texture to my tree trunk as they are now very smooth and this would have given them a bit of a more life like appearance.

And finally I'm am overall quite happy with how my rocks turned out, they look pretty good in this environment however had I had more time I would like to have created more variation.  Other than that I am very happy.

No comments:

Post a Comment