Jul 262016
 

Gaping_Villain_01

Look up there, the wonderful sunshine, that the boys had better see nothing of!

I don’t think they are to be honest, things are actually starting to take shape, who knew that “Houdini” could be such a time saver?


J Much like Lech I’m amazed at how amazing Houdini is as a generator of things, after countless tutorials I’m starting to get the hang of it, finally!

July24th_mushroomgrower

That’s the start of a mushroom grower! Ok, so I accidentally didn’t save and then it vanished in a crash with this… Now as I’m writing this, I remember that there are auto saves! I’ve gotta check that folder! More on that next week.

Let’s take a look at the wall that I’ve shown off in earlier recaps.

July22nd_procedural

I agree, it doesn’t look very good, at all, but now it contains everything needed for a finished game asset, let’s walk through the elements.

First of, there’s visible geometry, we have walls with columns and some rocks, all of these are completely procedural and are created based upon a single curve, you know how fast you can draw a curve? Seconds, literally! Editing it is just as easy and quick!

Secondly, see those light green lines within the walls? Those are colliders, these are generated from the walls and heavily reduced in precision (read as poly amount) to make collisions less costly.

July26th

As you can see above, the same goes for the rocks.

July22nd_wallcutup

Third we’ve got the materials, the wall and columns are auto UV unwrapped and painted with vertex colors, the shader in the case of these walls blend up to three different textures spread over red, green and blue. The UVs are actually world space dependent so the texel size will be constant across all elements, I’ve changed the material tiling here to make them stand out a bit more.

July22nd_rocksdifferent

Now let’s look at the rocks again, for UV-mapping them is on a whole new level of difficult, they’re all randomized and as you can see, their shapes are hugely varied!

Let’s take a look at the UVs.

July22nd_rockuvs

As you might be able to tell, these are just slapped on using an orthographic plane projection, why then, do the rocks not look like

this?

this?

Well, while I in the future would like to try and create pelt-maps based upon a seam created from the Y intersection plane from my terrain, I in this case wrote a simple tri-planar shader, which uses two textures (but three samplers) for left/right, front/back and top/bottom texture projection based upon world space normals.

I’ve created a version of it in Shader Forge which you can download here, you may use it in any project, including commercial ones, as long as you like Eco Tales on Facebook!

That’s all for me this week, next week will be all work! Which for me means all play! I love game development!


K Well I sure didn’t see any sun on my vacation to Gotland visiting family, eating ice cream and going to the beach as I had my shades on the entire time. I do suspect Mr Lech knew though and brought forward an evil plan to prevent me doing this again as I know have a cold on my first day back to spend time on Eco Tales.

Now I have a week or two before work starts and I’m devoting it entirely to Eco Tales, well… It would be nice to get at least one role playing session if I can drag Jona from Houdini, it’s been way too long since we played last. Anyways, I’m starting  of my week by doing a few 3d prints, same model and pose as before but larger just to get the hang of it before Jona takes the huge amount of time it takes to prepare another model / pose.

Besides that I’m hoping we can finalize the webpage as you might have noticed changed before our vacation started.

Going to Gotland with gifts

Going to Gotland with gifts

 Tagged with: , ,
Jul 202016
 

 

Hello Eco Talers!

Yes, that’s we’re calling you, at least in this post, we’re back from our vacation in Japan, once again, we didn’t go together, that would’ve led to nothing but Eco talk after all!

That's not to say we didn't meet at all in Japan.

That’s not to say we didn’t meet at all in Japan, here’s a semi-selfie from the inside of an elevator!


Sad_Villain_01

The boys… The boys are back! Not that I’m any way happy or touched by that.


JAlright! (Finally?) Back to reality, Japan was amazing, however, I couldn’t help watching Houdini tutorials all night long in antecipation of getting back to Eco Tales!

Long story short, I went out to some seriously amazing Japanese forests to gather references and inspiration, take a gander at this small collage of a temple forest on the outskirts of Kyoto!

July20th

Images won’t do it justice, but here’s my attempt!

Over and out, K is next!


K Here I sit, jet lagged and already missing Japan but luckily I have Eco Tales to look forward too.

It has been twelve years since my last long trip which took place in China (usually I just travel for a few days every now and then) and this time I got to go to awesome Japan with my partner Linda and had the fortune to meet up with my ever so fabulous co-developer Jona.

Tired from walking the great wall back in 2004.

On The great wall back in 2004

So stretching twelve days I’ve seen Osaka, Kyoto and Tokyo, from the bambu forest to the sprawling mega city with it’s many skyscrapers. Japan sure has a lot to offer, from the best service minded, helpful and nice people, great food (and sometimes great food that I just can’t eat because it’s weird), and always something interesting to see when you just walk about, something I did plenty of, according to my Fitbit I took on average some 26 000 steps each day something I gladly celebrated with some Chocolate Pocky.

Chocolate Pocky

Chocolate Pocky

 

 

 

 

 

 

 

 

 

So Japan is beyond awesome and KJ Interactive should relocate there but no time for day dreaming, there is lots to do on our wonderful game Eco Tales: My Item Shop.

 Tagged with:
Jul 062016
 

Hello KJ-lovers!

We’re on vacation in Japan and so the weekly updates are on hold, we’re not together! It’s just a strange coincidence.

Angry_Villain_02

