Personal blog of Edvinas Petrauskas. Click here to go back to the portfolio: http://edpetrauskas.co.uk
Saturday, 13 June 2015
Photoshop PBR value swatcher
I was looking to start a swatch set to store base sRGB albedo values for different surfaces, so I wrote a quick Photoshop script to make the process faster and less tedious.
It's pretty self explanatory, but I'll quickly go through it. You can input linear values (in either 0-1 or 0-255 range) as well as names into the textfield, separated by a comma and one per line i.e.:
0.25,grass
0.04,charcoal
0.85,fresh snow
and the script will loop through them all, convert the values to sRGB and add them into your current swatch set.
There is a checkbox called Colorize, when ticked it pops up a color picker dialog for each value before adding it as a swatch, so you can tweak the color if you don't want it to be a greyscale value.
You can find the values on the charts that are available or somewhere else on the internet.
Download the script here:
http://edpetrauskas.co.uk/downloads/pbr_value_swatcher.js
Place it in your "photoshopdirectory\Presets\Scripts" and access it through File->Scripts in Photoshop, or make an Action or something and bind it to a key :)
Monday, 8 June 2015
Puddles!
I wanted to add some puddles into the scene. I checked out the awesome article from the "Remember Me" guys (https://seblagarde.wordpress.com/2013/01/03/water-drop-2b-dynamic-rain-and-its-effects/) and it seemed pretty straight forward on how to do it, except that I wanted to have the puddles on UE4's Landscape and not a static mesh, so it quickly became a bit less straight forward :D.
While in general it worked, the main problem was that there is no way to get the value of the landscape paint layer (or at least none that I could find) the way that you can get the value of the vertex color that is painted on a static mesh. It was important because the value controls the transition between puddle and dry land in the material to tell it how saturated / opaque it is etc.
The solution was... pixelz! I created a black and white texture mask where I wanted to puddles to be and then I was able to plug it in my landscape material on top of the landscape paint layers to add the puddles in. Not the best solution, but for a small scene like this it worked well and because it was a texture, I was able to get the value of it to control parts of the puddle material where normally vertex color values would be used.
Since the landscape is pretty huge and it would require the texture mask to be gigantic in size, to get better texel density I tiled the mask on the terrain in the way where the puddles still roughly align to where I originally wanted them to be, and then any of the ones that end up repeated around are removed using another mask which can be low resolution.
I also decided it would be nice to add some subtle wind to the puddles, since the scene is a bit windy. A quick and dirty approach for now was to pan a tiling wavy normal map across puddle, which is lerped with a flat normal and the alpha of the Lerp is controlled by Time plugged into Sine nodes and randomized a little.

While in general it worked, the main problem was that there is no way to get the value of the landscape paint layer (or at least none that I could find) the way that you can get the value of the vertex color that is painted on a static mesh. It was important because the value controls the transition between puddle and dry land in the material to tell it how saturated / opaque it is etc.
The solution was... pixelz! I created a black and white texture mask where I wanted to puddles to be and then I was able to plug it in my landscape material on top of the landscape paint layers to add the puddles in. Not the best solution, but for a small scene like this it worked well and because it was a texture, I was able to get the value of it to control parts of the puddle material where normally vertex color values would be used.
Since the landscape is pretty huge and it would require the texture mask to be gigantic in size, to get better texel density I tiled the mask on the terrain in the way where the puddles still roughly align to where I originally wanted them to be, and then any of the ones that end up repeated around are removed using another mask which can be low resolution.
I also decided it would be nice to add some subtle wind to the puddles, since the scene is a bit windy. A quick and dirty approach for now was to pan a tiling wavy normal map across puddle, which is lerped with a flat normal and the alpha of the Lerp is controlled by Time plugged into Sine nodes and randomized a little.
Progress on the scene
Some slow progress on the scene.
I gave in to the idea of surrounding the area with trees (breaking bad scene all over again! ;D). I thought it will look better and definitely make more sense from gameplay perspective instead of leaving it open as it was before. I didn't want to close all of it off though, so I left a part of it open which shows vistas of buildings of a city that is nearby. I thought the idea could be that it is the destination for the player(s), who emerge from the forest and are forced to explore the farm house and stay there overnight because it's getting dark and they are too low on supplies to continue on the path to the city.
I gave in to the idea of surrounding the area with trees (breaking bad scene all over again! ;D). I thought it will look better and definitely make more sense from gameplay perspective instead of leaving it open as it was before. I didn't want to close all of it off though, so I left a part of it open which shows vistas of buildings of a city that is nearby. I thought the idea could be that it is the destination for the player(s), who emerge from the forest and are forced to explore the farm house and stay there overnight because it's getting dark and they are too low on supplies to continue on the path to the city.
Reorganizing and custom tools
I'm not dead! Just been a bit busy, but I've spent some time tidying up the project and thinking of ways to stay more organized and work faster. One of the things I did was revisit Mel script so I'd be able to write myself some tools to improve my workflow for this as well as any future projects.
I noticed that my projects were always becoming messy and it was really slowing me down, so I rethought my folder structure and then wrote a little Maya tool to help keep myself organised and work faster:
It let's me add/remove categories for assets and specify export folder for them, for instance Foliage, House Interior, Exterior Props etc, and then assign them to any mesh in the scene which then allows for fast one-click exporting as well as having quick access to all of the assets if I want to open them or insert them into the current scene, without having to search through the folders.
It also allows for one-click texture exporting, it grabs the textures plugged into the shader of the model, asks me whether it is a tiling or unique texture and then copies them into the correct folder inside my project directories.
Besides that, it has some smaller features that I found are quite useful, for example creating a new asset, which allows me to pick a starting shape i.e. cube / cylinder / plane etc., and creates a new scene with it as well as a scale reference on the side of it which is semi transparent and added to a layer that is set to be Render-only. Apart from that I am also able to add a new scale reference in and quickly apply a checker material to a selected object.
I found that the tool works really well together with UE4's auto import. I made it scan the folders to which my Asset Manager tool exports the models and textures to, and auto import them into the project. Works super smoothly!
Next on the list is to identify some of the common workflows I use while creating certain type of assets for example foliage or architecture and create a tool to have quick access or to automate some of the aspects.
I've also looked into hotkeys which for whatever reason I never really used much in the past. Maybe because of the clunky pre-maya 2016 hotkey editor, which they have now updated to be much nicer to use. I've set up keys for some of the most common tools I use e.g. extrude, bridge, multi-cut, merge verts, bevel etc., as well as some custom commands. One trick I found to minimize the amount of key combinations, is to assign different commands to the same key combination but based on the component that is selected. For example having edges selected activates the Connect tool, having whole model selected activates Add Edge Loop, and having faces selected activates multi-cut. This requires some Mel (or python) scripting, but it works really well ^^
I noticed that my projects were always becoming messy and it was really slowing me down, so I rethought my folder structure and then wrote a little Maya tool to help keep myself organised and work faster:
It let's me add/remove categories for assets and specify export folder for them, for instance Foliage, House Interior, Exterior Props etc, and then assign them to any mesh in the scene which then allows for fast one-click exporting as well as having quick access to all of the assets if I want to open them or insert them into the current scene, without having to search through the folders.
It also allows for one-click texture exporting, it grabs the textures plugged into the shader of the model, asks me whether it is a tiling or unique texture and then copies them into the correct folder inside my project directories.
Besides that, it has some smaller features that I found are quite useful, for example creating a new asset, which allows me to pick a starting shape i.e. cube / cylinder / plane etc., and creates a new scene with it as well as a scale reference on the side of it which is semi transparent and added to a layer that is set to be Render-only. Apart from that I am also able to add a new scale reference in and quickly apply a checker material to a selected object.
I found that the tool works really well together with UE4's auto import. I made it scan the folders to which my Asset Manager tool exports the models and textures to, and auto import them into the project. Works super smoothly!
I've also looked into hotkeys which for whatever reason I never really used much in the past. Maybe because of the clunky pre-maya 2016 hotkey editor, which they have now updated to be much nicer to use. I've set up keys for some of the most common tools I use e.g. extrude, bridge, multi-cut, merge verts, bevel etc., as well as some custom commands. One trick I found to minimize the amount of key combinations, is to assign different commands to the same key combination but based on the component that is selected. For example having edges selected activates the Connect tool, having whole model selected activates Add Edge Loop, and having faces selected activates multi-cut. This requires some Mel (or python) scripting, but it works really well ^^
Sunday, 17 May 2015
A start on some foliage
For the breaking bad scene I left foliage till very late in the project and then ended up rushing it and had it looking quite awful, so to not repeat the mistake I thought I'd work on it early this time. I spent most of past week looking into games that have pretty foliage like Crysis 3 and studying it to try and understand their approaches. Learned quite a bit and figured out some nice techniques, especially for ivy, so will be putting it into practice soon and might also write up a tutorial for anyone interested :)
Started working on and setting up some ground foliage, the grass has been a nightmare but I think I finally got it to look better. Started blocking out the barn at the same time as well, still super rough, not sure yet if I'll keep it red paint with most of it being chipped/worn off, or just plain bare wood
Some screenies:
High poly dandelion:
High poly grassblades:
Started working on and setting up some ground foliage, the grass has been a nightmare but I think I finally got it to look better. Started blocking out the barn at the same time as well, still super rough, not sure yet if I'll keep it red paint with most of it being chipped/worn off, or just plain bare wood
Some screenies:
High poly dandelion:
High poly grassblades:
Labels:
exterior,
flowers,
foliage,
grass,
last of us,
walking dead
Thursday, 7 May 2015
Courage game project wrap-up
Had to jump back to the Courage game project we were working on during our last semester of university, to create a trailer and set it up on CG Student Awards. Damn trailers! Always take forever to do :P. Got it finished though, here is video:
More info can be found here:
http://playcourage.co.uk
And some screenshots can be seen on my portfolio:
http://playcourage.co.uk
And some screenshots can be seen on my portfolio:
I can finally get back to my house scene!
Monday, 27 April 2015
Back!
It's been a while, but uni is finally over, so I can now re-organize myself and start updating this blog. Got a lot of personal projects planned for the next few months, so there should be a lot of wips and such to post :).
First project I will be taking on is transferring one of my unfinished locations from Project Courage to a new scene and using it as a blockout for a Last of Us / Walking Dead inspired abandoned farmhouse (interior and exterior). Will be looking to get it done (or at least to a presentable standard) in a bit over 2 weeks, as I want to enter CG Student Awards and the only finished/ polished piece of work I have right now is the Breaking Bad cabin, so obviously need something more :p.
Really excited about this project as I'm a huge Last of Us and Walking Dead fan and I've been meaning to do something similar for a while now.
Here are some screenshots after transferring the scene and messing with some lighting, none of the assets are finished and no proper lightmap uv's so ignore the quality and the bugs. Most of it will be redone/ updated, the current assets will serve well as blockouts / starting points so I don't have to start everything from scratch
Currently will be blocking in the exterior and then look into whether it's worth extending the house before I dive into making/updating assets. It feels a little small and I'd love to extend it more but I'm not sure whether it's worth it :p.
For the lighting, it is all static, I have a skylight and a directional sun light, as well as spotlights by the windows. Also added few low intensity green point lights by the windows to fake some very subtle greens bleeding into the house from the vegetation outside.
First project I will be taking on is transferring one of my unfinished locations from Project Courage to a new scene and using it as a blockout for a Last of Us / Walking Dead inspired abandoned farmhouse (interior and exterior). Will be looking to get it done (or at least to a presentable standard) in a bit over 2 weeks, as I want to enter CG Student Awards and the only finished/ polished piece of work I have right now is the Breaking Bad cabin, so obviously need something more :p.
Really excited about this project as I'm a huge Last of Us and Walking Dead fan and I've been meaning to do something similar for a while now.
Here are some screenshots after transferring the scene and messing with some lighting, none of the assets are finished and no proper lightmap uv's so ignore the quality and the bugs. Most of it will be redone/ updated, the current assets will serve well as blockouts / starting points so I don't have to start everything from scratch
For the lighting, it is all static, I have a skylight and a directional sun light, as well as spotlights by the windows. Also added few low intensity green point lights by the windows to fake some very subtle greens bleeding into the house from the vegetation outside.
Subscribe to:
Posts (Atom)

















