May 122016
 

Hello everyone especially all of you students from Uppsala University, hope you enjoyed our little talks, I sure did.

Today we’ll be looking at creating a super simple shader which will make grass, or any object for that matter, maybe a flag or tree branches, flow in the wind, based upon a vertex paint and a single scalar value.

At the bottom of the post you will find a .rar file with a mobile (unlit) and a PBR version of the shader, ready to open inside of Shader Forge.

First up, a semi-short video where we look at vertex painting in Maya, 3Ds Max and Blender.

In part two we create the shader inside of Shader Forge.

Or if you’re in a hurry, here are the actual Grass Shaders!

 Tagged with: , , , ,
May 032016
 

eco tales sick of you villain

Recap 14 and you’re back? Guess the boys are more interesting to you than they are to me.

What they’ve been up to this week? Well Jona found 3ds Max 2017 and started boasting about knowing how the new UV mapping system works.


JOur Lech sure is a ray of sunshine, bet you can’t wait to meet him in game!
So what have I been up to? Well first of I’ve created this tutorial for the new 3Ds Max 2017 UV-mapping features.

It’s become quite popular as far as tutorials go, so why mention this here? It’s actually a part of our new marketing scheme, pushing out free amazing (we hope) tutorials which all reference Eco Tales in some way.

In this one it’s Lech himself being peeled by the new UVW scalpel, additionally there’s an ever present link to the blog, and once every so often I talk a little about Eco and tell people where to look for it.

In 72 hours it’s been viewed 750 times but there has not been any noticeable increase in traffic to any of our social media channels.

I also made this for Krister, I hope we’ll be able to show more of what this is soon!

EcoMay1st


Khas declined comment this week, I think what he did to my gcode has something to do with it.

FirstPrint

Krister’s print.

 Tagged with: , , ,
Apr 092016
 

Hello everyone,

Today at work I wanted to setup my Maya to zBrush connection as I find collapse edges to be amazing… Not that you care about the reason if you’re here so, without further ado here are a few solutions.

Unable to install : First up, if you can’t install it for some reason, copy userSetup.mel from : C:\Users\Public\Pixologic\GoZApps\Maya to C:\Users\USERNAME\Documents\maya\scripts if there is one there already, add this eval(“source \”C:/Users/Public/Pixologic/GoZApps/Maya/GoZScript.mel\””); to any line in the file.

Unable to find Maya : If the reason was that you have Maya installed in a custom location, there’s another file in C:\Users\Public\Pixologic\GoZApps\Maya named GoZ_Config.txt open it and add your maya.exe path to the file, in my case this us what was written in the file when I was done : PATH = “E:\Applications\Autodesk\Maya2016\bin\maya.exe”

Now to the reason you’re most likely here.

// Warning: file: C:/Program Files/Autodesk/Maya2015/scripts/startup/rememberViewportSettings.mel line 43: Active stereo does not work with Aero enabled. Active stereo has been disabled. //
// untitled //
// Error: file: C:\Users\Public\Pixologic\GoZApps\Maya\GoZBrushToMaya.mel line 113: Plug-in, "Mayatomr", was not found on MAYA_PLUG_IN_PATH. //
commandPort -securityWarning -name commandportDefault;
// AbcExport v1.0 using Alembic 1.5.0 (built Jul 25 2013 11:21:20)
// AbcImport v1.0 using Alembic 1.5.0 (built Jul 25 2013 11:21:20)
updateRendererUI;
// Error: file: C:/Users/Public/Pixologic/GoZApps/Maya/GoZBrushToMaya.mel line 113: Plug-in, "Mayatomr", was not found on MAYA_PLUG_IN_PATH. //
// Error: file: C:/Users/Public/Pixologic/GoZApps/Maya/GoZBrushToMaya.mel line 113: Plug-in, "Mayatomr", was not found on MAYA_PLUG_IN_PATH. //

This simply means that you need to have MentalRay for Maya installed, you can find it here : Maya 2016. After you’ve installed it, make sure it’s active as well, just follow these steps.

  1. Install mental ray renderer, using the installer.
  2. In Maya, select Windows > Settings/Preferences > Plug-in Manager.
  3. In Plug-in Manager, set Mayatomr.mll to Autoload.

