Jump to content

  • Log In with Google      Sign In   
  • Create Account

Alex.SilR's Journal

Day 23 – [SinC] – DontGoThroughThings

Posted by , in General, SinC 07 November 2012 - - - - - - · 350 views

Mirrored from my blog (en, pt-br).

Today I did some things in sync:
  • Color of the mass panel changed to red.
  • Q e E keys to toggle between min and max.
  • Change projectile mass with Ctrl + Scroll.
  • Projectile gravity removed.
  • Cube created.
  • Crosshair add.
  • Align between the crosshair and the projectile.
  • Apply the script DontGoThroughThings.
Panel + Crosshair + Cube:

Posted Image

Testing the prototype when it increased the speed of the projectile I realized that it was past the cubes to the point of not collide with any cube. Actually what was happening is that as the projectile was too fast, it not collided with the cube, if you go frame by frame you can see it. I researched and found the script DontGoThroughThings that solved this problem. Just put the script on the object that will move very fast and all the other objects that you want it to collide inside a layer and pass this layer to the script.

Check out the results:
  • Without DontGoThroughThings (Online).
  • With DontGoThroughThings (Online).

PS: Sorry for the bad english.

Day 22 - [SinC] – Game Overview Document, CustomPlayer and Shoots

Posted by , in General, SinC 06 November 2012 - - - - - - · 426 views

Mirrored from my blog (en, pt-br).

On day 22 I did the GODD of the SinC, the CustomPlayer, and the gun shoot.

The first thing I did today was the GOD of Sync (Shooting Into Cubes [name that thought for now]). I will not explain how the GOD is, it is easier to see:

1. Executive

1.1. Game Type
The game will be a first person shooter puzzle.

1.2. Name
The name of the game will be for now SinC (Shooting Into Cubes).

2. Game Elements

2.1. Gameplay
The goal of the game is shooting into cubes in order to take them to certain areas. To do so the player will have a weapon capable of:

  • Change the projectile velocity.
  • Change the projectile mass.
  • Change the projectile impact.
    • Directional.
    • Blast.
    • Gravitational.
  • Remove gravitational force of the cubes.
  • Remove forces of the cubes.Invert gravitational force of the cubes.

In addition to this weapon the player will also have the ability to stop time to prepare and plot the best strategy. While stopped in time the player can shoot projectiles, which also froze and returned to their trajectory when the time flow is restored.

2.2. Game Pacing
As the mechanics of the game will be very repetitive the game will aim to be casual, where the player doesn’t need to follow stories and other elements.

2.3. Target Audience
The game will target audience of players who enjoy first person shooter and puzzle without age restrictions, because the game doesn’t contain any violence or situations that may cause discrimination.

3. Story Elements

3.1. Synopsis
Not applicable.

3.2. Setting
Not applicable.

3.3. Player role
Not applicable.

4. Interface

4.1. Perspective
First Person Shooter.

4.2. Mechanics
Basically the game will feature a main menu and one where the player will be able to choose the level you wish to play.

4.3. Control

  • Player’s movement.
    • W – Forward.
    • S – Back.
    • A – Left.
    • D – Right.
  • Camera’s movement.
    • Mouse.
  • Shoot.
    • Right mouse button.
  • Change projectile velocity.
    • Mouse scroll.
  • Change projectile mass.
    • Mouse scroll when Ctrl pressed.
  • Change the impact type.
    • Mouse scroll when the right mouse button pressed.
    • 1, 2, 3 of the keyboard.
  • Time toggle.
    • Shift.

PDF version: Download.

Where I found (it has more models): Access.

After that I found here on the notebook, the prefab of a first person controller that I had made following a tutorial of FPS (I call CustomPlayer). He has the camera movement much smoother than the Character Controller that comes by default in Unity, actually I haven’t looked too in the settings to see if it can achieve the same result.

In the videos below you can see the difference.

Character Controller


Custom Player


See for yourself:The tutorial is very good, the author explains each line of code. Start watching here.

As CustomPlayer was ready I just needed to integrate with the gun. At this point I found a problem actually is the difference of coordinates between Unity and Blender (in Unity Y is up and Z in Blender is up). As the script places the gun in the direction of the camera (the player’s eyes) and the coordinates are different, the gun stood aside. One way to solve this would be to change the script, but it would be very complicated, because I would have to keep the coordinates swapped. I researched and resolved in a way that is in Unity’s own documentation (here), place the object inside an empty object (Like the empty object is created within Unity the coordinates are equal), then any manipulation should be done through this empty object .

