Giter Site home page Giter Site logo

fegennari / 3dworld Goto Github PK

View Code? Open in Web Editor NEW
1.1K 40.0 84.0 683.7 MB

3D Procedural Game Engine Using OpenGL

License: GNU General Public License v3.0

C++ 96.43% C 0.28% Makefile 0.03% GLSL 3.23% Batchfile 0.01% JavaScript 0.03%
procedural-generation computer-graphics game-engine-3d game-engine procedural-terrain physics-simulation artificial-intelligence realtime terrain-generator universe-generator

3dworld's Issues

Compilation, Makefile and README.linux

Edit: I rephrase because I was in urge and I had not time to read myself the 1st time.

Compilation problem

SHA1 2f36272 The compilation is broken with gli. I tried the currently present folder then the git cloned version but got the same problem:

In file included from dependencies/gli/gli/format.hpp:6:0,
                 from dependencies/gli/gli/gli.hpp:39,
                 from src/image_io.cpp:25:
dependencies/gli/gli/type.hpp:42:24: error: ‘qualifier’ has not been declared
  template <typename T, qualifier P>

I have a Debian 9.8, amd 64, and g++-6.0. I dunno yet how to fix this.
Note that glib compiles well by itself.

Some confusing points inside the README.linux:
  • Please tell in the README.linux to download glui and gli at the root of the project (next to src/). This is not obvious. Then, I find this sad not to download these libs directly inside the dependencies/ folder. In the case of clone inside this folder, we have to update the Makefile:
GLUI=../dependencies/glui
GLI=../dependencies/gli
  • these instructions:
Build setup:
mkdir lib
mkdir obj
cd obj
ln -s ../makefile .

are not clear because we do not know if they refer to gli or 3DWorld. You should seperate them with sections. You also can remove these instructions because I explain just after how to simply you Makefile.

Some confusing points inside the Makefile
  • Why the binary 3dworld is created inside the lib/ folder? It should be created in any folder (obj/, the root project ...) execpt this one!
  • CPP is working but it's badly located inside the Makefile. Better to place it before at the first line.
  • your all: rule is not good for managing obj and lib directories. You should simply try the following code (explainations come just after):
BUILD=obj/
VPATH=$(BUILD):src

all: $(TARGET)

%.o : %.C $(BUILD)/%.d
	$(CPP) $(CPPFLAGS) -MMD -c $< -o $(abspath $(BUILD)/$@)
%.o : %.cc $(BUILD)/%.d
	$(CPP) $(CPPFLAGS) -MMD -c $< -o $(abspath $(BUILD)/$@)
%.o : %.cpp $(BUILD)/%.d
	$(CPP) $(CPPFLAGS) -MMD -c $< -o $(abspath $(BUILD)/$@)

$(OBJS): | $(BUILD)
$(BUILD):
	@mkdir -p $(BUILD)

Explainations:
Firstly, feel free to rename BUILD variable, it indicates the folder holding your *.o files. You have to refer this folder to VPATH. The all: rule now simply depends on your binary file. For compiling your c(pp) files you have to add the -ooption else *.o are created next to your Makefile instead of inside $(BUILD) folder. Note that you also have to depend of %.d files, so added them in the dependency rule. I added abspath but this is optional but this helps coverage tool like gcov to find the source. Finaly $(OBJS): | $(BUILD)replace your if then else. $(BUILD) rule is called before building $(OBJS). Also note that you no longer need of ../../ for TARGA, GLUI ...

  • Unfortunaltly there are still problems with *.d files: they are created at the root of the directory and makefile will recompiling all c(pp) files everytime. So replace your code based on touch/cat commands by this code which does the same thing:
$(BUILD)/%.d: ;
.PRECIOUS: $(BUILD)/%.d
-include $(patsubst %,$(BUILD)/%.d,$(basename $(OBJS)))

With all these changes you simply can go to the root of the project and type make! No more ln or mv :)

  • Make clean can now simply remove the folder $(BUILD).
  • I attached my Makefile to this issue. makefile.txt Note: because of github I had to add the .txt extension else it refuses to attach it.

As said previously I could not finish compiling because of gli so I cannot check if my Makefile is fully correct. For more information you can see my Makefile repo.

chmod
  • There are plenty of ASCII files in executable mode. You should fix their rights with a chmod 644 git manages the chmod rights.

not an issue :)

Hello! Juris from Latvia here, haven't been checking on your project for a while (in fact, making some UE4 assets now myself). How are you, what are advances in 3D World? My best wishes to you, be healthy!
And - Happy Easter !

Just informing