There another solution (I didn’t try it out myself) but according to a user at Polycount you can edit the file GoZBrushToMaya.mel which can also be found in C:Users\Public\Pixologic\GoZApps\Maya\.

Starting on line 109 you’ll find this.

// ------------------------------------------
// GoZBrushToMaya requires Mental Ray plugin.
if (`pluginInfo -query -loaded -name "Mayatomr"`==0) 
{
 loadPlugin "Mayatomr" ;
 //setCurrentRenderer mentalRay;
}

Just add // in front of every line or replace it with this code.

// ------------------------------------------
// GoZBrushToMaya requires Mental Ray plugin.
//if (`pluginInfo -query -loaded -name "Mayatomr"`==0) 
//{
// loadPlugin "Mayatomr" ;
// //setCurrentRenderer mentalRay;
//}
 Tagged with: , , ,
Dec 032015
 

Hello fellow devs, and Hi mom!

To not overload the blog and Facebook page we’re going to write weekly posts, which we update 7 times each, once per day.

Let’s get this done!

December 2nd

Technical artist Jona searching for the meaning of life in the lens of camera.

Today I took a few asset I’d made for Unreal Engine 4 and pushed them through my Unity pipeline, sadly, most of my original files had been lost so this took quite bit longer than expected.

I will need to edit the textures a bit to fit in with the rest of the game.

Additionally, adhering to the one object per day rule I also created the cherries seen in the image below.

Fat Eco Man Day 2

5 hours of work


Programmer Krister in a bad mood on the subway.

For me, the programmer had a nice one hour yesterday as well, we had a small base of code from last weekend so I improved upon that, working with the weapon system, cleaning up and improving the attack code a bit.

So far I am working with temporary graphics of course, with some from Jona and some programmer made visuals, I think it is safe to say that I am the better artist of KJ.

Programmer art is much superior

Programmer art is much superior

December 3rd

Technical artist Jona searching for the meaning of life in the lens of camera.

I created the base of a flan asset using Maya and started looking into a custom shader to change colors of it depending upon taste, I’ve not yet decided if this it the way I’ll go with it, but there’s time for iteration yet.

I also started and finalized the ecological chocolate bar seen in the image. Most time was spent looking into the Unity 5 Standard shader.

I’ve yet to decide if PBR is the right way to go for this game, it’s lacking something important, maybe the lighting will stick, as for the rest, big things are coming, I’m sure of it!

Eco Dec 3rd

The first consumables are ready, time for custom shaders perhaps?


Programmer Krister in a bad mood on the subway.

I went wholeheartedly into creating a system to handle settings and configurations with restore to default capabilities and also started looking into using cInput. So not a big update for me, nothing as fancy as sweet chockolates but I am a firm beliver of having a strong foundation of these general systems inplemented early as it will help during development, also since we don’t have all the concepts and ideas of the game done it is something to work on while we figure things out.

December 4th

Technical artist Jona searching for the meaning of life in the lens of camera.

Busiest day of the week, managed to get an hour in, however, I wasn’t even close to managing a blog update after, spent too long on this haha.

One hour of work

One hour of work


Programmer Krister in a bad mood on the subway.

After creating the basic system for handling settings in the game I continued with creating a settings editor just to avoid the hassle of having to deal with the XML file.

XML Settings in engine Editor for Unity3D

Settings Editor

December 5th

Technical artist Jona searching for the meaning of life in the lens of camera.

Today we went into full work mode, I worked on writing some shaders and started on some clothing, using a free trial of Marvelous Designer, it was a lof of fun, it’s prone to crashing but very powerful.

Marvelous Designer shirt

Marvelous Designer shirt


Programmer Krister in a bad mood on the subway.

This saturday we went full work mode and I took the time to improve upon the item and weapon systems as well as started working on the inventory ststem.

December 6th

Technical artist Jona searching for the meaning of life in the lens of camera.

I continued experimenting with Marvelous Designer, here are a set of pants I created somewhere around midnight and beyond, hopefully I’ll have the time for another update today.