After I fixed the position of the gun, making the shooting script was pretty easy at the moment it is only changing the projectile speed.


Test here.

PS: Sorry for the bad english.

Day 21 – Blender, Prototype and SetTexture

Posted by , in General, SinC 06 November 2012 - - - - - - · 325 views

Mirrored from my blog (en, pt-br).

The day 21 was basically a copy of the previous day. What I had in mind to model the gun didn’t work, so I ended up spending more time than I should again. In the end I ended up not liking the result, but I’ll use it to prototype.

I thought this weekend (20 and 21) I could leave the prototype well underway, but in the end there was not much progress (there was learning, so I’m not sorry to lose this time in modeling the gun).

Posted Image


Besides modeling, I lost some time in the “panel” of the gun and with that I learned one of the most interesting things today, which was how to access the textures of a shader using the method SetTexture. SetTexture receives a string that says which texture you want to modify and texture to replace.

The hardest part was finding what is the name given to the texture I needed to modify (in the case was a Illumin Self-Illumin). After searching I ended up finding that on the site of Unity you can download the code of the shaders that comes by default in Unity, and seeing the code you can see the name used.

The code of the Illumin-Diffuse is:

[source lang="java"]Shader "Self-Illumin/Diffuse" { Properties { _Color ("Main Color", Color) = (1,1,1,1) _MainTex ("Base (RGB) Gloss (A)", 2D) = "white" {} _Illum ("Illumin (A)", 2D) = "white" {} _EmissionLM ("Emission (Lightmapper)", Float) = 0 } SubShader { Tags { "RenderType"="Opaque" } LOD 200 CGPROGRAM #pragma surface surf Lambert sampler2D _MainTex; sampler2D _Illum; fixed4 _Color; struct Input { float2 uv_MainTex; float2 uv_Illum; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); fixed4 c = tex * _Color; o.Albedo = c.rgb; o.Emission = c.rgb * tex2D(_Illum, IN.uv_Illum).a; o.Alpha = c.a; } ENDCG } FallBack "Self-Illumin/VertexLit"}[/source]
At first we can see that, in the Properties block is the names used. In my case _Illum. Then the method would be:
[source lang="java"]obj.render.material.SetTexture(“_Illum”, texture);[/source]
PS: Sorry for the bad english.

Day 20 – Blender, prototype and Qdir

Posted by , in General, SinC 06 November 2012 - - - - - - · 388 views

Mirrored from my blog (en, pt-br).

Today I spent the whole day modeling and thinking about how will be the gun of the prototype of the game that I haven’t discussed here yet. In the end I did not get to any model that satisfied me, but it was worth because I ended up practicing.

It was worth it not only for practicing in Blender, but also solve some problems that appear along the way, this is one of the best ways to learn. One problem for example, was that the way I modeled part of the gun Normals became reversed, when I imported to Unity I saw. I returned to Blender, and used Ctrl + N thinking it would solve, and not resolved. I took a look and ended up finding the option to show the Normals of faces and vertices. After that I had to manually flip using the Flip Normals.

Posted Image

I also tested some textures and I’ll probably use a brushed steel for the whole gun.

In this workflow of modeling in Blender and import into Unity I felt a delay because of the Windows explorer. I got two windows open (one with. Blend textures and [I like to leave the editable separate from Unity project structure] and another for the Unity project files) and get file transferring from one to another (although simple) often ends up consuming considerable time. At the time I used Debian and KDE one of the features that always missed when I went back to Windows was the same window split in two. I googled and found the QDir, which is very good. I recommend to anyone who used navigating between folders a lot on your workflow.

Posted Image

I know I’ve wasted too much time on the gun for a prototype and has more essential things to do, but as I liked and learned a lot today, tomorrow (as I already have in mind what I will do) I want to finish the gun.

PS: Sorry for the bad english.

Day 19 – Blender, NormalMap generators and beginning of a project

Posted by , in General 06 November 2012 - - - - - - · 458 views

Mirrored from my blog (en, pt-br).

Today I started watching part 6 of the video lesson Training Course: Low Poly Game Asset Creation – Fire Hydrant in Blender and Unity 3D, played around with NormalMap and started thinking about the first project.

In part 6 of the video lesson was done the baking of NormalMap. Following the tutorial I started having some problems and ended up running out of patience to resolve and finish of watching. And as the project I’m in mind, will not use anything too complicated related to modeling, I’ll take a break from video lesson and focus on the prototype of this project.

After stopping the video lesson I started testing some textures, and how most I found don’t had NormalMap, I researched some programs that generate NormalMap from the texture itself.

The first I found was the SSbump Generator (free). I liked it, it has some options in generating NormalMap, but (not sure if it was only with this texture because I haven’t tested with another) it generated the NormalMap in different resolution that the texture, made it almost impossible to use it.

Posted Image

After I found the nMaker (free), which is simpler than the SSBump Generator, but has no option to generate the NormalMap. What made it impossible depending on your need to use it. (Requires photoshop installed to operate).

As neither the SSbump Generator and neither nMaker solved my problem, I downloaded the trial version of CrazyBump. Besides having more options than SSbump Generator, it has a preview of the material, which helps a lot. The downside of it is that the license is quite expensive.

Posted Image

About the project I have in mind, I will not say anything now because this still only in my head, when I have something specific I’ll post. This weekend I hope to leave the prototype well underway.

PS: Sorry for the bad english.

Day 18 – Blender and NormalMap

Posted by , in General 06 November 2012 - - - - - - · 412 views

Mirrored from my blog (en, pt-br).

On day 18 I watched part 4 and 5 of the video lesson Training Course: Low Poly Game Asset Creation – Fire Hydrant in Blender and Unity 3D and did a little test of NormalMap.

In Part 4 of the video lesson was made the model low poly of the hydrant from the high poly. It was a pretty simple process actually. After doubling the high poly most of the process was the removal of edge loops and some details how: the parts depression in the body and upper, and screws.

The low poly model without subdivision surface:
  • 561 vertices.
    • ~5.4% of the high poly without subdivision surface.
    • ~0.7% of the high poly with subdivision surface.
  • 260 faces.
    • ~2.5% of the high poly without subdivision surface.
    • ~0.3% of the high poly with subdivision surface.
(Right - Low poly. Left - High poly.)

Posted Image

Posted Image

Posted Image

Posted Image

Posted Image

In part 5 of the video lesson was done the UV unwrapping of the hydrant, in this part was suggested watch a tutorial before, it talking about the basics of UV unwrapping and seams (Introduction to UV unwrapping). After watching the tutorial and video lesson, I had a much better idea of unwrapping and especially seams. The unwrapping of the hydrant wasn’t anything complicated.


The small test I did of NormalMap shows the difference of an object, with and without. The images are in game. The images that have a sense of depth are with NormalMap.



PS: Sorry for the bad english.

Day 17 – Blender

Posted by , in General 06 November 2012 - - - - - - · 414 views

Mirrored from my blog (en, pt-br).

Today despite having already returned to studies was a quiet day. In the morning I had to finish a job for college, so I just left the afternoon, where I watched the second part of the video lesson Training Course: Low Poly Game Asset Creation – Fire Hydrant in Blender and Unity 3D.

In this second part was finished the high poly model hydrant. Although it is difficult to exactly replicate the model of the video lesson I liked of the result. Tomorrow I want to see at least part 4 and 5, where is made the low loly modeling and UV unwrapping. It will be interesting to see how from a high poly model is made low poly modeling.

Posted Image

Posted Image

Final high poly model (without smooth and without subdivision surface):
  • 10392 vertices.
  • 10229 faces.

Posted Image

Final high poly model (with smooth and subdivision surface with two subdivisions):
  • 81024 vertices.
  • 79409 faces.

Posted Image

PS: Sorry for the bad english.

Day 14 – Blender, Unity and Normals bug

Posted by , in General 06 November 2012 - - - - - - · 532 views

Mirrored from my blog (en, pt-br).

Today I basically kept doing the geometric model game and imported it to Unity.

What I did today was make the UV mapping of the pieces and some renders. Today I just didn’t see the second part of the video lesson I wanted, but gave to practice in Blender.

Posted Image






After I finished UV mapping of the entire model I did the import into Unity by the Blender file. The parts imported all right, I just had a problem with the main cube. It stayed with the Normals wrong.

Posted Image

I thought that was why I did not give a Ctrl + N to normalize Normals. I did it, and continued reimported the error. I thought if I made the Normal map (by the way I found a very good tutorial) would solve the problem, and I did not solved. In fact got worse.

Posted Image

After giving a look around in the settings, I saw that the import normals option was set to import, I changed the option to Calculate and it worked.

Posted Image

If you want to see how the model was inside the Unity click here (online).

Tomorrow (Monday) and Tuesday I’ll have to take a break to do some things in college, but Wednesday I start again.

PS: Sorry for the bad english.

Day 13 – Blender

Posted by , in General 06 November 2012 - - - - - - · 609 views

Mirrored from my blog (en, pt-br).

On day 13 I started to see the video lesson Training Course: Low Poly Game Asset Creation – Fire Hydrant in Blender and Unity 3D and played a little with Blender.

The first part of the video lesson begins to shape the hydrant in high poly, high poly after that is done the low. It will be interesting to see how the workflow is. I had no idea it would start with a high poly.

The video lesson is very good, this first part, which took about 25 min, I have learned several modeling techniques, which will be quite important now, since the video lesson Blender 2.6 Essential Training was basically a general complied (which was and will be important too).

I wish I had watched at least one party (the second part is where the high poly model is finished), but overall I learned a lot of new things.

One thing I noticed in comparison with SketchUp is that it is much more difficult to accurately follow a tutorial, my hydrant was quite different from made in the video, which did not occur in the table (the table is of course an object much simpler ).

This difficulty is partly why in SketchUp is much easier to enter accurate measurements than in Blender.

Posted Image

Posted Image


One thing I did today also was play in Blender by myself.

Basically what I did was one of those games that every child has ever had, where you should put the geometric shape in the corresponding hole. To do this I used the boolean modifier. It was interesting, because I discovered that sometimes when not normalizes the normal faces (Ctrl + N with the whole mesh selected in EditMode) cannot apply the modifier, is shown the message “can not perform boolean operation”.

After modeling I did the UV mapping. I used a wood texture and applied all over the object, was very interesting. There’s still some things to do, what I will do tomorrow. Tomorrow I also want to import this model to Unity.

Posted Image

Posted Image

Posted Image




PS: Sorry for the bad english.

Day 12 – Unity, Blender and SketchUp

Posted by , in General 05 November 2012 - - - - - - · 506 views

Mirrored from my blog (en, pt-br).

Today I finished reading the book Unity 3.x Game Development Essentials, and finished watching the video lesson Blender 2.6 Essential training, then I watched a few tutorials of SketchUp.

In chapter 11 was made some finishing touches on the game and the most interesting was the introduction of lightmapping, which basically is a process that adds the effect of light and shadow on the texture itself. Since the effect of light and shadow will be applied directly in texture, this technique is used only for static objects. Using lightmapping can be a way to insert shadow in free version of Unity, but will depend on the case, therefore, is static shadow.

Without lightmapping.

Posted Image

With lightmapping.

Posted Image

Chapter 12 was pretty interesting too. It was about various settings and points to consider when constructing the final game (the file that will be distributed), both Standalone and Web.

Posted Image

Chapter 13 was very short and did not have anything interesting, so I will not even comment.

The last part of the video lesson of Blender Character Rigging talked about, although it was interesting was very superficial, showed how put Armature in that creature and how make a simple animation.

Posted Image


Later I watched some tutoriais of SketchUp made by google (which are very good by the way). SketchUp is much easier to use than Blender (at least for the simplest things). However when I imported the model from the table that is made in part 4 of the tutorial for unity could not apply texture on it, it seems that need be done the UV mapping first. I did some research and some users were doing it through the Blender, but when I imported in Blender, the model opened with the drawer in the wrong place, which did not happen in Unity. Tomorrow or Sunday I will give one more researched to see if it really is worth studying SketchUp, since Unity doesn’t natively support it and despite being easier that Blender will not completely replace.

Posted Image

PS: Sorry for the bad english.

August 2016 »

21222324 25 2627

Recent Entries