All Projects → fegennari → 3dworld

fegennari / 3dworld

Licence: gpl-3.0
3D Procedural Game Engine Using OpenGL

Projects that are alternatives of or similar to 3dworld

balldrop
An experimental musical instrument, made with Godot 3.1.
Stars: ✭ 29 (-94.5%)
Mutual labels:  procedural-generation, physics-simulation
Qfusion
Source code for cross-platform OpenGL gaming engine
Stars: ✭ 255 (-51.61%)
Mutual labels:  game-engine, game-engine-3d
creative-coding-notebooks
🎨 An authorial collection of fundamental recipes on Creative Coding and Recreational Programming.
Stars: ✭ 17 (-96.77%)
Mutual labels:  computer-graphics, physics-simulation
Dynamics
A Compositional Object-Based Approach to Learning Physical Dynamics
Stars: ✭ 159 (-69.83%)
Mutual labels:  artificial-intelligence, physics-simulation
Tree Gen
Procedural generation of tree models in blender
Stars: ✭ 465 (-11.76%)
Mutual labels:  procedural-generation, computer-graphics
Gun
An open source cybersecurity protocol for syncing decentralized graph data.
Stars: ✭ 15,172 (+2778.94%)
Mutual labels:  artificial-intelligence, realtime
instant-ngp
Instant neural graphics primitives: lightning fast NeRF and more
Stars: ✭ 1,863 (+253.51%)
Mutual labels:  computer-graphics, realtime
Simulator
A ROS/ROS2 Multi-robot Simulator for Autonomous Vehicles
Stars: ✭ 1,260 (+139.09%)
Mutual labels:  artificial-intelligence, game-engine
Gp Gan
Official Chainer implementation of GP-GAN: Towards Realistic High-Resolution Image Blending (ACMMM 2019, oral)
Stars: ✭ 317 (-39.85%)
Mutual labels:  artificial-intelligence, computer-graphics
Terasology
Terasology - open source voxel world
Stars: ✭ 3,247 (+516.13%)
Mutual labels:  game-engine, game-engine-3d
Computer Vision Video Lectures
A curated list of free, high-quality, university-level courses with video lectures related to the field of Computer Vision.
Stars: ✭ 154 (-70.78%)
Mutual labels:  artificial-intelligence, computer-graphics
Etlegacy Deprecated
Archived repository. For current repo, see: https://github.com/etlegacy/etlegacy
Stars: ✭ 470 (-10.82%)
Mutual labels:  game-engine, game-engine-3d
Top 10 Computer Vision Papers 2020
A list of the top 10 computer vision papers in 2020 with video demos, articles, code and paper reference.
Stars: ✭ 132 (-74.95%)
Mutual labels:  artificial-intelligence, computer-graphics
Dm control
DeepMind's software stack for physics-based simulation and Reinforcement Learning environments, using MuJoCo.
Stars: ✭ 2,592 (+391.84%)
Mutual labels:  artificial-intelligence, physics-simulation
Infinity Square Space
Infinity Square/Space. The prototype of the game is open source. Unity Asset.
Stars: ✭ 122 (-76.85%)
Mutual labels:  artificial-intelligence, procedural-generation
CLUSEK-RT
Vulkan based C++ ray-tracing game engine.
Stars: ✭ 24 (-95.45%)
Mutual labels:  game-engine, computer-graphics
Nebula
Nebula is an open-source and free-to-use modern C++ game engine.
Stars: ✭ 224 (-57.5%)
Mutual labels:  game-engine, game-engine-3d
Pytorch Cyclegan
A clean and readable Pytorch implementation of CycleGAN
Stars: ✭ 558 (+5.88%)
Mutual labels:  artificial-intelligence, computer-graphics
Tinyengine
Tiny OpenGL Wrapper / 3D Engine in C++
Stars: ✭ 251 (-52.37%)
Mutual labels:  game-engine, game-engine-3d
Godot 2d Space Game
A 2D space exploration and mining game made with Godot and our AI framework
Stars: ✭ 462 (-12.33%)
Mutual labels:  artificial-intelligence, procedural-generation

REPO SIZE CODE SIZE License

3DWorld is a cross-platform 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. A Microsoft Visual Studio 2019 project file is included. A linux/gcc makefile is also included, but is more experimental. See README.linux for more details. 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 955MB. 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 large model files used in some scenes, 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:

I've included stripped down versions of most of these libraries in the dependencies directory. I removed all large files that aren't required by 3DWorld, in some cases even examples/tests/documentation. These have been built with MS Visual Studio 2015 Professional on Windows 10. If you want to use these, you'll need to copy the directories to the root directory and rebuild any libraries needed for other versions of Visual Studio.

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 2019 Community 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.

If you have linux, you can try to build using the provided makefile. The file README.linux should be helpful. I've gotten 3DWorld to build and mostly run on Ubuntu 18.04 with gcc 7.

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 when using the makefile with gcc.
  • Microsoft Visual Studio 2019 (or newer?). The professional or community version is needed for OpenMP support. You can also try to use gcc on linux.
  • 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