These clothes need some nice textures, painting time!

Marvelous Designer Pants

Marvelous Designer Pants


Programmer Krister in a bad mood on the subway.

The last day of the firs week I spent some time cleaning up the code from yesterday, making som small improvements to the code.

 


Technical artist Jona searching for the meaning of life in the lens of camera.

I end the sunday with this, my current favourite shader iterations, which do you prefer? Send me a message on Facebook or twitter and let me know!

Shader variations

Shader variations

Oct 252015
 

Hello Friends of Carlotta (<- Movie reference).

I just had a long day accompanied by a headache so intense that my day felt slightly askew, so what better remedy than working with Unity?

Not really having any direct train of thought I stumbled upon this in the Unity documentation describing how to get the pixel of the texture on the material where you clicked with the help of the texture coordinate.

Thinking back this is what I used to do when doing 2D games for point & click adventure games or top down games where I could bake in information in the level and react on it, for example if a car drove over a yellow field in the map it would get a speed boost.

First we need the image we want to display in the game, that is easy enough and I chose this one here from when we were visiting a conference that Swedish Game Awards were hosting back in April, then we also need the hot spot image, you basically copy the original image painting over any hot spots with a unique color leaving everything else white, transparent or whatever is to your liking, just remember to so you do not accidentally use it as a hot spot color later on.

KJ and S visiting SGA Conference

KJ and S visiting SGA Conference

 

 

 

 

 

 

 

 

 

 

Hot spot map

Hot spot map

 

 

 

 

 

 

 

 

 

Texture Settings

Texture Settings

Importing these assets into Unity you need to apply some settings to the map texture. You need to make it read/write enabled, I also changed compression type to RGB 16 bit so that my colors did not get compressed and modified (this reduces the amount of colors you can use but still should be more than enough).

After creating the material you put it on your mesh and you need to add a collider to that object so we can use raycast on it, that collider MUST be a mesh collider otherwise we will not be able to get the texture coordinate, something we must be able to do to get this to work.

On to the code, the way I set it up was that when you press the left mouse button it will make a raycast if it hits a mesh collider with the selected layer it will take the texture coordinate and translate that into a pixel which you use to check on your map texture and retrieve the color.

Create a script that you will later place on your mesh object.

using UnityEngine;
using UnityEngine.UI;

public class ImageMap : MonoBehaviour
{
   public Text textbox;
   public float rayDistance = 50f;
   public LayerMask layer;
   public Texture2D clickTexture;

   public Color[] colors;
   public string[] texts;
}

So I will get the color the user clicked, find the corresponding string connected to that color and set the text of my textbox to that value. I will start by implementing the method that finds the index of the color in my colors array so I can use that in my string array to find the correct text.

private int FindIndexFromColor(Color color)
{
   for (int i = 0; i &amp;amp;lt; colors.Length; i++)
   {
      if (colors[i] == color)
      {
         return i;
      }
   }
  return -1;
}

Now we are ready to get to the part where we get the color from the image map from where we clicked.

void Update()
{
   RaycastHit hit;
   if (Input.GetMouseButtonDown(0) && Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hit, rayDistance, layer))
      {
         Renderer renderer = hit.transform.GetComponent<MeshRenderer>();
         Texture2D texture = renderer.material.mainTexture as Texture2D;
         Vector2 pixelUV = hit.textureCoord;
         pixelUV.x *= texture.width;
         pixelUV.y *= texture.height;
         Vector2 tiling = renderer.material.mainTextureScale;
         Color color = clickTexture.GetPixel(Mathf.FloorToInt(pixelUV.x * tiling.x), Mathf.FloorToInt(pixelUV.y * tiling.y));
 
         int index = FindIndexFromColor(color);
         if (index >= 0)
         {
            textbox.text = texts[index];
         }
      }
}

So I basically check to see if the user just pressed down the left mouse button and if the raycast hit anything of interest, I placed all my Image Map objects into a special layer just for them in this example.
If I did click a valid object I find the texture on it and check what texture coordinate the user pressed, calculate that into a pixel on the texture and check tha corresponding pixel on my texture map “clickTexture” taking into account the scale of the material (that way it will still work if you have tiled it).

