Giter Club home page Giter Club logo

3dworld's Introduction

3DWorld is an OpenGL-based 3D Game engine that I've been working on since I took the CS184 computer graphics course at UC Berkeley in 2001. It has the following features:

  • 3D graphics functions, classes, and wrappers around OpenGL
  • Shader generator/processor with hot reload
  • Procedural content generation for terrain, vegetation, buildings, etc.
  • Procedural universe generator with galaxies, stars, planets, moons, etc.
  • Procedural voxel 3D terrain generation with realtime user editing
  • Terrain generator including various noise functions, erosion, realtime user editing, heightmap read/write
  • Physics simulation for primitive object types and others (> 10K dynamic objects)
  • Realtime day/night cycle with weather (rain, snow, hail, wind, lightning)
  • Physically based materials with reflection and refraction
  • Dynamic shadows, ambient occlusion, up to 1024 dynamic light sources, postprocessing effects
  • Built-in first person shooter game "smiley killer"
  • Build-in spaceship + planet colonization game
  • Computer AI for players in the FPS game and ships in the universe game
  • Importer for Lightwave object file and 3DS formats
  • Reading support for textures: JPEG, PNG, BMP, TIFF, TGA, RAW, DDS
  • Optimized for fast load and realtime rendering of large models (> 1GB of vertex/texture data)

I converted the project from svn to git at commit 6607. Most of the code is written in C++, with GLSL for shaders. This is intended to be a cross-platform project. Microsoft Visual Studio 2015 project files are included. The project should build under gcc on linux with some work, but it's been a while since I tried this. I have an old makefile that is out of date, but may not take too much work to fixup and make it usable.

Be warned, this is a large repository, currently 770MB. I've included source code, config files, textures, sounds, small models, lighting files, scene data, heightmaps, and project files. This repo does not contain the dependencies or large model files, you'll have to download these separately. This means that some of the scene config files won't work because they can't find their referenced data. The current list of dependencies is:

Note that many of these dependencies are old and could be replaced with newer libraries. I've been concentrating on adding content and I'm not too interested in this. Freeglut should probably be replaced with SDL, the last 4 image libraries with DevIL, and maybe assimp can be used for model loading.

If you want to build 3DWorld, you'll need to download and build these dependencies somewhere and change the project settings to use them. I just copy these into the current directory and have these files ignored by git/svn. I currently use a 32-bit MS Visual Studio build target for 3DWorld. It should compile in 64-bit mode, but I couldn't find compatible 64-bit debug libraries for OpenAL, and a few of the other dependencies didn't build cleanly in 64-bit mode.

3DWorld takes a config filename on the command line. If not found, it reads defaults.txt and uses any config file(s) listed there. Some of these congig files include models such as the Sponza Atrium, Stanford Dragon, sportscar, etc. These files are too large to store in the git repo. I've attempted to have 3DWorld generate nonfatal errors if the models can't be found. Many of the larger models can be found at the McGuire Computer Graphics Archive: http://casual-effects.com/data/

System requirements:

  • Windows 7/8/10 (Runs on Windows 7, but I've only built on 8 and 10). Linux if you create a makefile for gcc.
  • Microsoft Visual Studio 2015 (or newer?). The professional version is needed for OpenMP support. You can also try to use gcc.
  • A relatively new generation of Nvidia or ATI GPU (Runs on my laptop with Intel graphics, but at 12-20 FPS)
  • At least 4GB system memory for the larger scenes
  • At least 2GB GPU memory for the larger scenes

I currently have this repo up for educational purposes under the GPL license. It's not meant as a commercial tool and I'm not trying to make money here. I'm also not looking for others to work on the project at this early stage, though I'm accepting feedback and suggestions. Maybe things will change if I decide to make a real game out of this. If you would like to use something here for your project, please let me know.

There is no further documentation for 3DWorld. However, I do have a blog that includes descriptions of the algorithms and lots of screenshots: https://3dworldgen.blogspot.com/

Here are some screenshots linked from my blog:

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

3dworld's People

Contributors

fegennari avatar

Watchers

 avatar

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.