Jump to content
  • Advertisement

Boris The Brave

Member
  • Content count

    10
  • Joined

  • Last visited

  • Days Won

    1

Boris The Brave last won the day on April 17

Boris The Brave had the most liked content!

Community Reputation

13 Neutral

About Boris The Brave

  • Rank
    Member

Personal Information

Social

  • Github
    https://github.com/BorisTheBrave

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Boris The Brave

    Marching Cubes and Dual Contouring Tutorial

    Also, that author makes it very clear he has a signed distance and is evaluating it more than once per cell in order to get gradients. If you follow this link and search for DensityFunc, you'll see him getting gradients from multiple evaluations of the function.
  2. Boris The Brave

    Marching Cubes and Dual Contouring Tutorial

    If you don't have gradient data, you want surface nets, not dual contouring (briefly mentioned in the article): find the locations of the sign changes around the cell, and pick the average point of those to be the vertex of the cell. Effectively this is the same as assuming the normals are always perpendicular.
  3. Hey guys, I made a new procedural generation algorithm for laying out paths on a grid in an organic way. Maybe you'll find it interesting. https://www.boristhebrave.com/2018/04/28/random-paths-via-chiseling/
  4. Boris The Brave

    Marching Cubes and Dual Contouring Tutorial

    If you want surface nets out of my code, it's pretty easy. If you turn off adaptivity and run the dual contouring, you get unsmoothed surface nets. If you want smoothed surface nets, replace solve_qef_3d with numpy.mean(positions, axis=0).
  5. Boris The Brave

    Marching Cubes and Dual Contouring Tutorial

    I don't believe normals are your problem, actually. The adaptivity (i.e. choice of vertex location) is also dependent on the function being smooth, which your is not. It expects height of the function to roughly correspond to "depth from the surface". Your function is basically zero inside the unit sphere, and infinity (or 4) outside, with little to no transition, violates this. The julia set is really just an yes/no measurement, it's not meant as function returning a float. The easiest thing to do is to turn off adaptivity, and use marching cubes, as in that case a yes/no measurement is all you need. Then just crank up the resolution.
  6. Boris The Brave

    Marching Cubes and Dual Contouring Tutorial

    Thanks cowcow. I've pushed some changes that may help you. I should point out that the function you've chose is fractal. I'm afraid that it may not be "sufficiently smooth" enough for the gradient evaluation to work. This might be a time where you are better off sticking with marching cubes.
  7. Boris The Brave

    Why the sudden boom in marching cubes? [Possible target]

    Well I just posted a MC tutorial on GameDev just yesterday. I had been working on that tutorial for a long time and picked Sunday due to personal timing, so I expect it's just co-incidence.
  8. Boris The Brave

    Marching Cubes and Dual Contouring Tutorial

    Cow, your evaluation function returns only positive numbers, but I've configured the code to treat anything positive as solid. Try subtracting a constant, like I've done in circle_function, so you get some positive and some negative values.
  9. Boris The Brave

    Marching Cubes "Fun"

    Your images are terrible quality, but it looks like you are not getting a manifold mesh out of your algorithm, so I expect you've got the cases wrong. Perhaps with larger, better lit images it would be clearer? While I'm not going to review your cases, I've recently posted a marching cubes tutorial, so you can look over my cases instead? I have unit tests for the case table, you could port that to see if your own table passes. Otherwise, I'd start debugging your code. Marching Cubes is very easy to test a single cube in isolation, so I'd start with one you know to be wrong.
  10. I've put together some tutorials that explain the ideas behind Marching Cubes and Dual Contouring. Maybe it'll be useful to some of the forum-goers. Marching Cubes 2d Marching Cubes 3d Dual Contouring Each tutorial comes with sample code in Python. Let me know what you think. This is the first time I've written a tutorial, but may do more if people want them.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!