Wednesday, July 24, 2013

Video Update for July 2013

Here is the latest video update. If you are keeping count you will notice I skipped the one for June. I would have done it in time, but one of my twins snapped the microphone I use for such recordings. I did not have time to get a new one until last week. For that reason this update is a bit longer.


33 comments:

  1. People in Minecraft could create Middle-Earth using using simple cubes, what is possible in your engine? Could you create tower that big, you cant see top of it?

    ReplyDelete
  2. I get this a rhetorical question. But... assuming they are willing to go that high, in this particular demo you could build a 40 KM high tower. The demo will render stuff only within a 20Km radius so yes, it is possible to build a tower you cannot see the top of it.

    ReplyDelete
  3. Wow, I read the whole blog from beginning to the end in 6 hours!

    Is this world a spherical planet?

    ReplyDelete
    Replies
    1. Hmmm... the answer appears several times in the blog :P

      That reminds me of that Woody Allen quote: "I took a speed-reading course and read War and Peace in twenty minutes. It involves Russia."

      Just messing with you, the world in this demo is flat.

      Delete
  4. Heh, when you removed the textures, it still looked quite good, like a cartoony kind of game =D. The only things that didnt quite fit were the buildings, but I understand that nobody is actually supposed to see the texture-less game/program XD.

    I cant wait to see what people can do with these new tools...

    Also, how does the copy tool work? I couldnt see whether you were highlighting anything, selecting anything etc. which I was waiting for, then suddenly BWAM he pastes a column out of no-where XD.

    ReplyDelete
    Replies
    1. The way i understood it is that you press a key to start "recording" what you add to the world then once you finish, you can save/load the thing to a file that you can either share with other people or use like the sphere or slate brush to create copies.

      Delete
    2. If that is the case, it would be interesting, but not optimal in my opinion, as you could have made something, and then go: Hmm.. Thats nice, lets copy it and fill my halls with it!.... Except you cant =P.
      It does mean that you dont have to screw around with selection though.

      Delete
    3. In this demo I pressed Ctrl+C and it copied a volume of approximately 60x60x60 voxels into the clipboard. Since I was pointing at the column when I pressed Ctrl+C, it was mostly the column what got copied.

      My idea for an UI is to use some kind of brush. With it you can paint the voxels under the cursor. Once you have painted what you want, you can yank it into the clipboard.

      It think it is a nice UI because you would have time to select exactly which voxels you want. The trick is you can only paint over the surface voxels plus whatever brush size you have. The tool will have to figure out how to include the inner voxels as well.

      As simpler way to do it would be instead of a brush, to allow the user to create a volumetric selection out of multiple boxes. In this demo's case I could draw one single box that includes the whole column. What I don't like about this is the UI mechanics for the box input are not so simple for users. I prefer the brush in this sense.

      Delete
    4. Well, for the brush type, perhaps you could have two modes? Literal selection, where you only select the voxels you select, and solid selection(?), where the you select voxels, and the program also includes the volume inbetween them, this could end up weird with convex(?) shapes though.

      Delete
    5. Hey Miguel,

      My thought for that was to let the players go into a separate GUI to build buildings. Almost like a planning stage. Once the building is complete to their liking, is saves in their inventory and they could 'paste' it, share it or whatever they like. Could work for your system as well, although it fits into our game-play nicely.

      Delete
  5. Ridiculously amazing as usual, Miguel. Can't wait for your next update. My only request would perhaps be this: every once and a while could you possibly throw us some crumbs? Just record a few minutes of you doing some flyovers of some varied terrain and/or yourself doing different things in the different terrain types? No voiceover, just raw vid. I would have loved to see some trees for example, or some more examples of sunrise/sunset.

    Oh which brings to mind a question. How does your engine handle higher speed terrain transitions? Flyovers for example. Say in a game using your engine you drank a "potion of flying" or something and flew over the terrain, or similar to Minecraft's creative mode where you can free-fly everywhere. Any chance of a vid showing flyovers at higher than run speed over varied terrain? I'd like to see if popping becomes a problem.

    Awesome stuff.

    Take care.

    ReplyDelete
  6. I like the raw look of the cut into surfaces, it looks quite natural for hard surfaces like brick and rock. That said, not all surfaces will benefit from this rough look. Can you show how that cut cave looks after using the smoothing/blending tool on it?

    ReplyDelete
  7. Regarding the transitions, how do handle the situation where you have 4 fine cubes facing 1 coarse cube, and for whatever reason, the coarse cube does not contain a vertex? Like if you have a thin wall/point and the coarser cube ends up not having any intersections due to filtering of the density?

    ReplyDelete
    Replies
    1. I'm sorry, the coarse cube does NOT contain a vertex, but the finer ones do. Thus you will have triangles in the finer but not in the coarse.

      Delete
    2. I believe every time the voxels change, his engine re-calculates where the vertices should be, creating new vertices if necessary, cause when you change the terrain, you are not directly molding the vertices, but you are removing voxels, and changing their state, then the system molds the vertices.
      I hope this answer helps until Miguel gives a proper answer =P.

      Delete
    3. This is precisely the sort of freak case that makes creating seams difficult. To make it worse, what you describe is just one possible scenario out of many. At this point I need to realize there is nothing really on the other end, and cap the hole in the high resolution mesh.

      Delete
    4. What are some of the other bad scenarios you have run into? I'm currently trying to make seams and thought this one was a tricky case.

      Delete
  8. Two somewhat related questions.

    1a) Do materials exist "underneath" the polygon surface?

    I assume that materials are indeed stored in the depths of the voxel version of the world, such that if one were to spawn a stone sphere halfway buried in the sand, I understand that the visible mesh will blend the sphere to the sand. If one were then to dig away the sand from around the sphere, would the previously buried portions of the stone sphere become visible, or would one find that the sphere had been chopped at the surface level of the ground? If it doesn't, is there an option for that?

    1b) Does that apply to building grammars (l-systems)?

    In the video, for example, where the foundations of the tower cut into the ground, if one was digging from within the foundation of the tower, as one went lower, would one find foundation stone as defined in the building grammar, or would one find sand at the normal terrain level?

    2) Are there air voxels in the building grammars?

    Say one has a building grammar for a castle that includes a tunnel system, which is meant to be subterranean. The air spaces in the castle portions built above ground would be properly air, doors and windows would look out onto the terrain. But would air portions within the subterranean tunnels properly dig out the ground voxels or would they just shoot stone tunnels down into them, but be filled with dirt?

    ReplyDelete
    Replies
    1. It seems, judging by this video, that air, or empty space, is definitely stored somewhere, because the copy-paste thingy Miguel did created small depressions in the flat slate he had made, even though he was adding stuff.
      Furthermore, tunnels/caverns are already a fine example of underground structures, I would reckon that underground tunnels for castles or sewers would be pretty much the same....

      Speaking of architecture grammar... I would love to see some more of that.
      But please, do finish what you are working on Miguel! XD.

      Delete
    2. Very good questions.

      1) Materials exist under the surface. They are not necessarily stored if their generation is procedural. That also applies to building grammars.

      2) Yes by using air material you can effectively carve out spaces with your grammar.

      Delete
    3. Thanks so much! This project just becomes more and more intriguing.

      Delete
  9. will the grammar be able to detect the floor/wall and snap to it?

    ReplyDelete
    Replies
    1. They do already. You can search the blog for "snap".

      Delete
  10. Love these videos. Quick question: Any plans to allow objects to be brought in and then have us control the transformation, rotation and scale of those objects before placing them? I'm assuming that's a feature of polygonal-based systems, and forgive my ignorance, but could there be a way to make a proxy model for an ability like this?

    Thanks in advance!

    ReplyDelete
    Replies
    1. In the first video showing the custom brushes, Miguel places cubes into a semi-circle, making a curved wall, I would expect this means that it is definitely possible =P.
      Here is a link to the blog post:
      http://procworld.blogspot.co.nz/2013/05/video-update-for-may-2013.html

      Delete
    2. Yes, if it is absolutely necessary.

      Delete
  11. Amazing once again. Love the LOD method, but I must ask, why is it "squared" and not in circular rings? Was this just far easier since it's a Square Voxel Grid world? I would just think that if a player looks closely at a "LOD Square's Corner" compared to the midpoint of an edge, they might notice something (hard to tell in your video, but who knows in other landscapes).

    And since you like when comments point out the imperfections: I see that when you're making Floor Tiles touching each other, the Texture Pattern is repeating and it's very noticeable. I know you did a post on advanced Wang Tiles, but are they being used here and are ineffective? Or is there a different reason for the repetitive stone texture only when building. Oh, and nice work aligning the bricks up in that tower when you remove voxels, but in a real tower if you were to take a brick out, there wouldn't be another brick behind it in the same horizontal/vertical position :P Unless of course those bricks in the video were super long depth-wise hehe.

    Anyways, I'd like to ask something voxel-technical. I'm taking up voxel programming as a hobby because it's interesting and great brain exercise (plus motivates me to learn programming as a Mech Engineer). So far I only have some 100mx100m random block-like mesh terrain in C# and Unity. It just starts with 1 cube of vertices and builds off it until I finally render the surface mesh (includes rendering the never to be seen bottom though :'( ). One thing I can't find information on for voxels is if a world (or yours in this case) has basically an invisible 3D grid. That is, all your Voxels that are "air" do exist and are just set as air so nothing ends up in them. But they are still stored somewhere as that. So, is that the proper approach, or are the only voxels stored the ones within the vicinity of rendered meshes? If that is the approach, then that's a whole lot of data/storage for a 20kmx20km20km area filled or not filled...

    I would love to see what your world looks like before Dual Contouring in it's crazy Octree Cube form haha. It would give a good visual wrap around the whole concept. I was looking into Sparse Octrees and wouldn't know where to start or even what voxel-size the first level would be... Or how many divisions to go down to.

    Super interesting and I'm excited to attempt it all. Any pointers are appreciated. Have a great weekend :)

    ReplyDelete
    Replies
    1. Opps... It seems I wrote an essay. Sorry, I was too excited :(

      Delete
    2. I believe circular rings would also prove problematic with the vertices, since those are usually also made in a sort of grid-like pattern of squares. I would not be surprised if making circular LOD would make seaming an absolute nightmare =P. Besides, I don't think it matters much in this engine.

      As for voxels, I believe that the air is actually stored, but because it is mostly a solid body of air, it will make generally make use of the biggest partition of an Octree.

      As for deciding upon what size to make the largest level, I believe first of all, it has to be a powers of 8 (I am counting in amount of smallest blocks which fit into the octree level), after that, you will probably use common sense to allow for the biggest possible which is practical, you, for example, if your game only allows for a height of, say, 640 blocks, then it would be senseless to make your largest level twice that tall, because it will never be made.

      Note though, I have never worked with voxels, and am only basing this based upon what I have read, learned in my course, and what my logic tells me.

      Delete
    3. Square rings are much simpler, also it aligns with the world Octree.

      I do not worry much about repeating patterns at this point. I have bigger fishes to fry.

      About storage, you should only store information. Not all data is information. For instance if you use a procedural algorithm to initialize your data, this data has no information in it. The real information is the parameters to the procedural generator. If you generate terrain, trees and buildings these contain no information hence no need to save them. Information are the bits of data you cannot predict, like what users will create. This is the part I store. Since the users work on top of the generated data, I save only the bits they flip.

      Delete
    4. Haha, thanks for the feedback you two! I guess I'm thinking of the world (or the area around the player) as a ton of empty space that is still stored in an array. So I start thinking of a massive set of arrays that are just full of 0's because there's a tower going KM's up in the air that has split the Octree up. That in turn confuses me as to why I have so much "useless information". But I guess I need to rethink that.

      I have lots to learn! So keep on inspiring me, and thank you for your responses to my curious questions :)

      Delete
    5. Learning is one of the best things humans can do, I wish you the best of luck, and have fun!

      Delete
  12. Miguel - can you explain how are you applying CSG operations on voxel data? You mentioned on video that you can substruct the one volume from another. I suppose you apply operations under Hermite Data or are you using some other tech?

    ReplyDelete