The result

Hotspots result

Hotspots result

And that is it, my headache is gone, my energy is up so good luck and I might see you after my refreshing stroll in our refreshing autumn weather we are having here in Sweden today.

// Krister

 Tagged with: , ,
Oct 232015
 

What could be better than spending a Friday evening authoring a tutorial for the game developers of the world or as I like to call you, my Lovelies, with a capital L.

Maybe learning something new, this, I’ve already done today, I learned that the difference between a method and a function is that the method belongs to a class, exciting isn’t it!

Now then, as for the reason you came here, I know it, learning. Today I’ll show you a little trick in the Unity Engine, while Gizmos are valuable, they can sometimes get in the way, especially when working with art.

Drum roll if you please!

Go click and un-click the hell out of those Gizmo settings, another time, if I get even a single request for it, I’ll take you through writing a simple script which will allow you to toggle the Gizmos on and off with the tick of a box.

If this was useful, do give me a like and/or a subscribe, I do this so that I’ll feel like a contributing member of the development scene after all, me me ME!

With that, I’m un-clicking this with a //Jona, your dev in the dark.

 Tagged with: ,
Oct 192015
 

 

Hello fellow devs and jammers!

First up, I’ll be posting breakdowns of the most interesting things I learned in Substance Designer on this Youtube channel later, so click that link and subscribe if you’d like to know more!

King Game Jam Logo

During the first weekend of October (2nd – 4th), I attended the King Game Jam, which was run in cooperation with Game Jam Stockholm. As far as jams go, this is definitely on my top two list, and I’ve been to a lot of jams!

Arrival

The first thought you may have is “I don’t have any friends who are interested in game development, can I go alone?”

Well, I went alone this time. Without the comforting embrace of a friendly coder, it was my first time not knowing whether a game would be finished or not, scary? Yes, exhilarating? Very much so!

In other words, if you don’t have any friends, go alone! The things you regret are the tings you don’t do!

I’m no expert (it’s very difficult to jam for 10.000 hours), but I’ve attended many jams since my first one back in 09 and I’ll try to include as much useful information as possible in this post.

Building your team

When the team building process starts, it’s important to try and find someone who possesses the skills you do not, as artist you’ll want to find a coder and vise versa.

You will also want to take into consideration what your goals for the jam are, is it to learn something new, connect with new people, create a game based on the unknown topic, or to plain and simply have fun?

In all of these instances, what I do, and this is the main idea I want you to take away from this post, select your jam-project based not upon the base idea of the game, but what you, yourself, will take away from it.

What!? You say, the idea is the most important part! Yes, and no, if your plan was to prototype an idea of your own, or you can only enjoy yourself if you’re working on an idea that inspires you, simply disregard this advice.

However, take into consideration that even if you are an amazing 3D artist looking to speed model a paleo-world, the team creating Dusty the Dino’s Sweeping Adventures might want to go with 2D, maybe you want to explore Unreal but the team wants to use Unity.

Dino Sweeper

If speed modeling was your plan, maybe moving over to the group creating Mr. Generic, the Unreal Shooter Saga and creating scaffolding for their post-apocalyptic world will be a more rewarding experience for you. You could even ask them if they’d consider placing the game in a lush forest instead!

Then again, maybe not, maybe this is your chance to finally prototype that idea you’ve had in the back of your mind for the better part of a decade, I mean, no matter the theme, you can make it fit! I’m not saying it’s not worth a try, but unless you bring your own team, don’t count on this happening, and if it doesn’t let it go.

My King Jam team

My goal with the jam was simple, I wanted to learn something new, with a recently downloaded trial of Substance Designer on my hard drive, what mattered most was getting into a group who would utilize either Unreal Engine 4 or Unity 5.

During the idea spawning process I came across Chris, a fellow technical artist, he had an idea for a car survival game using Unity 5, with him not minding doing most of the coding, and being fine with whatever art-style would come out of my substancing, we decided to team up.

Whilst spawning ideas for the game, we were approached by Joel, my personal mesh-maker and Leo the car scripter. With that, I at least, felt we had a full team.

