Showing posts with label Unity3D. Show all posts
Showing posts with label Unity3D. Show all posts

Ocean Isles

Sunday, June 19, 2011

I've been dreaming of an oceanic island scene in Unity. Here I really didn't spend too much time on the models, but instead focused on implementing a nice camera fly courtesy of iTween, as well as some nice 3D sounds. I also implemented some basic pov manipulation scripts but they are buggy at best. This project was built in a days time. I deployed this to my iPad2 and it swims along at 60 fps...even when the camera is up next to the fire particles;). Click the image to give it a try. Make sure your speakers are on. I recommend headphones.

Unity Christmas Tree Scene

Friday, December 24, 2010




















Watch it on YouTube here.
I modeled this scene in Blender, imported it to Unity, light mapped it with beast, added occlusion culling and then ported it to the iPad. I am pleased to say that it gets a very high frame rate on the iPad.

iPad functionality includes: swipe finger to rotate the scene left or right. Touch on an area of interest to zoom in. Tilt the iPad up, down, left or right to do a smooth look in that direction. Pinch fingers together to zoom back out to the original point of view. Clicking on the end table reveals a Christmas card in the drawer.

I did not use any tween libraries for any of this functionality. I wanted to keep it very light for the iPad, so instead I used Unity's linear interpolation functions to calculate the distance for each movement. I wrote all the functionality in C#, as always.

This was created for my wife as a Christmas card on the iPad. Merry Christmas!

Asteroid Field

Monday, November 29, 2010
















 I just had to make an Earth with the sun and an asteroid field. I mean..wouldn't you? The camera fly is completely scripted. The asteroids are randomly placed.
Earth, cloud and specular map courtesy of oera.net (which seems to be down as of the moment of this post)

Cornel Box Fly

Tuesday, November 23, 2010
















I created a simple bluish-grey Cornel Box and lightmapped it with beast lightmapper in Unity. I played around with the settings a lot more in order to get a very nice over head lit look. I was able to script the camera fly in only a few lines of code. A nice polished piece for just a little bit of work! Give it a click and watch!

Unity City

Monday, November 15, 2010




Modeled by Sean McDonald
Before hand, this scene had one directional light and quite a few draw calls that slowed performance. I had the camera in forward render mode (no point lights so I don't need deferred render mode). Then I light mapped the entire scene and changed the rendering path to Vertex Lit. This immediately gave me a much better frame rate. I then baked in Occlusion Culling so that only the geometry that is seen by the camera is sent to the render pipeline which yielded a well optimized environment

Unity3D Studio Apartment

Tuesday, August 10, 2010

I modeled and UV mapped this 3D Studio with Blender and assembled it in Unity.
You can click and drag the sliders to dynamically change the room lighting. Click on a view button to see parts of the apartment.

Click here to view the interactive scene!


or watch the youtube video below.

Firewall

Wednesday, April 14, 2010


Wow! Unity is just amazing. Sean McDonald modeled the sidewinder missile used in this game. Firewall was inspired by Unity's free Detonator Library. I got the metal texture for the blocks from desizntech.info. Which brings me to my next point, Unity makes mip and bump mapping a snap! Drag a texture onto a 3D asset, then click on the image in your library and click generate bump map...done! The UI even has a slider to control mip mapping and shininess of the bump mapping.

Firewall uses a lot of object oriented C# scripting for each gameObject. It's very easy to get things to work once you understand Vector3s and Quaternions. What's the hardest part? Any GUI or HUD work is really just a pain!

The levels in Firewall are XML driven, you can sneak a peak from my levels.xml document.
Each level is made up of a node, where each | represents the end of a line and each number is a stack of cubes.
...........|
...45554...|
...........|
...........|
...........|
...........|
...........|

Functionality:
Getting the missile to shoot at the mouse, but take on the cameras transform:

GameObject rocket = Instantiate(Resources.Load("Rocket")) as GameObject;
rocket.rigidbody.transform.position = camera.transform.position;
rocket.rigidbody.transform.rotation = Quaternion.LookRotation(Camera.main.ScreenPointToRay(Input.mousePosition).direction);
rocket.rigidbody.velocity = transform.TransformDirection(new Vector3(r.direction.x * 50, r.direction.y * 50, r.direction.z * 50));


Getting the 3D object that is under the mouse, to turn red. Also referencing variables in a dynamic prefab's class:

//raycast directly under the mouse for a distance of 100, return the first object that is hit.
Ray r = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;

//if the ray hit an object, parse it as a Cube (Cube is the .cs class for the block prefab) and selected is a public bool.
if(Physics.Raycast(r, out hit, 100))
(hit.collider.gameObject.GetComponent("Cube") as Cube).selected = true;

//inside of Cube.cs on update we have the following:
rigidbody.renderer.material.color = selected ? Color.red : Color.white;

Shark Attack Island

Tuesday, April 6, 2010


My first experiments with Unity3D revealed that it is extremely easy to get a 3D scene set up and running. Texturing 3D objects is as easy as drag and drop. Need a first person shooter control? Just drag and drop the fps walker prefab into your scene and tweak the variables! Sean McDonald did all the 3D modeling for this (except for the palm trees, those were Unity default materials). We found that Unity was able to import .3ds, .dae, and .fbx and even .ma and .mb if you have Maya installed on the same computer that Unity is on.

Current known bugs: Sharks swim through the island.
Please feel free to submit bugs.

I scripted the games animations through C#.
Ocean Movement:


Shark Movement


Player Throws Coconut at Mouse



For the explosions I used http://unity3d.com/support/resources/unity-extensions/explosion-framework