Giter Club home page Giter Club logo

Comments (5)

rms80 avatar rms80 commented on August 19, 2024

Good question. Was meaning to write about this anyway, so here is a much longer answer then I would type in here: http://www.gradientspace.com/tutorials/2017/12/14/3d-bitmaps-and-minecraft-meshes

lmk if you still have questions

from geometry3sharp.

frost-byte avatar frost-byte commented on August 19, 2024

Thanks so much for providing such a quick and detailed response. I’ll follow up once I’ve had an opportunity to use one of your suggested options

from geometry3sharp.

frost-byte avatar frost-byte commented on August 19, 2024

Just wanted to let you know that I was able to get your Tutorial to work in the Unity application that I'm developing. I had to spend a lot of time in blender making fixes to the mesh I wanted to use (way too many duped triangles and it was not manifold)

I'm able to save the voxelized mesh to an output file, so I know that the examples you've provided work. However, I'm afraid to try running the Winding Number one again, because it just locked up my system (Though I have a sneaking suspicion this was do my mesh having so many issues, as my earlier output files had long stretches/anomalies).

One of the issues I'm having, as far as actually displaying the voxelized mesh within my app, is that meshes in unity apps are limited to 65535 vertices. I've used your tutorial for simplifying meshes, but unfortunately they're still coming out too large. Does your library include a way to partition a large mesh into an array/list of smaller individual meshes?
unvoxed_mesh
vox_mesh
level

from geometry3sharp.

rms80 avatar rms80 commented on August 19, 2024

Right, forgot about that in the tutorial. Set VoxelSurfaceGenerator.MaxMeshElementCount to the max vert/tri count you want, and then the Meshes list will contain multiple meshes <= that size.

The winding number code I posted will use up 100% of CPU, across multiple threads, so that is maybe why it seemed like your system was locked up (particularly if you only have 1 or 2 cores). If you change it to be the non-parallel version, it will take longer but won't lock your system. I would try running at quite low resolutions and stepping up the voxel count once you have a sense of how long it would take (halving voxel size will take 8x as long).

(Or don't use it it all, now that you have fixed the mesh - but that is the main reason, MWN should have handled all those mesh issues automatically)

from geometry3sharp.

frost-byte avatar frost-byte commented on August 19, 2024

Wanted to thank you again for your help! I haven't tried using the MWN again, at the moment I don't need to use it. Thanks for mentioning the MaxMeshElementCount. I've been able to take the meshes from the VSG and convert them to the Unity Mesh format at runtime and then render them as a collection of individual meshes.

The Bitmap3 is obviously working and after futzing around a bit with the positioning of my dynamically created prefabs I'm able to see a Grid overlay over the level I'm currently viewing. (I generate a 2D texture of the current level I'm viewing, xz slices).

I need to review your previous tutorial on the SDF because I need to be able to test the validity of any mesh that I want to load at runtime and then repair it on the fly.

from geometry3sharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.