To be honest, I hoped no one else would join us at this point, five, I’ve found is the breaking limit for not having one person spend half of the jam scurrying about and micro-managing everyone else. Additionally, we didn’t have access to a team license and my previous dealings with Git told me that even five in this case, would be too many.

Pre-production

This is an important step in any project, no less so at a jam, this may only take 15 minutes and shouldn’t be allowed to take more than 1 hour, but in the end, you’ll be happy you did it. Telling an artist to just create more rocks while trying to figure out why your for loop has unreachable code won’t be good for anyone, least of all the game as a whole.

Our Pre-production

We headed off into an empty corner and using post-its, we created a to-do list for each and everyone. With assets and tasks enough to fill at least 72 hours of work per person, we decided upon the order of importance and set our first deadline.

By now it was quite late and we decided that a first semi-playable would be created by 01:00 (1AM), that is, three hours later and 1 hour before the jam-site closed down for the night.

Production

Try to create a few deadlines for which you will have a working prototype with everyone’s content up to that point, make sure to synchronize your projects as often as needed, it’s more often than you think! Even if it takes some time, I have on more than one occasion experienced a final build which lacked a lot of graphical content. Others where features developed on different machines break the entire game completely, leaving something barely playable or even completely broken to be submitted or shown.

Our Production

We had decided upon working in a way that allowed coders to code and artists to art with minimum interaction. Since I barely talked to the coders until the final integration, I’m not really going to cover that part, I’ll just say that they did a great job and finished everything that was needed for a functioning project on time!

With that said, it should come as no surprise that the first semi-playable was finished before we packed up for the night, we were all pretty stoked to continue on the following day.

Over the course of the next day, while things were going really well, I noticed that no one else was using my updated substances, this wasn’t a problem in itself but when it wasn’t around in our noon build, I brought it up.

It was at this time we realized that Git didn’t work at all, a lot of code had been lost and none of the graphical content was ever updated, if the first version itself, at all, made it into the others’ projects.

With Git not working we became sloppy, we made sure art worked in one project and the code in another. Because of this we broke one of the (or at least my own) sacred rules of jamming, we waited until the very last moment to merge all assets, levels and code. This lead to the final version being uploaded lacking a lot of art as well as the final beautification pass, it’s sad, but those are the rules.

Tl;dr

There’s a what went well and what didn’t section below, as well as a link to the final game. Check it out, it looks a lot better!

 

My Jam or Substance Designer

After a few hours of putting the MESS in messing around the night before, I had started to get my head around how Substance Designer works, it feels in some way as if this program was made for technical artists.

Dunes

Watching the nodes come together, add some functions to extend their usefulness further and all of a sudden, I had my first dessert/dune material.

First Dune

(Dune breakdown video here but also on the Youtube channel.)

Yes, it is a bit much, my plan at this point was to do some shader magic inside of Unity later, to blend this into a calmer, flatter sand material.

As it so happened, with barely any time to spare on shaders, I decided to add some variation inside of Substance Designer instead, here’s the final substance.

Final Dune

Rocks

In a game, nothing is more important than its rocks, screen shots of rocks can make or break any AAA ad camping, imagine what it can do to your indie/jam game! This is true, you read it here, on the internet.

Rocks

I started off by creating a simple rock, sculpted in zBrush, opted using Decimation Master and UVed using UV Master. A grand total of 15 minutes later I threw the low and high poly meshes into Substance Designer. Within seconds I had baked a Normal, World Normal and SVG from UVs map (I’ll explain this in my rock break down on my YouTube channel).

To get the edge wear I simply plugged my normal map into a create curvature map node and voila, perfection.

Rock Textures

With these maps as my base I created a simple substance which we would be able to hue shift, select amount of edge wear as well as over all dirt levels of, inside of Unity.

Rock Hue Switch and Such

I’ll come back to this in a future post called Substances vs/and Shaders .

Magma

What better way is there to signify the destruction of a world than overflowing it with magma? None that I can think of, up next therefore, was an ocean of fiery death.

Creating a first draft didn’t take very long, much thanks to the way you can easily screen grab gradients without having to import anything into substance designer, that is just wonderful.

