segunda-feira, 4 de agosto de 2014

Voxel Raytracer

When I was starting to learn Unity about 3 years ago Minecraft was already very famous so I decided to explore some voxel based tech. I had read about raytracing code for general general geometry so I decided to mix it with voxels to see what happened. In this project, I pre-generate a texture using Perlin Noise, upload it as a Texture2D to be read by the raytracing shader. A second ray is cast to generate shadows.

The original code was done in Unity 3 but I reimported and recompiled it in 4.3.


Web Player
Unity Package

segunda-feira, 28 de julho de 2014

My first asset store asset is now released: Editor Table - Multiple Object Editor!



In a previous job we had a lot of configurations for enemies split in several different prefabs or scriptable objects. It made sense, as separated assets are easier to create and change encounters. Its also better for collaboration (one object being edited by multiple people is an easy recipe for madness).

However, when someone needs to check and compare multiple assets it can quickly turn into a boring task. Selecting multiple objects at the same time doesn't help: a "-" will be displayed in the parameter place when the values are different.

You could create a special editor window that displays the data in a table form, but the usual way of doing this is creating a specific code for that kind of asset. It can be sufficient for one asset, but what if you have several different types of assets, not only enemies but also weapons, items, NPCs, encounters and other things?

That's why I decided to use the power of Unity's serialization system to create a generic table system. Just drag and drop your assets in the table and select the properties you need!

This version is quite different from the one I made before. I coded it again from scratch and added some new features.

- Changes are automatically applied to your assets.
- Add objects of different types in the same table.
- Resize and reorder rows and columns.
- Add empty rows and columns to organize your work.
- Save your table as an asset.
- Custom property drawers are supported (when you define it for a class).
- Edit multiple tables at the same time.