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
0
Question by 00george · Mar 03, 2013 at 07:21 PM · vector3cubespherenormalized

Maping cube to sphere. Help.

I am a complete noob at scripting and have been look at taking a cube and turning it into a sphere for my planet generation. I first need to map my cube to a sphere but I have not been able to do it. All I want to do is take the cube's point normalize it and then times it by the radius "something" = "something".normalized * radius I just don't know how to do this in code. I have been using c# but I don't really care what I get a answer in. Any help would be appreciated.

Comment
Add comment · Show 4
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 robertbu · Mar 04, 2013 at 02:16 AM 0
Share

I'm not sure what you are attempting here. Cubes and spheres are meshes. Are you saying you to duplicate and rotate cubes to create a sphere-like construct composed of a multitude of cubes? Or are you trying to build a mesh. If you are trying to build meshes, the wiki has some source for a variety of shapes that you can exa$$anonymous$$e.

avatar image 00george · Mar 04, 2013 at 08:04 AM 0
Share

$$anonymous$$aybe this will help you understand what I mean http://www.nullpointer.co.uk/content/procedural-planets/

avatar image robertbu · Mar 04, 2013 at 08:40 AM 0
Share

I'd classify this as an "advanced" project, so as a "complete noob" you may struggle for some time in order to make it happen. Here are a few links to get you started:

  • Procedural cube - just 1 x 1 and you will need to fix the triangle order problem. But it is simple example of building a cube mesh.

  • Create plane - plane code that allow you to set the number of segments. You can look at how they did it, and use their mesh for figuring out how to modify vertices.

  • Procedural examples - select the procedural examples from this page.

avatar image AlucardJay · Mar 04, 2013 at 09:10 AM 0
Share

Wow sometimes I cannot believe coincidence : I am literally reading up on this right now !

Current open links :

  • One I'm about to go with : http://petrocket.blogspot.com.au/2010/04/sphere-to-cube-mapping.html

  • http://mathproofs.blogspot.com.au/2005/07/mapping-cube-to-sphere.html

  • http://forum.unity3d.com/threads/69759-$$anonymous$$apping-a-cube-to-a-sphere

I keep saying it because as you see I do it : A Search Engine Is Your Friend =]

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Bunny83 · Mar 04, 2013 at 09:22 AM

Yet another question like that.

http://answers.unity3d.com/questions/319082/stitch-spheriphied-terrain-like-6-planes-removing.html http://answers.unity3d.com/questions/357993/mapping-a-cube-to-a-sphere.html

Comment
Add comment · 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

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

12 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

Related Questions

Why is my y-axis bugging? 1 Answer

How to make flat object(Unity 2D) 1 Answer

Mapping a cube to a sphere 1 Answer

How to use spherical coordinates in unity? 0 Answers

Shoot ball according to spot mouse gets clicked 2 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