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
3
Question by DarkKobra2020 · Nov 30, 2011 at 12:34 AM · terrainvoxel

Voxel Terrain

I'm asking this question because for my next project I need to implement a voxel terrain engine similar to that used in CryEngine 2. Because I need to make caves, no I have a mental system for how this could possibly work but if it does not could you suggest a work around?

My system is where the editor has an editing tool where I can instantiate low poly balls on top of each other without depleting to much memory. The way I found around that would be to use some sort of occlusion where it destroys certain balls on the inside

For example if I had three balls but you could not see the third then destroy the third ball since it is not needed.

Comment
Add comment · Show 1
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 syclamoth · Nov 30, 2011 at 12:03 PM 1
Share

Sorry, I read this post and all I could see was "I need to write CryEngine 2"...

1 Reply

· Add your reply
  • Sort: 
avatar image
3

Answer by Statement · Nov 30, 2011 at 01:27 PM

If you want to do it yourself, look for Marching Cubes algorithm. It may take a day or two to wrap your head around, depending on your skill level. I managed to get this going the first day, and this going the second day. Third day I got bored and discontinued development of it.

Your idea of balls should be pretty simple to implement with marching cubes. Imagine each vertex has to sample a value (usually between 0 and 1) and that value is used to extend/retract the vertex for that point in space. Your balls would then interpolate from 1 to 0 where value 1 is in the center, and 0 is in the ball crust. Basically, you just have to check the magnitude.

I solved texturing by using a triplanar shader, requiring no UV coordinates. It just take the world position and project 3 textures on it, and interpolate between the textures depending on the normal.

Comment
Add comment · Show 2 · 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 0xc0dec · Dec 14, 2011 at 05:25 PM 2
Share

Would you consider posting the code? That might help those who still strive :)

avatar image CubePhysics · Jan 25, 2013 at 09:40 PM 0
Share

Statement. That Clayful thing you made is fantastic Honestly! You must create a tutorial On how to do it! Ive been looking for Unity voxel tutorials that arent like $$anonymous$$inecraft blocks.

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

9 People are following this question.

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

Related Questions

Instantiating multiple objects, Destroying and instantiating on trigger + delay 0 Answers

Lights attached to objects turning off over terrain 2 Answers

Terrain Triangle Generation 1 Answer

A good terrain engine for Unity ? 1 Answer

Texture mapping procedural mesh with texture atlas? (Minecraft style terrain gen) 1 Answer


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