Troubleshooting: It seems like some systems require an OpenGL core context. This can be selected by adding "use_core_context 1" in the config file. This can also be enabled in scene_config/config_post.txt, which is a file that applies after reading all other top-level config files. In some situations, using a core context can be slower, which is why I don't have it enabled by default.

Useful Keys (see readme-keys.txt for more key bindings):

  • a,s,d,w: Movement
  • q,e: Change weapon (gameplay mode)
  • 'space': Jump/fire
  • 'esc': Quit
  • 'tab': Onscreen menu (navigate with arrow keys and 'X' to switch menus)
  • b: Enable objects/physics/AI (for ground mode and universe mode gameplay)
  • F1: Switch between ground/universe/tiled terrain modes
  • F2: Toggle gameplay mode
  • m: Toggle fullscreen mode
  • h: Toggle flight move
  • v: Change camera mode (crystal ball/orbit vs. first person)
  • V: Toggle mouse look
  • K: Toggle overhead map mode
  • x: Pause
  • Mouse Left: Turn/Action
  • Mouse Right: Fire

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

Procedural building interior - a library with procedurally generated books. (config_heightmap.txt)

alt text

Procedurally generated houses and office buildings with full interiors. (config_heightmap.txt)

alt text

Reflective (metal), refractive (glass), emissive, and translucent spheres in night time scene with indirect lighting. Drawn in realtime; spheres can be moved interactively. (config_white_plane.txt)

alt text

Procedural city with buildings, roads, cars, and pedestrians. (config_heightmap.txt)

alt text

Procedural city at night with bridge in the foreground. (config_heightmap.txt)

alt text

Early procedural city with pine trees.

alt text

Early procedural city.

alt text

Terrain using domain warp noise with hydraulic erosion simulation before city has been placed. (config_heightmap.txt)

alt text

Tiled terrain mode with river, trees, grass, etc. (config_t.txt)

alt text

Realtime interactive destructive fire/smoke simulation involving trees, plants, and grass. (config_trees.txt)

alt text

Procedural universe solar system with asteroid belt. (universe/config_universe.txt)

alt text

Crytek Sponza atrium scene with dynamic shadow casting light source and indirect lighting. (sponza/config_sponza2.txt)

alt text

10,000 instances of a highly detailed museum model placed in tiled terrain mode (Puget Sound heightmap) and drawn in realtime with shadows and indirect lighting. (config_museum_tt_model.txt)

alt text

Crytek Sponza atrium with reflective floors and 200 dynamic point light sources in realtime. (sponza/config_sponza2.txt)

alt text

Many reflective/refractive spheres and cubes with density-based light attenuation in the office building courtyard. (mapx/config_mapx.txt)

alt text

San Miguel scene with dynamic snowfall and path traced snow coverage map rendered with a custom shader. (config_san_miguel.txt)

alt text

San Miguel scene rendered in realtime with path traced precomputed indirect lighting, normal maps, and cube mapped reflective surfaces. (config_san_miguel.txt)

alt text

2M procedurally generated + placed pine trees (500K visible) drawn in realtime in tiled terrain mode using instanced billboards. (config_t.txt)

alt text

Interactive stacking of 10,000 dynamic boxes in mapx scene. Stacks can be moved and knocked over, and scene can be saved/reloaded/edited. (mapx/config_mapx.txt)

alt text

Procedurally generated planet with rings containing small asteroids. (universe/config_universe.txt)

alt text

Asteroid belt with 10,000 dynamic (rotating and orbiting) asteroids, 100,000 point sprite particles, and volume billboard clouds for dust. (universe/config_universe.txt)

alt text

Tiled terrain mode, showing various forms of procedurally generated vegetation, including grass, flowers, pine trees, palm trees, and deciduous trees. These are actually polygon models that cast shadows. (config_t.txt)

alt text

Realtime, dynamic light shafts through noise-based volumetric smoke in the Crytek Sponza scene. (sponza/config_sponza2.txt)

alt text

Reflective, metallic floors in the Crytek Sponza scene, with indirect sun + sky lighting. (sponza/config_sponza2.txt)

alt text

Reflective spheres, torus, and cube drawn in realtime in a dynamic scene using cube map reflection textures in the office building lobby. Materials are a mix of metals and dielectrics using physically-based models. (mapx/config_mapx.txt)

alt text

Museum scene with indirect lighting, reflective surfaces, and shadow mapping. This model is procedurally textured. (config_museum.txt)

alt text

Snowy house scene generated by dropping a billion snow particles and accumlating snow. Snow is precomputed but can be rendered in realtime. (house/config_house_winter.txt)

alt text

Rain simulation and rendering, including collision detection for each raindrop and wet/reflective surfaces. (house/config_house.txt)

alt text

Indirect lighting and shadows from overlapping spotlights applied to dynamic objects. (mapx/config_mapx.txt)

alt text

Water simulation with waves using hardware tessellation in tiled terrain mode. (config_t.txt)

alt text

Procedurally generated 3D voxel ice caves with indirect lighting. This terrain can be edited in realtime with brushes and weapon fire. (config_ice_caves.txt)

alt text

Procedurally generated planet drawn entirely in the fragment shader with no textures. This includes terrain generation (ice, snow, rock, forest, desert, dirt), water, clouds, and atmosphere. (universe/config_universe.txt)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].