Author Topic: A Unity3D Test - Filled With Fun Facts! :D  (Read 1381 times)

http://www.youtube.com/watch?v=WrJpC65v9MI

I'll start off by saying this probably won't be turned into a game. The real reason I made this was to see what I could do if I richarded around enough and see if I could get something together to show to my Game Design teacher. Could this be turned into a game? Possibly. Will it be? Well ask yourself this, "When was the last time Keonesan ever finished anything?"

Anyways time to explain how this is made and how it works.

The Models
*Note: All models were created in Blender.

The player model was the first thing I created in Unity3D and I had extreme issues with it. The main and currently unresolved issue is that I have two points on the model where there is graphic tearing due to vertices colliding inside each other. Luckily it's in two remote places where it's pretty much impossible to see but I still should fix it when I find the time. The player model was developed from a cube using a mirror modifier. Instead of subdividing I simply extruded all the faces and began working off of that to form the chest, then the legs, arms, and finally the head. The head I struggled with so I used another model for referenced but I still pretty much forgeted it up. This is the main reason why I gave the character both a bandanna and goggles, not only does it look assbad, it covers up his weird ass face.

The room consists of one sided planes due to the method on how the camera renders the level which will be explained later on. Only the inside of the room actually has the visible side not for the purpose of optimization but once again for another reason. Modeling this was time consuming since Blender's game render is a complete loving liar so whenever I exported stuff to Unity3D I had to constantly flip normals to get the planes to face the right way.

The chair, candle, and drawer were pretty much just pulled out of my ass as I worked with random shapes and tools. Eventually I got something DECENT looking and I decided to go with it. All these objects consist of edge splits for two reasons. The chair and drawer have edge splits so Unity3D wouldn't set everything to smooth. The candle however does have smoothing but some areas such as the ends of some cylindrical shapes I used would have a weird look to them without edge splits.

The Scripting (forget Javascript)
*Note: During my coding sessions they consisted of me screaming at my monitor in rage.

Pretty much everything was written in Javascript with the exception of a few C# scripts for DOF and such. The first thing I tackled was animating and controlling the player. I pretty much just took the First Person Controller asset that comes with Unity3D and modified it to fit my purposes. The animation script I wrote however which led to me having a tantrum for 30 minutes that the flashlight switch animation wouldn't override both the idle and the walk animation until I realized I had it on the wrong layer.

When it came to post-processing effects I pretty much abused them but with good reason. (It looks stuffty without them. :C) The game consists of SSAO, Bloom, RGB Curve Color Correction, and DOF. SSAO adds a soft, blurred shadow around objects based on lighting, Bloom pretty much... makes stuff brighter, RGB Color Correction allows me to manipulate colors, and DOF blurs and focuses objects based on distance.

The mirror was a tricky one, I basically salvaged an old script designed for an older version of Unity3D and converted it. The problem with the mirror was when I switched to deferred lit rendering. It allowed me to have shadows on all types of light entities but the drawback was that reflections are not supported by dl rendering. Since reflections are unsupported by this rendering type I was pretty much... well... forgeted... Luckily I found ghetto fix until I can come up with something clever. Since the mirror uses something of a "fake camera" I was able to force that camera into forward rendering. The problem with this is that most shadows will be disabled in the mirror. The most noticeable one is seeing that shadows casted onto the player are disabled in the mirror.

Other components like the flickering candle light was just modified scripts found off the Unity script wiki. The majority of particles were just assets that comes with Unity3D. The textures I used can be found here: http://www.cgtextures.com/.

Final Touches
*Note: Tacos.

When I had exported my player model into Unity3D the headgear was offset for some strange reason. I spent a good hour trying to shift it around in Blender and hope it'd come out right in Unity3D with no success. What I wound up doing was exporting the headgear as a separate model, positioning it in Unity, then attaching it to the head armature of the player.

The curtains were plane models I made in Blender then simply exported into Unity3D and given cloth components. I gave them random acceleration and attached it to the collider in the rail overhanging the window.

(Sorta) Final Product
*Note: Wow you've actually read this far?

I really wouldn't call this a final product but a decent example of what I could probably do with this. At the moment the level consists of one directional light, two point lights, one spot light, around 20+ separate meshes, a file size of 120mb, an average framerate of 150-200, and too many materials, scripts, and other stuff that I don't even want to count.

Known Issues
*Note: If you read this entire thing then you sir are a lovey beast.

- Player's rotation is often randomly selected if you walk into an object, walk animation also continues.
     * Currently I'm developing a raycast check to fix this.
- Curtains having some weird results when manipulated by the player
     * Really not a fault on my part since it's built into the engine. I just have to tweak the settings so they're a bit more "stable".
- EVERYTHING IS OUT OF SCALE
     * Since I can't measure for stuff in Blender, soft shadows are casted in too large of a proportion for the scene. This can be     resolved by scaling everything up in Blender but I'm really too lazy to.
- Terrible optimization
     * Currently the majority of objects are using mesh colliders instead of box colliders and such. This causes irrational file sizes and generally acts as a bigger resource hog.
- And a stuff load of other stuff.

What Next?

Probably nothing really. If I ever do decide to turn this into some adventure/puzzle game a lot of stuff will needed to be done and I definitely can't do this alone. I'll need a team of people who can texture, model, script, create sounds, etc. If you really are interested in doing a project (that probably will never be finished) just hit me up on Steam, Skype, PM me, or some other stuff.

TL;DR
Suck my richard, go read the entire thing friend.


Aww yee i like the style.
« Last Edit: August 19, 2011, 06:28:21 PM by PossesedAngel »

Why is it so bloody dark?



I hate the assumption that horror is always pitch black with a 2 foot circle of light coming from a flashlight.
Anyway, the game looks cool though.

I hate the assumption that horror is always pitch black with a 2 foot circle of light coming from a flashlight.
Anyway, the game looks cool though.

Why is everyone assuming this is going to be a game when it clearly says Unity3D test.

You mean just Java not Javascript right?

You mean just Java not Javascript right?

No Unity3D does compile Javascript. I am quite aware of the difference between the two.

You could always give the objects no collisions and use invisible boxes for collisions.

You could always give the objects no collisions and use invisible boxes for collisions.

SHUT THE forget UP TAILS

You could always give the objects no collisions and use invisible boxes for collisions.
Or he could do the normal thing and make several box colliders around his objects. But he already knows this.

     * Currently the majority of objects are using mesh colliders instead of box colliders and such. This causes irrational file sizes and generally acts as a bigger resource hog.

You could always give the objects no collisions and use invisible boxes for collisions.

No real need for that, Unity3D attaches colliders to objects and that'd just be a waste of space with your method. The reason I'm currently using mesh colliders is mostly due to laziness. I'll eventually convert everything to box colliders and stuff.

This engine sounds like a hassle.