background preloader

Unity 3D

Facebook Twitter

Unity. Unity 3D. 5 common mistakes made in Unity - Microsoft UK Developers. Back to Articles It is undeniable that Unity3D has made game development accessible to many people.

5 common mistakes made in Unity - Microsoft UK Developers

Whether you like it or not, it is becoming one of the de-facto tools used by independent developers. Its gentle learning curve has been both Unity's greatest feature and downfall. By simplifying some aspects of game development, it has imposed its own way of doings things. Features which should be trivial can be incredibly challenging if you're trying to fight against Unity's logic and workflow. 1. If you're planning to use Unity2D or Unity3D physics, it's very important to get the scale of your project right. Whether you're using Box2D or NVIDIA® PhysX®, size does matter for Unity. Changing the scale of your project is very challenging: you may have to re-import sprites, models and to manually re-adjust the position of all the objects in your levels. 2.

Unity3D allows you to attach scripts to your objects, which can be written either in C# or JavaScript. Unity3D. ALGOholic – A Coder's Blog - Unity3D Indie (Free) Portal Effect Project Sources. Hello everyone!

ALGOholic – A Coder's Blog - Unity3D Indie (Free) Portal Effect Project Sources

Due to popular demand finally I’m releasing project sources of the Unity3D Indie Portal Effect. In two words, the technique is based on using multiple cameras (3 in this case) and then selectively drawing just Z-values of the portal gates in the 1st pass so that they leave opening in the rest of geometry due to Z-test. This is followed by the 2nd and 3rd passes which clear Z-values of the portal gates and allow the scene to be drawn in the openings from 2 other cameras. The order of drawing things is managed by camera ordering and render queues ordering. On top of that there is a script positioning the 2 helper cameras appropriately relative to the portal gates and to the main camera. Enjoy! Binary (Win32): Project Sources: How to cull/render to through a 'window'? What you want to do is no simple task.

How to cull/render to through a 'window'?

You want a dimensional portal effect. I really think you'll want to use stencil buffers. They are made just for this sort of thing. Think of a stencil buffer as very similar to a depth buffer but used to stencil objects in the scene. When you render to a depth buffer, it takes all of the objects in front of your camera (visible, on same layer, etc, does some matrix math in the pipeline), and puts the color from each object along your view into the depth buffer (i.e. the image you see on screen).

Now consider a stencil buffer. Now for the cool part, so you set up a stencil buffer, turn it on, set it to set each pixel location in the buffer that gets drawn to a value of 1, draw your square window in the center of the image above (the window where things will be visible) as a solid opaque quad, then turn the stencil buffer off. Now I know how I would do this in the old school fixed pipeline. Here's a link to shader lab: Stencil { Ref 1 Comp Equal } Florian M. Unity 5 Lighting Cookbook. Quick notes on how to deal with Unity 5 lighting.

Unity 5 Lighting Cookbook

Standard realtime lighting Standard realtime lighting includes ambient light, environment reflection and realtime lights and shadows. It doesn’t require any GI or precomputed stuff whatsoever. Both options Precomputed Realtime GI and Baked GI are disabled in Lighting > Scene. 1) Ambient. 2) Reflection. 3) Lights. Precomputed realtime lighting Precomputed realtime lighting adds light bounces, color bleeding, and emissive materials in real time.

Lighting > Scene > Precomputed Realtime GI enabled, Baked GI disabled. 4) Light bounces. 5) Emissive materials. Precomputed realtime lighting is calculated on the scene objects flagged as Static. The parameter Lighting > Scene > Precomputed Realtime GI > Realtime Resolution directly affects the time it will take to precompute the data. Light bouncing and material emission affect static objects only. Baked lightmaps. Unity.