ianovergard
Hi there,

So I'm struggling to get a simple scene working in Unity. What I want to accomplish is creating a small scene (<1km) and export it into Unity. At the moment I want to avoid creating complicated biomes or terrain.

What I'm doing is I first use the second template for New Project (I believe it's "Workspace with Materials" or something along those lines.) I then add a simple box.

test_scene_vf.png
Then I export this into Unity. However, when I reference this scene in the VoxelFarm client the initial run takes upwards of about 5 minutes (the example scenes don't do this) and I don't get any results. It also frequently will crash with an out of memory exception or give me a null exception.

test_scene_unity.png 
Is there a reason why this seemingly simple scene is causing so many problems? And is there an easy way to accomplish what I'm looking to do (very small ground plane with some simple shapes to start?). I tried creating from a Blank Project, but I ran into all sorts of issues creating the terrain and such probably do to my inexperience, however all the same it was a very frustrating experience with a lot of errors and frequent renderer crashes. Maybe there's some sort of example template with a small scene that will get me where I want to be?
0 0
ianovergard
A little bit of a follow up, I did manage to get the scene imported by drawing out a ground box about the size I wanted and deleting the terrain node, and then setting the origin in unity based on the camera coordinates. This does lead me to a couple follow up questions though:

  1. I'm still confused why the flat plane caused so many issues; I would imagine something like that should compress well?
  2. Is there any way to get things generally centered around 0, 0, 0? I know the Unity plugin can generally accomplish this, in Unity anyway, but in general when I'm working with 3D software I like to keep my numbers clean and keep things nicely aligned to grids, and the somewhat wacky origin I get by default makes that very difficult.
Thanks for any insight
0 0
voxelfarmtorres
The plane is just terrain with no elevation features, it will not cause any issues as long as you input the proper voxel farm coordinate origin in your unity client object. These steps in the documentation are still valid and necessary. You can follow these steps with the example terrain projects from our site and they will work:

https://www.voxelfarm.com/doc.html?example-projects

If you are playing with coordinate systems, it helps to be aware of how the coordinate system works. While you would continue to work around 0,0,0 in unity, when you look at Voxel Farm coordinates, the numbers you see make you immediately aware of the "margin" space you have for your content. The 0,0,0 point in Voxel Farm coordinates is the lower point in an axis aligned box, not the centroid of the box.

Other 3D software does not have this requirement of having an uber-bounding box for all content, coordinates can be whatever the numbers can store. In Voxel Farm's case, because everything is indexed, there is a limit to how much we can index. Since such a box is necessary, we prefer its existence to be clearly noticeable to the developer instead of hiding it by shifting the system to a 0,0,0. The origin you get is not wacky, it reflects you have that much space to fill into the negative direction, and the same amount is available in positive space. Another way to look at it is, we prefer you to become aware of this fact right away instead of masking it.

Regarding how convenient these numbers are, please note you will not need to interact with these coordinates after you set the world origin coordinates in the unity object. Since this is a one-time setup, it is not clear why using the offset coordinates would make anything else very difficult. 
0 0
ianovergard
Hi Torres,

Is it possible that the flat plane is much larger then the terrain in the example projects? I think one of the nodes referenced being "infinite", which of course it's not but I'm guessing it's quite big. I'm just a bit confused by the extremely long generation time with that setup vs. the example projects which seem to have much more detail and generate much more quickly. 

I suppose that makes sense about the bounding box, but the reason it's somewhat inconvenient is that it makes it harder to line up things with voxel studio objects that aren't created in voxel studio, (IE Unity prefabs and such). It's a workflow thing -- when I'm working in maya I tend to be very careful to keep things in whole number coordinates to make modular levels easy to build. I don't mind the explicit world boundaries (if I recall correctly a lot of physics systems have had this too), I guess intuitively I'd just find it nicer if 0,0,0 was the center, and the extents went negative and positive. I suppose I can live with that, but I would much prefer if I could actually specify what I wanted my bounds and origin to be. I can live with it though.
0 0
ianovergard
I'd also point out, in the spirit of constructive criticism :-), that the numbers don't particularly make you aware of the margin space since that had to be explained. I think a much better display would be to explicitly have a box that states the extents of the world.
0 0
voxelfarmtorres
Please note that if you need to line up things like Unity prefabs, you would use Unity coordinates. If for some reason you need to compute Voxel Farm coordinates out of Unity coordinates, note that not only a translation is applied but also a scale. This is how you achieve any effective voxel size you may want for your project. For the time being, you must be always aware of the transform between the two coordinate systems.
0 0