Oh, probably need to state visible somewhere at release - "Press F1 after starting particular config"
City is working, with cars and yellow balls pedestrians :)
I could list ones that does not start:
Config Universe, River, Berkeley, Puget, Puget Sound, Grand Canyon, Grand Canyon Sound, Hetch, Config Soda, San Miquel, White Plane.
He
3DWorld_2019-06-23.zip
re I will attach some screens, please take a look, maybe something visual missing or wrong.

A bigger demo?

I saw the mod Grand Theft Auto: Stars & Stripes. It could be taken down for copyright infringement any time. I am thinking about building something in real world and inexperienced in 3D stuff. In my opinion, if there is a 1:1 Hawaii built with your program, it could be noticed. How do you think?

Better Graphics???

It's not bad but don't you think that it could render even more realistic graphics?

Support AVIF

In some sources, it is more advanced than WebP. So I think AVIF format can be supported.

Compiling errors when using the command

HI dear author,
It's truly a honor to write a letter to you, I'm build your project nowadays and found the error when building as following, I wonder if there is a chance that you know the reason? :)

image

thank you
best regards to you
William

Can you help me with this issue?

I downloaded the project and exe from release. When I run exe I got this error:

C:\Users\janis>C:\Users\janis\Downloads\3DWorld-master\3DWorld-master\3DWorld.exe
Starting 3DWorld
*** Error: Could not open input configuration file file 'scene_config/config_pre.txt'.
*** Error: Could not open input configuration file file 'scene_config/config_post.txt'.
Loading.....alut error: There was an error opening the ALC device
alutInit failed

Error when building on Linux

I am not using Ubuntu or any Debian offspring. I use Arch Linux, so I skipped that “Install (Ubuntu):” part. Libraries with those names do not exist in Arch Linux repositories.

$ cd 3DWorld
make -j4 -k
Compiling src/3DWorld.cpp
Compiling src/ai.cpp
Compiling src/animals.cpp
Compiling src/asteroid.cpp
Compiling src/build_world.cpp
Compiling src/city_gen.cpp
Compiling src/clouds.cpp
Compiling src/cobj_bsp_tree.cpp
Compiling src/coll_cell_search.cpp
Compiling src/collision_detect.cpp
Compiling src/csg.cpp
Compiling src/destroy_cobj.cpp
/home/user/3DWorld/src/csg.cpp: In member function 'bool cube_t::cube_intersection(const cube_t&, cube_t&) const':
/home/user/3DWorld/src/csg.cpp:207:30: warning: comparison between two arrays [-Warray-compare]
  207 |                 if (res.d[0] >= res.d[1]) return 0; // no intersection
      |                     ~~~~~~~~~^~~~~~~~~~~
/home/user/3DWorld/src/csg.cpp:207:30: note: use unary '+' which decays operands to pointers or '&'component_ref' not supported by dump_decl<declaration error>['integer_cst' not supported by dump_decl<declaration error>][0] >= &'component_ref' not supported by dump_decl<declaration error>['integer_cst' not supported by dump_decl<declaration error>][0]' to compare the addresses
Compiling src/display_world.cpp
Compiling src/draw_groups.cpp
Compiling src/draw_mech.cpp
Compiling src/draw_mesh.cpp
Compiling src/draw_primitives.cpp
Compiling src/draw_shapes.cpp
Compiling src/draw_ship.cpp
Compiling src/draw_text.cpp
Compiling src/draw_utils.cpp
Compiling src/draw_world.cpp
Compiling src/dynamic_particle.cpp
Compiling src/edit_ui.cpp
Compiling src/erosion.cpp
Compiling src/explosion.cpp
Compiling src/free_obj.cpp
Compiling src/Gameplay.cpp
Compiling src/gen_buildings.cpp
Compiling src/gen_object.cpp
Compiling src/gl_ext_arb.cpp
Compiling src/glflare.cpp
Compiling src/grass.cpp
Compiling src/heightmap.cpp
Compiling src/image_io.cpp
Compiling src/intersect.cpp
Compiling src/lightmap.cpp
Compiling src/lightning.cpp
Compiling src/light_source.cpp
Compiling src/Loadlum.cpp
Compiling src/map_view.cpp
Compiling src/Math3d.cpp
Compiling src/matrix_ops.cpp
Compiling src/mesh_gen.cpp
Compiling src/mesh_intersect.cpp
Compiling src/model3d.cpp
Compiling src/modmap.cpp
Compiling src/movable_cobj.cpp
Compiling src/object_file_reader.cpp
Compiling src/objects.cpp
Compiling src/openal_wrap.cpp
/home/user/3DWorld/src/openal_wrap.cpp:26:10: fatal error: AL/alut.h: No such file or directory
   26 | #include <AL/alut.h>
      |          ^~~~~~~~~~~
