Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by BritishGuy · Jan 27, 2014 at 11:15 PM · terrainloopproceduralendlessinfinity

Endless Terrain "Loop"

Hello, I am curious to how to achieve a endless terrain, A terrain that loops back on itself making it infinity, I would never see the edge and would always stay on the terrain no matter how far i go, I used my A+ artistic skills to demonstrate what i mean,

P.S. Imagine the HD Square as a terrain, High polly arrows are player 1 and player 2.

alt text

alt text

So my questions are, Is this possible in unity's engine? if so what would be the easiest way to achieve such a thing?

Thanks.

example2.png (2.2 kB)
example1.png (3.8 kB)
Comment
Add comment · Show 5
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DaveA · Jan 27, 2014 at 11:19 PM 1
Share

Pictures paint 1000 words

avatar image getyour411 · Jan 27, 2014 at 11:22 PM 0
Share

Part of your solution might involve Terrain.SetNeighbors and possibly Terrain.Flush, check those out. Another possibility is a large sphere 'world' that's not terrain, but a GameObject

avatar image BritishGuy · Jan 27, 2014 at 11:56 PM 0
Share

I did proceed to make a sphere terrain, It worked fine except in order for the terrain to seem flat the sphere "world" would need to be huge.

avatar image Lockstep · Jan 28, 2014 at 02:07 AM 0
Share

Don't ask me how this can be done (I want to know myself). But it is definitely possible. This game is the proof.

avatar image getyour411 · Jan 28, 2014 at 02:42 AM 0
Share

I think there's a problem in the concept though - in the top pic, blue player looking left isn't seeing into infinity in the way it's usually considered via "flat" terrains (ala $$anonymous$$Craft), it's a closed loop (thus he can see red).

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by TropicalTrevor · Jan 28, 2014 at 02:39 AM

EDIT: Without pictuers I also thought you meant infite terrain but your pictures say you want 'wrapping' terrain. So edited my awnser for wrapping, check the first version for ideas on 'infinite' in which a terrain is indeed infinite and you will never leave it, but you won't see what's on the other side as in some kind of paradox.

There are various issues that you'll have to deal with... and various way to achieve solutions.

Tiling terrain You could create a tileable terrain, generated from a heightmap which was made tilable outside of unity. Then all you'd need is 9 terrains with the same heightmap.

The camera clipping (and possibly fog) should make sure you can only see as far as one terrain is wide. This way you can walk all across the center terrain you will never see edges and the world is already tiling. Whenver you leave the center tile and enter an adjacent terrain tile, you can move the terrains that are too far away and put them in places that are now closer. Because they all tile this would make your world seem infinite.

http://imgur.com/DPoMczo

Wrapping objects In update simply module the position and reassign position = new Vector3(position.x % 10, position.y % 10, position.z % 10);

Then make sure you have 9 versions of each object offset by the same units as that you wrap it by (in this case 10).

Problem with the idea is however that the player wraps in 2 axes, so it will appear that the same player has surrounded you from all sides.

You'll see it where it really is, but also behind you, and reflected because it wraps in X as well as Y.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image BritishGuy · Jan 28, 2014 at 12:47 PM 0
Share

Hello and thank you for your answer, I have managed to wrap terrain's, But the problem now is i cannot see Player 2 once they reach the edge and are put to new vector, I am not so good as explaining myself so here is a quick web demo to show what i mean,

Now the wrapping is perfect as you will see, Used fog so you wouldn't see the center object on all sides as you stated above,

Notice how when you get close to the statue the red players disappear, as you progress further they will reappear again.

WebPlayer Demo

Any way to keep them visible?

Cameras with custom shaders? or Stencil buffers maybe?

Thanks.

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

how to generate custom procedural terrain ? 0 Answers

Rivers on procedurally terrain 0 Answers

Procedural heightmap shader - Normals and tangents 0 Answers

Vector math problem 2 Answers

how do i procedurally generated perlin noise infinitely c# 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges