Unfortunately for me I spent most of my 30 day trial dealing with issues unrelated to Unity, but I could see that there is clearly a lot of promise in the technology and based on some of the demos I saw people putting together I figured I had nothing to lose (especially for the price) so I’ve become one of you.
There are a few questions that I have now that I have signed up
I like that one can easily create a landscape, but what if I need to have a bunch of them tiled together. What is the easiest way in Unity to do that, and does Unity have enough intelligence to know how to stitch landscape tiles together.
When dealing with the GUI, is there any way to work with some sort of resource editor that would assist with the layout? Putting the GUI together and adding in some almost ‘magic’ numbers for layout of labels and such seems to be a bit wrong
When I am dealing with model formats, is there any specific preferred modelling package or format that makes things work more appropriately out of the box?
Is there a modelling/terrain package that will allow me to design the entire terrain in that package and then import that into unity? Unity brushes are not as good as some of the functionality available in other tools.
When placing things on terrain, is there a function that I can use to say put a building on the terrain properly if the terrain is on an incline or similar?
I don’t think that’s really possible with the built-in terrain system. Although you can accomplish that in other ways. If it’s not important to be seamless, you can have a bunch of different levels with a different terrain in each level. The terrains can be really, really big, which might obviate the need for tiling altogether.
Not at the moment, though such a thing wouldn’t be hard to write (just time-consuming). You can use GUILayout as opposed to GUI in many cases, which alleviates the need for so many “magic numbers”. I find that using the GUIText and GUITexture objects is more appropriate sometimes, which allows you to use 2D objects in the same way that you use 3D objects (i.e., component-based).
I believe Cheetah 3D has a high degree of “just workingness”, as does Maya (more $$$) and Blender (less $$$).
Funny you should ask that. Why yes, there is. Should be a new version out by Monday.
There was a “drop object to surface” script floating around somewhere…can’t remember where offhand.
I wouldn’t mind that but the terrain I want to create is likely too large to fit within even the most ambitious octtree implementation. I want to create a terrain that is about the size of a small city, then allow you to walk around the countryside and then walk to another city, etc. This would simply not be a reasonable use of memory.
I will take a look at that new version. I looked at the old version and it was interesting, but too early in some of the features that I needed compared to something like Bryce.
If you used a terrain with a maximum resolution of 4097x4097 and had the sample size be, say, 1 sample every 4 meters (which is still a pretty reasonable resolution for a terrain), that would give you about 268 square km, which is pretty huge. But it will still run fast…anything outside the view frustum isn’t rendered, and of course the terrain has built-in LOD too.
If you need bigger areas, then the built-in terrain wouldn’t be the best choice. Fortunately it’s not that hard to build meshes from scratch, but then you’d have to do your own LOD and so on.
Understandable…version 1.1 primarily focuses on textures, so it still might not do what you want, but there’s more stuff to come. Let me know what you’d like to see.
Many of the things I am looking for are really being able to easily lay in roads and paths. In fact I think those are the two hardest things for me right now because getting the texture brushes to blend right has been difficult since I’ve been finding it a little hard to make sure that I’m looking down on the terrain. Pressing F on the terrain is good for centering, but I really want to look down on the terrain most of the time so that I can get most of the the texturing done.
In the scene view, you can select top/bottom/front/back/left/right views (although front/back seem to be swapped), so using the top view would do what you want. Also, toggling orthographic view on would probably be helpful in this case. I do want some kind of road/path tool in Fractscape, though I’m not sure when it will be added.
Yeah, because I would want to be able to stamp a road down (level the terrain) or have the option to put in a bridge over areas of uneven terrain.
I’d also like to be able to drag over an area of terrain and say “randomly drop the trees from this palette in there” or even, “here is some grass - put in in the region that I drag out”.
Oh I could keep you busy for years on terrain building
Oh, one more thing. Suppose I want to deform the terrain at runtime via a script, how do I get access to the underlying heightmap data. I would want to be able to have a bulldozer (for example) be able to move across the terrain and manipulate the heightmap at its location - but I can’t seem to find the way to get the heightfield height based on a position. I’m sure its buried in the reference guide somewhere, but I don’t see it.
Use terrainData.GetHeights() and SetHeights() for that. See this for a little more detail of how to actually use them (which is kinda missing from the docs).
Be aware that doing this alters the heightmap permanently, so it’s probably a good idea to make a copy of the heightmap data when starting, and then write it back OnApplicationQuit.
You can use Terrain.SampleHeight just to see what the height is at any given point, but for a bulldozer manipulating the terrain, you’d want to find the actual heightmap info so you can write it back after changing it. Fortunately, not being able to rotate or move the terrain makes that easy, since all you have to do is convert the x/z world space positions to the terrain’s heightmap coordinates based on the terrain’s size and heightmap resolution.
Hey Eric since you seem to be an expert on the terrain system I wanted to ask you if it’s possible to change the terrain textures and / or props as I dynamicaly alter a terrain, say I digg to deep and I want to accuratelly represent the changes in the soil.
EDIT: nevermind I saw this at the end of your other post…
“All data seem to be stored in the Terrain.Asset, which contains the Light and Splat maps. But there’s no script interface to access these data.”
Do you know a workaround for this? if that’s even possible…
Yes; as I mentioned elsewhere, the terrain interface itself is done with a script (if you do Component → Script, you see Terrain as one of them), so it’s possible. The APIs aren’t public though.
So the functionality is there but no docs on how to do it? or the texturing part of the script is private? Perhaps I can get to the texture by guessing what kind of component it uses?
Yep. It can and probably will change before it’s finalized, or else it would have been made public along with the other APIs I assume. I expect they don’t want of bunch of people saying “Argh! My terrain stuff is broke!” when the next version comes out.
Gotcha, I wonder if anyone has successfully found a good workaround for this limitation, I’m thinking billboards aligned with the terrain normals, but that would look ugly and won’t be very optimal.