• Advertisement
Sign in to follow this  

Unity To make a voxel engine?

This topic is 1673 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello!

I am wanting to program a voxel engine, but I do not know where to start. I am familiar with C# and C, and I have also learned very little Javascript. I am wanting the end result to produce something within the graphical range of this:
https://picroma.com/images/screenshots/jun2013/04.jpg
I've read that some have used the XNA framework, along with Visual Studio, however I don't know where to proceed beyond that. I want my engine to incorporate DirectX 11 features such as ambient occlusion and bokeh DOF.

Of course, by now I know you're thinking something along the lines of 'just use something like Unity to create your game', and that is where my situation is a little different. My end result is to create a game engine, and not an actual game. Of course, I want to be able to use my engine to create a game, however that is not the purpose behind my ambition. I'm not foolish enough to expect this task to be accomplished over a weekend; I'm actually ready to devote several years of my life to this project. It is very ambitious, and that is exactly why I want to pursue it. I've tried my hand at coding scripts for games using C# for Unity, and I enjoyed every minute of it.

The main problem is that I have literally no idea where to start. I'm not sure if I need to make use of my C# background, or if it would be more advantageous to learn C++ (which would not be a problem for me at all, as I love learning new languages) or something else entirely. I don't know if I need to use XNA or something else entirely. From what I'm aware of, the set of tools is preferential, but I'm as lost as a man writing code on a napkin. Most resources that I've read have talked about the "general idea", but I don't know how to even put that information to any kind of use.

I know I'm asking for something quite specific, and I know that many have ambitions that are equally as large as mine, and they never finish them. I know it's easy to look at someone on the internet and group them into piles, simply because of the general behavior that said people possess. I don't want my dream to die, but I need the communities' help to get it started.

Thank you for any and every resource, tip, and assistance that you can provide. I greatly appreciate it!!

Share this post


Link to post
Share on other sites

Probably a good start would be to look at: http://www.youtube.com/user/AlwaysGeeky?feature=watch

Its a youtube series of somebody making a voxel engine/ game .

 

Then there is : https://sites.google.com/site/letsmakeavoxelengine/home/basic-block-rendering

Its a series of articles with a bit of code.

 

It seems that you can:

 

- use C# with a graphics wrapper like SlimDX. No new language to learn so hopefully it would be faster to write code and see progress.

 

- use C++ with DirectX 11/OpenGL/Some graphics wrapper. Probably the performance could be better (if you know what you are doing) but it would initially be quite frustrating. Plus more things to learn at the same time =  more frustrating / easier to give up.

 

To start a voxel engine, just render a 3D cube. Then render more of them. Figure out how to store them and build it up from there.

 

A good idea would be to have some kind of game in mind while you build the voxel engine. This gives a couple of benefits:

- No bloated code. You would know exactly the minimum requirements of the engine and what it should do. Faster developement time.

- Gives you something to work towards. Easier to see the progress you are making = more motivation to continue.

- You will be making progress on the game simultaneously  which makes the engine applicable. Extra motivation. Hopefully speeds up development.

 

(In my opinion just start making the game. The engine will be the reusable parts of the game. Just making an engine with no real purpuse can lead to long development with messy code. When you actually try to use it to make something, you would probably have build too complex of a solution.)

 

The most important thing is to start. Just get coding. When you get to a specific problem, try to see if you can figure it out. If not working after a while, THEN look for resources how to fix it.

 

Good luck

Edited by ZeroBeat

Share this post


Link to post
Share on other sites

I cannot say thank you enough! I've decided to learn C++ and use DirectX 11 as the graphics wrapper. From what I can tell, C++ is a more versatile language than C#, even if the code isn't as slim in like-for-like code. I also picked up a DirectX 11 book by Frank Luna, which solidified my ambition for myself, since I won't quit a project if I've invested my cash in it!

Share this post


Link to post
Share on other sites

