Code Monkey home page Code Monkey logo

cfmmoc's Introduction

cfMMOC LOGO library for terrain rendering using OGRE

Licensed under The GNU General Public License v3.0 (GPLv3)

Any modification, re-utilization or copy of the source or binary format in other software or publications should mention a CITATION of this library.

Copyright (c) 2016-2018 by Authors (Jin Yan, Guanghong Gong, Ni Li and Luhao Xiao)

Overview

cfMMOC represents a consolidated framework of multi-resolution management and occlusion culling.

cfMMOC library is a planet-scale out-of-core terrain rendering framework on top of OGRE v1.9.

Build Status
Fedora 27 64-bit Building Pass
Ubuntu 17.10 64-bit Building Pass

Features

  • Two-processes based framework
  • Out-of-core rendering
  • Terrain with level-of-details
  • Occlusion culling for invisibles
  • Crack-avoidance
  • Data fetching over networks

Screenshot and Video

screenshot

A demo video could be found at https://github.com/cfmmoc/cfmmoc-mics/blob/master/cfMMOC-short.mp4?raw=true.

A longer version of video is here: https://www.youtube.com/watch?v=8BmP0gtMc1M.

Run-time Prerequisites

Install the following dependences (given versions are not mandatory) for cfMMOC:

  • ois-1.3.0-14.fc27.x86_64
  • freeimage-3.17.0-12.fc27.x86_64
  • zziplib-0.13.62-10.fc27.x86_64
  • libcurl-7.55.1-8.fc27.x86_64 for fetching data from server
  • libatomic-7.2.1-2.fc27.x86_64
  • libXaw-1.0.13-7.fc27.x86_64
  • mesa-libGLU-9.0.0-13.fc27.x86_64
  • poco-foundation-1.7.8p3-2.fc27.x86_64 for supporting multi-threading

In addtion, OGRE and libRQTS are also dependencies for cfMMOC, headers and binary of OGRE v1.9 is included in this repository. For compiling binary of OGRE, please refers to https://github.com/OGRECave/ogre. ORGE should be compiled with multithreading support by configuring OGRE_THREAD_SUPPORT = 2 and OGRE_THREAD_PROVIDER = 2 (i.e., using POCO libraries as thread provider). Source and compilation guide of libRQTS could be found at https://github.com/cfmmoc/libRQTS.

Compilation

Install compiler and dependences (given versions are not mandatory) for building cfMMOC:

  • gcc-c++-7.2.1-2.fc27.x86_64
  • poco-devel-1.7.8p3-2.fc27.x86_64
  • ois-devel-1.3.0-14.fc27.x86_64
  • libcurl-devel-7.55.1-8.fc27.x86_64
  • freeimage-3.17.0-12.fc27.x86_64 (also for compiling)
  • zziplib-0.13.62-10.fc27.x86_64 (also for compiling)
  • libatomic-7.2.1-2.fc27.x86_64 (also for compiling)
  • libXaw-1.0.13-7.fc27.x86_64 (also for compiling)