compilation terminated.
make: *** [makefile:40: openal_wrap.o] Error 1
Compiling src/Physics.cpp
Compiling src/platform.cpp
Compiling src/postproc_effects.cpp
Compiling src/precipitation.cpp
Compiling src/profiler.cpp
Compiling src/quartic.cpp
Compiling src/ray_trace.cpp
Compiling src/read_3ds.cpp
Compiling src/reflections.cpp
Compiling src/scenery.cpp
Compiling src/screenshot.cpp
Compiling src/shaders.cpp
Compiling src/shadow_map.cpp
Compiling src/shadows.cpp
Compiling src/shape_line3d.cpp
Compiling src/ship_base.cpp
Compiling src/ship_config.cpp
Compiling src/ship.cpp
Compiling src/ship_intersect.cpp
Compiling src/ship_query.cpp
Compiling src/smoke.cpp
Compiling src/sm_tree.cpp
Compiling src/snow.cpp
Compiling src/sphere_materials.cpp
Compiling src/spillover.cpp
Compiling src/spray_paint.cpp
Compiling src/teleporter.cpp
Compiling src/tessellate.cpp
Compiling src/Textures.cpp
Compiling src/texture_utils.cpp
Compiling src/tiled_mesh.cpp
Compiling src/transform_obj.cpp
Compiling src/Tree.cpp
Compiling src/triListOpt.cpp
Compiling src/u_event.cpp
Compiling src/Universe_control.cpp
Compiling src/Universe.cpp
Compiling src/Universe_name.cpp
Compiling src/upsurface.cpp
Compiling src/u_ship.cpp
Compiling src/vertex_opt.cpp
Compiling src/visibility.cpp
Compiling src/voxels.cpp
Compiling src/Water.cpp
Compiling src/waypoints.cpp
Compiling src/weapon_draw.cpp
Compiling src/targa.cpp
Compiling src/assimp_wrap.cpp
Compiling src/roads.cpp
Compiling src/cars.cpp
/home/user/3DWorld/src/assimp_wrap.cpp: In member function 'void file_reader_assimp::process_mesh(const aiMesh*, const aiScene*, model_anim_t&)':
/home/user/3DWorld/src/assimp_wrap.cpp:418:50: warning: the address of 'aiMesh::mTextureCoords' will never be NULL [-Waddress]
  418 |                         if (mesh->mTextureCoords != nullptr && mesh->mTextureCoords[0] != nullptr) { // TCs are optional and default to (0,0); we only use the first of 8
      |                             ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from /usr/include/assimp/scene.h:55,
                 from /home/user/3DWorld/src/assimp_wrap.cpp:176:
/usr/include/assimp/mesh.h:687:26: note: 'aiMesh::mTextureCoords' declared here
  687 |     C_STRUCT aiVector3D *mTextureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS];
      |                          ^~~~~~~~~~~~~~
Compiling src/pedestrians.cpp
Compiling src/texture_tile_blend.cpp
Compiling src/building_geom.cpp
Compiling src/building_lighting.cpp
Compiling src/building_floorplan.cpp
Compiling src/building_navigation.cpp
Compiling src/building_rooms.cpp
Compiling src/building_room_geom.cpp
Compiling src/building_room_obj_expand.cpp
Compiling src/building_room_item_draw.cpp
Compiling src/building_basement.cpp
Compiling src/building_attic.cpp
Compiling src/building_reflections.cpp
Compiling src/building_pictures.cpp
Compiling src/building_interact.cpp
Compiling src/building_gameplay.cpp
Compiling src/building_query.cpp
Compiling src/building_animals.cpp
Compiling src/building_animal_draw.cpp
Compiling src/building_names_signs.cpp
Compiling src/simplifier.cpp
Compiling src/city_model.cpp
Compiling src/city_building_params.cpp
Compiling src/city_objects.cpp
Compiling src/city_obj_placer.cpp
Compiling src/city_terrain.cpp
Compiling src/city_interact.cpp
make: Target 'all' not remade because of errors.

Character animation without rigging

I found Idea for character animation without rigging or bones. This idea created by pixar studios called character articulation through profile curves or Curvenent system.
They have been released the paper about this idea, So please if you able to do this as standalone free software for Windows OS, It will be great

Look at the video and download the paper too

https://youtu.be/gUJ4RxMdVn8

Download the paper here :-

https://graphics.pixar.com/library/ProfileMover/paper.pdf

Please answer me for important.

Thank you

Windows test run

I have very egoistic lazy proposition :) How about upload time to time some Windows compiled executable? ;-) I know, options are now in manual editing .ini, so it is not that straightforward maybe.... but what Author says about such idea? :) Thanks.

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.