GithubHelp home page GithubHelp logo

ofxvterrain's Introduction

ofxVTerrain

openframeworks addon for terrain rendering with vTerrain library http://vterrain.org. You can customize your terrain map with the vTerrain tools and save the project in an .xml file. Then you can import it with ofxVTerrain addon in OpenFrameworks. This is still a work in progress!!

Windows

You will find a visual studio solution in the vterrain-example/src folder. You need to adjust Osg src and static lib. Needed also gdal and libMini, lippng,libjpeg. i used Osg binaries from here:

http://www.alphapixel.com/osg/downloads/free-openscenegraph-binary-downloads

i used the 32 bit version.

gdal and other libs from OSGeo4W:

http://trac.osgeo.org/osgeo4w/

libMini (MINI-10.9.zip) and libMini prebuilt binaries dependencies(libpng,libjpeg,zlib..):

https://code.google.com/p/libmini/downloads

if you want build yourself the vTerrain libraries grab the source from here:

http://vterrain.org/Download/

and don't forget to visit the main page:

http://vterrain.org

useful note : remember to exclude from source the files xmltok_impl.c and xmltok_ns.c

Linux

I was able to compile it in linux only without makefile. I can't exclude from source the files mentioned above.Go in the OpenFrameworks forum to see the discussion: http://forum.openframeworks.cc/index.php/topic,12325.0.html So maybe you have to adjust some path in the CB project. You need Osg, gdal, libpng, lipjpeg, zlib you can install them from console

	sudo apt-get install openscenegraph libgdal-dev libpng12-dev libjpeg-dev

libMini (MINI-10.9.zip) source :

https://code.google.com/p/libmini/downloads

if you want build yourself the vTerrain libraries grab the source from here:

http://vterrain.org/Download/

and don't forget to visit the main page:

http://vterrain.org

To use

in main.cpp just use the setMap function to load your .xml project:

	#include "ofMain.h"
	#include "testApp.h"
	#include "ofxAppVTerrainWindow.h"

	//========================================================================

	int main( ){


	ofxAppVTerrainWindow window;
	ofSetupOpenGL(&window, 800,600, OF_WINDOW);		
		window.setMap("path/to/myMap.xml");
	// this kicks off the running of my app
	//// can be OF_WINDOW or OF_FULLSCREEN
	// pass in width and height too:
	ofRunApp( new testApp());

	}

and in testApp.h remember to add the include to ofxOsgApp and ofxVTerrain header:

	#include "ofxOsgApp.h"
	#include "ofxVTerrain.h"

and to inherit from ofBaseApp and ofxOsgApp

	class testApp : public ofBaseApp, public ofxOsgApp{
	
	//testApp needed code
	
	}

in testApp.cpp just remember to add in update:

	void testApp::update(){

		vtGetScene()->DoUpdate();

	}

Data

You can use the data bundled with the vtp SDK download them from here :

http://vterrain.org/dist/vtp-apps-data-130201.zip

You must follow the vTerrain convention, for this reason i suggest to use the data above as a starting point to be friendly with.

This little guide is going to be improved and i need to verify a lot of things in the addons.

Any feedback is welcome! and also collaborations!

ofxvterrain's People

Contributors

kalwalt avatar

Watchers

 avatar  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.