Download the source (https://github.com/cfmmoc/cfmmoc/archive/master.zip), extract it.

Directories are listed as follows:

directory description
Ogre/ headers of OGRE
bin/ binary files
browser/ headers and sources for ./bin/cfMMOC, the executable entry of cfMMOC
include/ headers for shared libraries ./bin/cfMMOC-back.so.1.9.0 and ./bin/cfMMOC-fore.so.1.9.0
media/ run-time resources
src/ sources for ./bin/cfMMOC-back.so.1.9.0 and ./bin/cfMMOC-fore.so.1.9.0

After installing the prerequisites, build cfMMOC as follows::

mkdir obj 
cd obj/
make all -f ../Makefile
make install -f ../Makefile

Running make install -f ../Makefile, will copy the binary file to the bin/ directory.

Datasets can be downloaded from: https://github.com/cfmmoc/cfmmoc-dataset-ll

System Specific Installation Instructions

Fedora is recommendation system for compiling and running cfMMOC.

The following specifics augment the foregoing general instructions for rapid installation on the following systems:

Ubuntu:

Install pre-requisites for run-time:

apt install libatomic1 libois-1.3.0v5 libpocofoundation48

Install pre-requisites for compiling:

apt install make g++ libpoco-dev libois-dev libcurl3-dev libzzip-0-13 libfreeimage3

Running cfMMOC:

Change directory to bin/ using cd bin/.

NOTE: As ./cfMMOC runs for the first time, do not select full screen mode in configuration dialog, and select video mode to be a value lower than screen resolution. You could also change that in file /home/user/.ogre/Ghadamon/ogre.cfg. Sample of ogre.cfg is

Render System=OpenGL Rendering Subsystem

[OpenGL Rendering Subsystem]
Display Frequency=60 Hz
FSAA=0
Fixed Pipeline Enabled=Yes
Full Screen=No
RTT Preferred Mode=FBO
VSync=No
Video Mode=800 x 600
sRGB Gamma Conversion=No

Run ./cfMMOC in terminal, and then select cfMMOC-back, 384x210 resolution is used as default in cfMMOC-back, if it is incorrect, see Troubleshooting section.

Run ./cfMMOC in a new terminal, and then select cfMMOC-fore, 1280x700 resolution is used as default in cfMMOC-fore, you could change it in frender.cpp.

Configuration

Do NOT run cfMMOC on virtual machines.

Refer to this page, https://github.com/cfmmoc/cfmmoc-dataset-ll, for downloading and configuring dataset and data server.

Remote resource directory could be configured in bin/resources.cfg file, locate the line starting with 'cURL=http://', change resource directory there (further see troubleshooting for server accessibility).

cfMMOC could also fetch data from https://raw.githubusercontent.com/cfmmoc/cfmmoc-dataset-ll/master/***/*/*/*/* (NOT recommended, ONLY for data connectivity and accessibility), but no real-time performace is guaranteed by using resources from Internet URLs. Downloading dataset from https://github.com/cfmmoc/cfmmoc-dataset-ll to server on local storage is recommanded.

When data server is configured, change working directory to bin/, run ./cfMMOC command, and select cfMMOC-back sample to run.

Then, run ./cfMMOC command again, and select cfMMOC-fore sample to run.

Troubleshooting

If terrain tiles are not renderred in either back-end process or fore-end process --> check resource directory starting with cURL=http:// in bin/resources.cfg, access file http://localhost/com/u/s/s/t.mesh via web browser to check server accessibility. Note that a trailing slash (/) is required at the end of that resource directory line.

If ./cfMMOC returns ./cfMMOC: error while loading shared libraries: libOgreMain.so.1.9.0: cannot open shared object file: No such file or directory or similar error, please run ./cfMMOC as LD_PRELOAD=./libOgreMain.so.1.9.0:./libOgreOverlay.so.1.9.0 ./cfMMOC.

If cfMMOC-back runs in incorrect resolution (384x210 is correct by default), then edit ogre.cfg in /home/user/.ogre/Ghadamon/ directory (see Running cfMMOC section).

If other problem occurs, post an issue at https://github.com/cfmmoc/cfmmoc/issues/new.

cfmmoc's People

Contributors

cfmmoc avatar kinianox avatar r-barnes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cfmmoc's Issues

`Makefile` in non-standard location.

This is Richard Barnes, Associate Editor of Computers & Geosciences.

Including the makefile inside the obj/ directory is highly non-standard. It is more usual to have the makefile outside the obj/ directory and to run, e.g.,

mkdir obj
cd obj
make -f ../Makefile

Please read up on the appropriate use of makefiles or exam other projects and modify accordingly.

Don't Include Compiled Code

This is Richard Barnes, Associate Editor of Computers & Geosciences.

None of the items in the bin/ directory (no pre-compiled code) should be part of the repo.

`make` doesn't work

This is Richard Barnes, Associate Editor of Computers & Geosciences.

Running Make in the obj directory leads to the following error:

cp ../bin/libRQTS.so .
cp: cannot stat '../bin/libRQTS.so': No such file or directory
Makefile:32: recipe for target 'b.so' failed

It looks as though the make process expects a pre-compiled libRQTS.so in the bin/ directory. Your code must not rely on pre-compiled libraries included with the source, as these are not likely to be portable across systems. Rather, your makefile should include directives for compiling the needed libraries or your README should clearly describe how to acquire said libraries.

If you believe a library may cease to be available in the future, including its source with your project is permissible.

Please resolve the foregoing.

Code Commenting

This is Richard Barnes, Associate Editor of Computers & Geosciences.

I've noticed that your source code has almost no comments.

This makes it difficult for other researchers to use or modify your code.

Please add sufficient comments for outside users unfamiliar with your code to discover the purpose of its various parts and understand the rationale behind the various decisions made in the code.

This is roughly the level of commenting I expect to see with code: https://github.com/r-barnes/BarnesClark2017-Salamanders/blob/master/src/phylo.cpp

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.