They… Went… On vacation! It’s as if they don’t care about me or you at all!

Well, done is done, I’ll make them work extra hard, you can count on that.

While you wait for us to come back, like the facebook page!

You don’t want to miss the return of KJ!

 Tagged with:
Jun 142016
 

Screaming_Villain_01

Oh my, I can hardly believe the post old Krister has written below, poor J has been rather hard at work and that picture doesn’t look a lot like his art style at all.

Anyhow, I feel I owe it to my future income from you all renting my property to show some of the things Jona has worked on, now that the lazy… Now that he is on vacation in France for a week.


L So what has Jona done then, let’s see, he sent me some images.

June11th

Cultist clothing and hierarchy differences

Here are two of those nasty cultists seen inside of Unity, they evidently lack details like belts and such, still though, nastier people would be difficult to find.

June12th

Procedural wall prototype

This here is supposed to become walls inside of dungeons, looks terrible doesn’t it? I’ve been told that the “vertex colors” will have different “textures” on them which will make it look great, Jona promises this. We’ll see, I’m sceptical.

He’s also been writing some lore, however, he didn’t want to share any of that, he felt that this is enough, now, enjoy Krister’s original post, it’s rated R for strong language, you’ve been warned!


Well the J of KJ Interactive have traveled to France on a luxurious vacation leaving me here working on Eco Tales all by my self. I don’t hold a grouch for Jola of course, if Joba needs a vacation then Joma should get a vacation.

Finally I can get my ideas into Eco Tales, they are of course the good ones but that does not matter for now. I will try and recap last weeks shenanigans meaning I will besides from writing my part also emulate Joras part.

Oh, and I suppose I will have to continue with having Jopas part first event though it is really weird because then it spells out JK instead of KJ and JK Interactive is a really bad name and I don’t like it.


J Hi, Jopa here, due to a massive case of syphilis I’m on my way to France to find a cure, but I did manage to get some “important” “work” in on Eco, yes you guessed it… Clothes.

I did some pants and a shirt or something like that, here is a ingame screenshot of the final result.

Joora did some new clothes

Joora did some new clothes

 


K What have been one of the heaviest weeks of the year is finally over, only one week of work left (quite heavy in it self) before my vacation start and I can put in a lot more work on Eco Tales.

Well I suppose I will try and explain what I’ve done this week even though it is invisible because I’m a programmer and can’t make awesome art like that one above from Jona.

Working with the AI as usual I needed to rework the test combat system a bit to make it work, replacing some animations as well. During this process a found some bugs a quickly squashed and started working on a little surprise that I will hopefully be able to tell you about the next week or the week after that.

Anyways, a quick recap or more of a hey how are you doing lets talk tomorrow kind of a post but a post none the less.

 

As they say in France, are river and have a nice week.

 Tagged with: ,
May 102016
 

eco tales happy 3ds max maya rpg game funThis week is actually a very exciting one, why? ‘Cause this week I’ve been spotted in the best looking screenshot of Eco Tales to date!

As you may know, Jona joined an Artstation challenge and after some pleading, I allowed him to put me into the post.


JMost of my time this week has been spent on lecturing University students at Uppsala University on shaders, post-effects and over all lighting inside of Unity. However, before I went off to do this I managed to finish up my submission to the Artstation Transport Contest.

This also doubles as our first pre-alpha graphics screenshot and is the level of graphical fidelity we’ll be aiming at for all areas of the finished game!

FinalArtStation_EcoMay5th

Screenshot from the northern forests of Ecbatana.

If you’re interested there are some WIP shots on the challenge page as well as in the earlier recaps, here’s a wireframe for those interested as well!

Wireframe

As you can see the grass is rather extremely tightly packed and using an expensive SpeedTree shader, despite all this, it’s still a pretty light scene discounting the 1.9million verts/tris.

Optimizing is for another day, now we have a goal in mind!


L Today when writing my racap of last week I’m in agony, a sudden and not so very nice case of torticollis is making my day rather difficult.

Some people call it karma. What have I, a humble super awesome coder done to deserve this you might ask? Well I’ve only managed to put in a days work on Eco Tales last week.

My focus area at the time is AI, so I’m building a list of tasks different NPCs will be able to perform before building the actual behavior tree that will bring them to life, starting out with the basic and most common tasks like patrol, follow and so on hoping to start of with a rather primitive AI to fight against.

 Tagged with: ,
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: , ,
Sep 132015
 

It is truly amazing all the wondrous things you can do with some math and spare time.

After someone posted this Cat Purr generator on Facebook I had to try and make something with sound, not really knowing anything about the subject except for the basics.

To just create sound was easy, all you need is the OnAudioFilterRead method which will give data to manipulate, which you can place on either an AudioSource or AudioListener component and if you don’t have a playing clip in which to modify you get a clean silence to do with what you want.

In programming we have the tradition of always starting with typing a Hello World program the first thing we do when we try out a new language, it is a thing just like what I suppose is a thing to always make a sound from a sine curve in audio programming which I did quickly follows by generating white noise and then I flipped out with no regard for anyone’s safety, I went full rebel following no rules or train of thought and this is what happened.

What is difficult is not getting sound but to control it, it is a big subject and fun to try out, this is not I will ever master but I have seen some awesome stuff people have made and I want to know more about it so if you have made something really cool in this field please let me know!

 Tagged with: , ,