I would compress the whole 3D world into an octree in a giant texture and then write a raytracer in a pixel shader that make a line intersection with each object that the line pass by. Dynamic items can be refered to from a dynamic index octree in another texture that is dynamic and updated every render. Then it will be trivial to make sharp shadows and reflections.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
  • Advertisement
  • Advertisement
  • Similar Content

    • By Chamferbox
      Chamferbox, a mini game asset store has just opened with some nice game assets, 
      Here you can find a free greek statue asset 

      Also check their dragon, zombie dragon and scorpion monster out:



      They're running the Grand Opening Sale, it's 30% off for all items, but for gamedev member, you can use this coupon code:
      GRANDOPEN
      to get 50% off prices What are you waiting for, go to
      http://chamferbox.com
      and get those models now!

      View full story
    • By Dafu
      FES Retro Game Framework is now available on the Unity Asset Store for your kind consideration!
      FES was born when I set out to start a retro pixel game project. I was looking around for an engine to try next. I tried a number of things, from GameMaker, to Fantasy Consoles, to MonoGame and Godot and then ended up back at Unity. Unity is just unbeatable in it's cross-platform support, and ease of deployment, but it sure as heck gets in the way of proper retro pixel games!
      So I poured over the Unity pipeline and found the lowest levels I could tie into and bring up a new retro game engine inside of Unity, but with a completely different source-code-only, classic game-loop retro blitting and bleeping API. Months of polishing and tweaking later I ended up with FES.
      Some FES features:
      Pixel perfect rendering RGB and Indexed color mode, with palette swapping support Primitive shape rendering, lines, rectangles, ellipses, pixels Multi-layered tilemaps with TMX file support Offscreen rendering Text rendering, with text alignment, overflow settings, and custom pixel font support Clipping Sound and Music APIs Simplified Input handling Wide pixel support (think Atari 2600) Post processing and transition effects, such as scanlines, screen wipes, screen shake, fade, pixelate and more Deploy to all Unity supported platforms I've put in lots of hours into a very detail documentation, you can flip through it here to get an better glimpse at the features and general overview: http://www.pixeltrollgames.com/fes/docs/index.html
      FES is carefully designed and well optimized (see live stress test demo below). Internally it uses batching, it chunks tilemaps, is careful about memory allocations, and tries to be smart about any heavy operations.
      Please have a quick look at the screenshots and live demos below and let me know what you think! I'd love to hear some opinions, feedback and questions!
      I hope I've tickled your retro feels!



      More images at: https://imgur.com/a/LFMAc
      Live demo feature reel: https://simmer.io/@Dafu/fes
      Live blitting stress test: https://simmer.io/@Dafu/fes-drawstress
      Unity Asset Store: https://www.assetstore.unity3d.com/#!/content/102064

      View full story
    • By DevdogUnity

      Ho ho ho
      Tis the season of Christmas surprises, and we have a awesome one for you! 🎅  
      Sponsored by all your favorite Unity Asset Store developers, Nordic Game Jam, Pocket Gamer Connects, and co-hosted by Game Analytics, we (Joris and I – Devdog) are launching the second edition of our yearly Christmas Giveaway Calendar for all Unity game developers!
      You can already now sign up right here.
       
      So what’s this all about?
      For the past weeks, we’ve been collecting sponsored gifts related to Unity (asset vouchers, product keys, conference tickets etc.), and throughout each day of December leading up to Christmas Day on the 25th, we will be sending out these sponsored gifts as early gamedev Christmas presents via e-mail to hundreds of lucky winners.
      The total prize pool is at $35,000, with over 1200 presents donated by the awesome sponsors!
       
      Merry Christmas from Devdog, Game Analytics, and every single one of the sponsors.

      View full story
    • By sveta_itseez3D
      itSeez3D, a leading developer of mobile 3d scanning software, announced today a new SDK for its automatic 3D avatar generation technology, Avatar SDK for Unity. The Avatar SDK for Unity is a robust plug-n-play toolset which enables developers and creatives to integrate realistic user-generated 3D avatars into their Unity-based applications. SDK users can allow players to create their own avatars in the application or integrate the SDK into their own production processes for character design and animation.
      “Virtual avatars have recently become increasingly popular, especially in sports games and social VR apps. With the advance of VR and AR, the demand to get humans into the digital world is only increasing”, said Victor Erukhimov, itSeez3D CEO. “Our new Avatar SDK for Unity makes it super-easy to bring the avatar technology into any Unity-based game or VR/AR experience. With the Avatar SDK for Unity now every developer can bring face scanning technology into their games and allow players to create their own personalized in-game avatars, making the gameplay much more exciting and immersive.”
      Key features of the Avatar SDK for Unity:
      Automatic generation of a color 3D face model from a single selfie photo in 5-10 seconds (!). Works best with selfies, but can be used with any portrait photo.
      Shape and texture of the head model are unique for each person, synthesized with a deep learning algorithm crafted by computer vision experts
      Head models support runtime blendshape facial animations (45 different expressions)
      Generated 3D heads include eyes, mouth, and teeth
      Algorithms synthesize 3D meshes in mid-poly resolution, ~12k vertices, and ~24k triangles
      Six predefined hairstyles with hair-recoloring feature (many more available on request)
      Avatar generation API can be used in design-time and in run-time, which means you can allow users to create their own avatars in your game
      Cloud version is cross-platform, and offline version currently works on PCs with 64-bit Windows (support for more platforms is coming soon)
      Well-documented samples showcasing the functionality.
       
      Availability
      The Avatar SDK for Unity is offered in two modes - “Cloud” and “Offline”. The “Cloud” version is available at http://avatarsdk.com/ and the “Offline” version is available by request at support@itseez3d.com.
      ###
      About itSeez3D
      At itSeez3D, we are working on the computer vision technology that turns mobile devices into powerful 3D scanners. itSeez3D has developed the world's first mobile 3D scanning application that allows to create high-resolution photorealistic 3D models of people's' faces, bodies and objects. The application is available for iOS and Windows OS mobile devices powered with 3D cameras. In 2016 the company introduced Avatar SDK that creates a realistic 3D model of a face from a single selfie photo. To learn more about itSeez3D scanning software and 3D avatar creation technology, please visit www.itseez3d.com and www.avatarsdk.com.

      View full story
    • By khawk
      Unity has posted the Unity Austin 2017 playlist on YouTube. From their tweet:
      View the full playlist at https://www.youtube.com/playlist?list=PLX2vGYjWbI0TI_C4qouDw7MSSTFhKJ6uS or below:
      .

      View full story
  • Advertisement
  • Popular Now

  • Advertisement