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 HusbyFan · Jun 13, 2012 at 10:29 AM · databasesqlitesql

Sparse octree in Sqlite?

I'll try to keep this as short as I can. My concept: voxel terrain, minecraft-like rendering of cubes:

A composite pattern creating a 32-level sparse octree with the lowest level being 25cm in size.(*)

Every composite of that hierarchy stores its children(/parent) and a 8-byte variable for material type. Parent composites will get a material based on the materials in its children, so you don't need to go down to the smallest cubes for information when the camera is far away.

The question is, can sqlite handle such potentially large amounts of hierarchical data?

If possible, what's the best sqlite/sql-patterns to follow for such a octree?(**)

And if not, do you have any tips on how you would have done it?

This might be more of a Stack Overflow question, but the use is very obvious so I figured I'd ask here first :)

    *(Unoptimized/non-sparsed this thing would be horrible, 65billion exabytes on the top level, and that's just with 8 bytes per lvl 0 node and not counting the necessary data per level)
    **(not an sql expert, been looking at hierarchyId and r*-tree systems, but the former doesn't seem to be a part of sqlite and the latter seems less optimal for a octree hierarchy. Though it never hurts to ask.

    Also, other more conventional sql patterns like "nested sets" looks terrible for this sort of system, though I might have missed something.)

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 whydoidoit · Jun 13, 2012 at 10:42 AM 1
Share

Sounds like you want some kind of NOSQL sparse hash table to me.

avatar image whydoidoit · Jun 13, 2012 at 10:49 AM 1
Share

Something like this? Depends if you just need the key lookup. I've got one I wrote for Silverlight somewhere, but I haven't tested it for Unity yet.

avatar image HusbyFan · Jun 13, 2012 at 10:52 AM 0
Share

Certainly seems closer to home than sqlite, was planning to look into mongoDB, but this looks like its more up for the specific job. Thanks for the tips so far :)

avatar image whydoidoit · Jun 13, 2012 at 10:56 AM 0
Share

Hey you can check out this page, I guess you are after the tuple storage stuff a few pages down. I'd be very interested to hear how you get on with this project.

avatar image HusbyFan · Jun 13, 2012 at 01:35 PM 0
Share

I'll give some heads-up if it works out well, going to take some time though, but I think it might have potential

0 Replies

· Add your reply
  • Sort: 

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

VR Highscore with database (SQLite) 1 Answer

Hiding the SQLite file 0 Answers

Can't Connect to SQLite after Build..... 3 Answers

Looking for step-by-step manual how to configure SQL Lite on Unity 2017 ( or other database) 1 Answer

Which is faster Update vs Delete Insert in Unity3d Database 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