x


spherical terrain! help plz

Help Plz!! I am trying to make a game, with level design in the form of a spherical sphere. I searched about making spherical terrain, but i didnt find any good answers, Still i can import a whole sphere from some 3d application, But i dont know is there a way to paint grass over that sphere mesh, as we do paint over unity terrain. I also came through some answers, where we can make use of scripts to make mesh act as terrain object. But i dont think its workign too and am not that good in programming. Please help me out. Thank u.

more ▼

asked May 04 '12 at 02:19 AM

balajidream gravatar image

balajidream
0 1 1 1

(comments are locked)
10|3000 characters needed characters left

5 answers: sort voted first

No, Unity doesn't have a built-in way for spherical terrain. The terrain script that comes with Unity uses a heightmap so it's always a rectangular plane. You have to model it outside of Unity or maybe find some third-party-stuff. Maybe there is some generic grass-renderer.

more ▼

answered May 04 '12 at 02:22 AM

Bunny83 gravatar image

Bunny83
67.2k 22 68 269

Thanks a lot, I will work on it..

May 04 '12 at 09:46 AM balajidream
(comments are locked)
10|3000 characters needed characters left

If you're not good at programming, particularly 3d-space calculations, then this will be rather tough for you.

All of the terrain systems in Unity are designed for height-map based worlds, so you won't be able to use any of that for your project. If you want to paint grass using the Editor, you will have to write code to do it yourself.

With that said, it is possible to create spherical worlds. In fact I did it for a weekend game jam. I wrote a custom "Planet Physics" component which basically simulates moving around on a circle, though extending this to move on a fully-spherical world wouldn't be too difficult. But it was necessary that I handled my own collision and physics. It was still rigidbodies moving around, but they were completely controlled by kinematics, not the Unity physics engine.

alt text

One possible alternative solution is to use rigidbodies, turn off physics gravity, and then calculate your own gravity forces for every object. In other words, apply a push that always faces the planetary center.

more ▼

answered May 04 '12 at 03:14 AM

chainedlupine gravatar image

chainedlupine
122 2 2 3

Its a good alternative. Though i figured out some other way which is similar to which u said now. I made the camera and the player locked at a single point on the sphere. camera placed in TPS view. where, when i press the movement keys to move the player, instead of player moving, here just the animation is triggered and the whole world rotates in its respective axis, player is intact. So when we play through the game view point it will be looking like moving over a sphere. If you were saying about the same thing, sorry for the huge explanation :P and the only thing i am concerned about is the grass. And BTW, you added its not possible without scripting, I will try to get help from a developer friend only for that part. and forget to say this is for my college project i am working on. ANyway thanks a lot

May 04 '12 at 09:44 AM balajidream
(comments are locked)
10|3000 characters needed characters left

Thank you very much everyone for you replies and and suggestions.

more ▼

answered May 04 '12 at 09:57 AM

balajidream gravatar image

balajidream
0 1 1 1

How about replying in the comment section? You know, this is the space where you post your answers!

May 04 '12 at 10:34 AM venkspower
(comments are locked)
10|3000 characters needed characters left

THanks everyone, Finally, got it working done. Modified from faux script. Thanks to podperson. and my programmer who helped it out.

http://www.youtube.com/watch?v=Xz22wMsReE0

more ▼

answered May 16 '12 at 02:53 PM

balajidream gravatar image

balajidream
0 1 1 1

(comments are locked)
10|3000 characters needed characters left

THanks everyone, Finally, got it working done. Modified from faux script. Thanks to podperson. and my programmer who helped it out.

faux link: http://forum.unity3d.com/threads/8873-Faux-Gravity-making-my-brain-spin...-Help!?p=66081#post66081

http://www.youtube.com/watch?v=Xz22wMsReE0

more ▼

answered May 16 '12 at 02:53 PM

balajidream gravatar image

balajidream
0 1 1 1

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x10

asked: May 04 '12 at 02:19 AM

Seen: 2929 times

Last Updated: May 16 '12 at 02:53 PM