QuesterDesura

Members
  • Content count

    12
  • Joined

  • Last visited

Community Reputation

1 Neutral

About QuesterDesura

  • Rank
    Member

Personal Information

  • Interests
    Programming
  1. An easy explanation to Dual Contouring?

    I have cleaned some stuff up in the code and tried a different scenario. As far as I can see it connected all the triangles correctly wich is great :). Sadly I still didn't figure out how to fix my problem with the normals facing sometimes in the wrong direction. I have updated the GitHub project and put the new .unitypackage here as well. DualContouring.unitypackage
  2. An easy explanation to Dual Contouring?

    Other people might come to this post and hoping to get some help understanding Dual Contouring and while they try to get some compact help and some visuals they need to read through 3 posts of one guy who argues about whether a computer game has used Dual Contouring or not. This thread is about finding a easy explanation/implementation to Dual Contouring and I have already told you that I don't want to discuss here what algorithm they used there. Because I don't care about it. I just want to get a working Dual Contouring algorithm and maybe help some other people too. -------------------------------------------------------------- I have been continuing working on the Unity Project and made some progress. Sadly it seems like my way of making a mesh out of the crossing corners seems to be rather bad. What I now came up is somehow working but sadly the normals are inverted in some cases. I have added as many comments as I could so it's easy to follow what I'm trying to do. I have used most of the stuff from the github project of emilk but I'm not quite sure how they triangles are being created there. Maybe you have an idea how I could do it. I have added .unitypackage here and the two C# files can be found here: https://github.com/PowerOfCreation/Dual-Contouring. Normals are inverted: My current approach is to find the closest 2 corners with a sign change to a corner with a sign change. Then I create a triangle between this 3 corners and mark them as processed. The processed ones won't try to create another triangle but in case a other corner needs corners to form a triangle then they can be reused. DualContouring.unitypackage
  3. An easy explanation to Dual Contouring?

    At 1:10 you can see that the cube is not being smoothed, if that would be Surface Nets then the cube wouldn't remain sharp also as I have already said: they clearly say on their website they are using Dual Contouring. But that's really not what I want to discuss here.
  4. An easy explanation to Dual Contouring?

    They are using Dual Contouring which you can also see when you watch the full video, its also stated on their website.
  5. An easy explanation to Dual Contouring?

    I have gotten some stuff working now. I used the Unity Editor to make it easier to see what I'm doing. I have "translated" the Code from the Github project in C# and changed/removed stuff that I don't understand. This is my first test: The small cubes presents voxels which are inside the mesh. Next steps will be to also let the algorithm run through the other sides and make a solid shape. This is how it looks with a distance of -0.5 to all edges: I think/I hope I have now understood how this algorithm works. I will post again if I encounter new problems or hopefully I can get some more results and share them.
  6. An easy explanation to Dual Contouring?

    I'm looking for something like this. They are using Dual Contouring. I think I now have gotten an Idea how Dual Contouring could be working and I will try to make a simple implementation and see if it works.
  7. An easy explanation to Dual Contouring?

    Wow, thank you so much you just cleared up so much stuff I found to be confusing. I don't quite understand how those normals should be working. If for example in my game a Cube gets placed by the player then I will create volume data containing the coordinates of the 8 edges, right? But what normal direction does I give the 8 coordinates and how exactly do I use it? Also how should I locate a point on the surface? I thought Dual Contouring is creating this surface out of a set of data, so how can I determine a location on a shape then? I made a image on how I thought it is working: 1. User wants to create a cube 2. create 8 voxels 3. Add/Calculate Normals(free hand ^^) 4.Dual Contouring Is this how it works or did I miss something? And how does Dual Contouring actually use those normals?
  8. An easy explanation to Dual Contouring?

    Just did so, I hope he is willing to help me ^^
  9. An easy explanation to Dual Contouring?

    I have looked through the code, but I have some issues with the variable names and functions used. As far what I have seen the Field consists of a array of planes, what is kinda confusing as I thought Dual Contouring is only using like a 3D array of zeros and ones. Also I'm not quite sure if a voxel is in the middle of a cube or on the corner because it seems like it is iterating with the foreach3D(function?) through each voxel and determines if the surrounding voxels are all outside or inside(below zero and greater zero as it seems). If thats not the case then it makes vertexes to CrossingCorners as it seems. Is that correct for the first part? I find this confusing because voxels in Minecraft terms are simply displaying 1 Cube and can either be 0 or a ID of a block, but here it seems to be that 8 voxels/coordinates represent 1 Cube or whatever might come out of the algorithm.
  10. Hello, I'm a trainee for software development and in my free time I try to do various things. I decided I wanted to figure out how "Dual Contouring" works, but I haven't been successful yet. I could find some implementations in code which are very hard to follow along and same sheets of paper "explaining" it written in a way that I have a hard time even understanding what the input and output is. All I know that it is used to make a surface/mesh out of voxels. Is there any explanation someone can understand without having studied math/computer science? The problem is also that most of the words I can't even translate to German(like Hermite Data) nor I can find a explanation which I can understand. I know how Marching Cubes work but I just can't find anything to Dual Contouring also I don't quite get the sense of octrees. As far I'm aware of this is a set of data organized like a tree where each element points to 8 more elements. I don't get how that could be helpful in a infinite 3D world and why I shouldn't just use a List of coordinates with zeros and ones for dirt/air or something like that. Thanks A clueless trainee ^^
  11. So if you don't want to make all Systems derive from a base class how should they be called then? Writing them all out manually or loop through them when having them all in a vector doesn't seem to be much difference for me. When I make 2 Classes Block and Entity would you put them in 2 vectors where are Blocks/Entitys are stored? I was thinking bout making vectors for the 4 Areas in a Cartesian coordinate system and then I can access blocks with their position as a index and when I want to check for Raycasts then I can just take the player position and directly access all blocks in a radius of x and check if they are hit.
  12. Hello, I'm currently trying to make a Minecraft Clone using OpenGL and using the ECS pattern. I didn't quite understood yet why I need the "Systems" when I already have components. My current structure I'm planing to use is this: My main problem is that I don't really know how to store the Entitys. If I for example want to attack and check which Entity I did hit then I would need to iterate through all Entity stored in my vector<GameObject> in the World Class and check if it got the Health Component and then decrease the health. Which doesn't seem very clever to me as I will probably have multiple thousands Entitys alone by the Blocks in the chunks. I did read some stuff about Handlers but didn't understood how they work or should solve the problem of iterating through all Entitys who could possible need to be called to Receive Damage. Can anyone help me? Thanks