Seeking for confirmation part 2...

Hey guys,

I have a couple of more questions as a follow up to this thread, http://forum.unity3d.com/viewtopic.php?t=6084.

  1. If you look at the 4 pictures below, how crisp can the edges be between textured parts using the new terrain texturing tool in Unity 2.0? Assuming that the camera is about 2m in the air, so relatively close to the surface!

  1. In the thread above I asked for options to cut an hole in the landscape. I was pointed out to a shader in the wiki that can take care of this. Will this shader also work with the new terrain object in Unity 2.0?

  2. We will probably use unitree extensively. As we will be mapping real existing golf courses we also need to do the foliage as close as posible. How big is the tree library or is the integrated unitree system more a concept and do we have to supply the trees ourselves?

  3. The landscape pictures shown here, http://forum.unity3d.com/viewtopic.php?t=5983, are just amazing. Is this kind of scene running fullscreen only possible with an advanced system or will the average system still render this fine given the fact that physics will be going on, water, bloom, etc. etc.?

  4. One thing we never got to work in our current 3d engine is realistic collision detection between ball and tree objects. Is this easy to implement in Unity and how expensive is it?

  5. What is the hourly rate in US$ that the pro’s here charge when we can’t get something done!? :wink:

Thanks,
Raoul

I can answer 5 and 6. :wink:

  1. Collisions and Physics work very simply. Just put a sphere collider on the ball and a mesh collider on the tree and watch the magic happen. :stuck_out_tongue_winking_eye:

  2. Just ask your question and the magical Unity wizards will answer it free of charge!

Hope you become an avid Unity-ist!

Yes. It should work on every rendered object I believe.

There are a few nice trees that helpful users have submitted. Take a look here: unifycommunity.com
Also we can hope that all of garen’s nature coolness will be included with the unitree example content.

Hopefully. If not you should at least be able to render the same scene at lower quality.

I can think of several ways to do this in Unity that would be nice and fast, but you will probably have to do some coding to get it to work right.

@ Moldorma’s response: Not exactly because of how expensive mesh colliders can be and how fast the ball is moving. Probably you want to either use triggers, raycasts or simple distance checking every frame to detect collisions, then use a random algorithm to simulate different densities and angles on the tree, and apply force on the ball accordingly

Help is free around here, but as far as hiring someone to do a specific job for you I would assume it wouldn’t be too expensive. Some of us aren’t doing this for a living and just want to work on cool stuff.

I doubt it’s physically possible to do something like that and have it run well on a years-old system (depending on what “average” is), but one of the many good things about Unity is that by default, stand-alones have a number of different quality levels, and you can define what the low-end and high-end do, exactly. So people with high-end systems can crank it up to the max, and other people can run it with less effects (like having plain water instead of reflective water, for example).

–Eric

In regards to the soft edged grass line (images 2-4) it looks like this is caused by the mip map settings. No?

Cheers,

He was asking about using the terrain tools to mask different textures, and how sharp he can get the edges, so I understand.

I would think that would depend on the res of the mask, but I am not sure.

Worst case, you could prob use another mesh for that area, and use a 2 layered shader and your own mask. That way you can get higher res on the mask.

Other than that I am not sure.

HTH,
-Jeremy

You could also have a slightly different mesh that “pokes up” a few inches above the surface in places. You’d just select the points in the desired area and lift them in your modeling app. Intersecting polys seem to render nicely, and the edge is sharp–though not necessarily nicely curved.

We will provide a package with a bunch of trees garen and others have been working on. I also hope other people will upload their trees, so we can build up a really great tree library people can use right away.

It’s really, really fast and it features a lot of LOD options. Our goal with the demo from which the shots are made is looks like that and runs really fast on mid range graphics cards. On low end cards (geforce 2mx), we will lod it down on the fly but it’s not gonna look much different really.

Serioulsy we are not kidding when we are talking about 100.000 trees and billions of grass blades. We even have scenes with 30.000 trees visible at the same time at great frame rates.

Thanks a lot guys for all the answers, I guess there will be a Mac here hopefully sooner then later!

I take it that question 1 is a wait and you will see one, right? Which is fair enough ofcourse.

Making it possible for players to set the quality, is this a built in feature, or should all of this be coded?

@Joachim, thatlandscape demo looks really cool, when can we see it in action) :wink:

We have The QualitySettings class which makes this really easy to do.

I take it that question 1 is a wait and you will see one, right? Which is fair enough ofcourse.

sort of. all 4 images are possible to do now. you might need a pretty high res mask for image 1 though which could be a prob for older gfx cards. you’d have to test the layered terrain shader to see. anyway, i doubt that will “break” but yes, how the 2.0 terrain engine works is a wait and see.

Normally when you launch a stand-alone game, you get a choice of 6 different graphics settings ranging from “Fastest” to “Fantastic”. Each setting has various parameters like texture resolution, type of lights, anti-aliasing, etc., which you can set from the editor. If you want even more control, you can supplement that by reading what the quality level has been set to after the game starts and turning different things off or on by scripting.

Which is, actually, one of the best things about Unity…there are loads of built-in features that are easy and cover a lot of ground, but you can still go even beyond that if you want.

–Eric

That quality setting thing is really useful. Is there a way to customize the look of it?

What happens when a user on a slow machine chooses the highest quality setting? Just to be sure, can the physics engine be set to “fixed steps” to avoid that there is too much time between frames and thus running the risk, in our game, that the ball goes through the land because no collission was detected? Or does the physics engine have built in features that will avoid this from happening anyway not matter whether you use “fixed steps” or not?

Thanks,
Raoul

You can switch quality levels from script. That means you can switch them based on arbitrary user action (choosing a menu item in your game), or even switch them when FPS becomes too low or too high.

Physics engine always runs at fixed time steps. And yes, you can set the frequency that the physics runs at.

Thanks Aras, good to know that.

The physics bit is confusing me at the moment. It seems to me that despite the fact of using fixed steps I still need to use some “protection” in the case the ball does drop through the ground, true or not? Can this be for the full 100% be avoided?

If not then, the first thing that comes up in my mind is to always check the y position of the ball and the y position of the landscape at the specific x,z coordinates. If the ball is below the land then do some interpolation with the previous ball position and set action accordingly. In my previous thread there were suggestions of using meshes to deal with high detailed parts of the landscapes and using a shader to make parts of the landscape invisible and put another object there. This means that you not only have to do check ups for landscape y position and ball y position, you will also have to do ray casting on the objects being used in the landscape. If the the ball is not below one of those objects you deal with the landcsape y otherwise you deal with the y coordinate of the specific object.

Am I right in my thinking? And if yes, how does this influence performance giving the fact that there will be between 5 and 10 of these objects?

Yes. You have to determine the maximum velocity of your golf ball and pick the fixed frame rate depending on ball size and maximum velocity. Once you pick the right fixed frame rate the ball can never drop through any meshes.

5 or 10 objects is nothing. If you were talking about 1000 or 5000 objects, then some clever approaches would need to be developed.

Thanks again for the answers. I realise that those 5-10 ray casts are not a big deal. But if you look at the whole scene, probably 100’s of trees, shadows, water, bloom, etc. etc. Is ray casting in general cheap? I am just paranoid when it comes to fps from our current experience. Ok no real optimization done yet, but without the demo not even nearly finished performance has already dropped to 30-40 fps on a pretty decent system.

Two most common performance problems: 1) too many objects, 2) too many lights used in not-too-clever ways. The documentation has all the details.

Additionally, you can build an OS X player with debug symbols, and use a profiler (Shark, comes with Apple developer tools) to see where the time is spent.