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): unity_portal_effect.zip Project Sources: unity_portal_effect_source.zip. 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

The source project for the screenshots in this article is hosted at GitHub. 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 Light Equally affects all objects. Ambient Source (Skybox, Gradient, Color) and Intensity 2) Environment Reflection Reflected path that changes with the angle of the camera. If Reflection Probes are used they become the Reflection Source and Intensity for the objects under their influence, so the global reflection settings don’t have effect on these objects.

Left: Reflection Source (Skybox, Cubemap), Resolution and Reflection Intensity.Right: A Reflection Probe affects this object, so the global Environment Reflection Source doesn’t affect this mesh. 3) Standard Lights 4) Light Bounces 5) Emissive Materials. Unity.

Gamedevelopment