First Magma
The image is an approximation from Substance Designer as I didn’t keep the original broken file inside of Unity.

With this substance however I got some major issues, I’d opted for using the noise node Cell 3, to get something nice, semi-realistic, and more importantly, visually pleasing in a short amount of time.

Broken MagmaMagma Floor
Images are approximations from Substance Designer as I didn’t keep the original broken files inside of Unity.

The image to the right is set to 1024×1024 and the one to the left was put to 512×512, while the darker of the two has a certain charm to it, I mean, imagine driving around on a field of barely cooled down Planet Melt™, the second one looks awful and none of them look anything like the preview in Substance Designer.

Node Stuff

I made a quick adjustment, above you can see the difference in the graphs, and below is the new look inside of Substance Designer, a lot better!

New Magma

(By now you should know that there will be a breakdown of this asap on my Youtube channel).

Impact Crater

The impact crater had to look good on a flat plane, yet sell the fact that there was a depth to it, I asked Joel to create a quick normal map i zBrush, I wasn’t positive creating a something like this would be easily doable for this inexperience Substance Design user.

Crater

While it turned out creating this deep crater in Substance Designer was possible, Joel’s normal map made the graph more manageable inside of Unity.

Crater Prefab

As you can clearly see in game, we decided that we wanted the craters to add to the difficulty of traversing the terrain, so instead of a plane, a convex mesh is used to give us some extra bumps.

This created the adverse effect of the car getting stuck when a direct hit was scored, jam-style we instantly decided this to be a feature, a car hit by a meteor should be all rights be destroyed, now instead you are welded to the ground until the magma turns into sand, this may still kill you but then again, tell me, do you want to live forever?!

Really!? Yes YouTube!!! Channel… Subscribe to it, don’t you want to learn stuff!?

Title Screen

I treated the title screen like any classic 2D artwork, getting a basic composition down before fleshing the scene out, well… Sort of at least. There wasn’t time for any new content, with Substance Designer however this isn’t an issue. The textures inside of the imported Substances are easily accessible, therefore creating new versions with edited tiling or without alpha etc is not a problem.

After placing all assets, it was just about placing some additional particles and using semi transparent planes to add darkness and light wherever that felt necessary.

Next up was one of my favorite parts, lighting, post-processing and color tweaking, there’s not really a lot going on, a single directional light, AO, DoF, and a single reflection probe with an extra magma plane upside down high up in the air to add some extra red ambient lighting.

Title Screen DK

Lighting the Game World

With the title screen done, this didn’t take long, drag and drop prefabs containing the camera and lights etc, tweak DoF add some motion blur, make sure it runs smoothly on my ancient laptop and voila, beautificated.

In Game DK

Particles

While this is usually where I enjoy spending my extra hours, I barely had any time for it this time around. Might be for the best, I no longer have access to FumeFX and it’s not as if my laptop could handle even the simplest simulation.

Fire VFX

I sent some fire I had laying around to Chris and he created some really nice nitro and impact effects from them!

With the post running on for way too long, let’s get to the

Final Heading

The game -> Desert King <- was born, here’s a -> downloadable <- version (for PC) as well, ’cause no one likes 128×128 web textures.

What went well

Creating the game was a lot of fun!

I think everyone was really happy with what we managed to create in 48 hours. We also managed to get enough sleep to stay human, this made for a nice change.

Everyone had something to do at all times and enough knowledge of either coding or art asset creating to be of use to the team.

King’s office has the best coffee in the city, there was also Vitamin Well, Vitamin Well now has carb-free versions and we were fed! Lovely beyond words.

What went worse

Playing the game isn’t as much fun as the creating part.

Trying to use Git was a terrible experience, again, I’ve tried it in three projects and and while coders are semi-happy most of the time, assets in the form of textures, meshes, materials, you name it… never had it work well enough.

If you know of a way, send me a mail on how to make it work for real! If I manage to get it to work as well as the old Unity asset server, I swear that I’ll create a video to spread the word of Git.

Team

Send me a mail or leave a message on YouTube/Facebook and I’ll get back to you asap.

Hope you enjoyed the read!

//Jona

 Tagged with: , , , , ,