Giter Club home page Giter Club logo

forge's Introduction

docs slack

Forge - High Performance Visualizations

Platform Linux x86 Linux aarch64 Windows OSX
Status Build Status Unknown Build Status Build Status

An OpenGL interop library that can be used with ArrayFire or any other application using CUDA or OpenCL compute backend. The goal of Forge is to provide high performance OpenGL visualizations for C/C++ applications that use CUDA/OpenCL. Forge uses OpenGL >=3.3 forward compatible contexts, so please make sure you have capable hardware before trying it out.

Build instructions for forge can be found on our GitHub wiki page.

Sample Images

Image 2D Plot
3d Plot Rotated 3d Plot
histogram Surface

Fig.1 - Pan and Scale

Fig.2 - Per Cell Rotation in Grid Layour

forge's People

Contributors

9prady9 avatar caseymcc avatar floopcz avatar ghisvail avatar gitter-badger avatar jpauwels avatar marbre avatar mlloreda avatar pavanky avatar pfultz2 avatar shehzan10 avatar syurkevi avatar tmpvar avatar umar456 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

forge's Issues

Building forge fails with ninja

Steps to reproduce

  • install ninja
cmake -Gninja ..
ninja

Error:

ninja: error: 'third_party/freetype/lib/libfreetype.a', needed by 'src/libforge.so', missing and no known rule to make it

Issue originally reported here:
arrayfire/arrayfire#861

Fix data alignment issues before calling gl*Sub* calls

Calls such has glTexSubImage2D, glTexImage2D use 4-byte alignment by default. For types such as unsigned char, char, there is possibility that above gl*** calls will result in segmentation faults. Will have to verify and fix it if required.

Examples broken on AMD display device

OpenCL examples are not working at all

surface
surface_opencl

plotting
plotting_opencl

plot3
plot3_opencl

histogram
histogram_opencl

fractal
fractal_opencl


CPU examples look garbled at default window size, but they work after maximizing the window.

Histogram default window
histogram_cpu_default

Histogram maximized window
histogram_cpu_maximized

Fractal default window
fractal_cpu_default

Fractal maximized window
fractal_cpu_maximized

Verify shader 'in' parameters to be type safe

The shader parameters with in qualifier are currently using vec[2|3|4] vector types whose base type is single precision floating point numbers. In cases where the vertex buffers are of different types, check if the shader parameters needs to be changed to their corresponding vector types. If yes, make necessary changes.

Build error on OSX 10.10

I'm trying to update the Homebrew formula for arrayfire to version 3.2.2. In the process, I'm using version af3.2.2 of forge. It compiles on OSX 10.9 and 10.11, but not on 10.10. Using clang++, I get the error message:

In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Headers/CGLCurrent.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Headers/CGLTypes.h:75:15: error: missing ',' between enumerators
        kCGLPFAStereo OPENGL_ENUM_DEPRECATED(10_0, 10_11)        =   6,
                     ^
                     , 

You can find the full build log here.
The error above is located here.

Thanks in advance for any clue!

Contour Plots

All most all of the forge objects have the option to let user provide per vertex attributes such as colors and alphas for rendering.

In the case of contour plots, I am not sure if per vertex colours or alphas makes any sense. One possible usage that i can see is per iosline color and alpha values.

@arrayfire/core-devel Any possible use cases of allowing per vertex colours/alphas ? An alternative to these per vertex attributes i thought off is using colormaps with isolines, which is the most common way of coloring contour lines from what i have seen so far.

histogram example is incorrect

There are (at least) two issues here with the histogram example:

  1. The Perlin distribution should result in a Gaussian-like distribution of noise, whereas the histogram does not display anything remotely close to this, and
  2. There appears to be a plotting error wherein every 3n and 4n values are near zero in the histogram.

The Perlin distribution used in the histograms should result in a Gaussian-like noise distribution; however, in the examples, it is anything but Gaussian:

5a349626-e132-11e5-9654-ed3c3b8d0596

This is even more apparent if one increases the number of bins to around 100:

screenshot from 2016-03-03 13-08-41

Also, there appears to be an odd pattern wherein every 3rd and 4th value on the x-axis is near zero.

Surface Object

Usage example

class Surface {
    // ...
};

fg::Surface surf(100, 100, FGType);

fg::Window wnd;
wnd->draw(surf);

Which would render something as below (left hand side in the picture).
Example

Incorrect z-depth buffering in surface_cuda and surface_cpu

In the code for PR #74, z-depth buffering appears to be broken for (at least) surface plots in the CPU and CUDA backends. See the plots below.

The following image is taken from surface_opencl and shows correct z-depth behavior:
screenshot from 2016-03-03 11-07-46

The following image is taken from surface_cuda and shows INCORRECT z-depth behavior:
screenshot from 2016-03-03 11-07-59

The following image is taken from surface_cpu and shows INCORRECT z-depth behavior:
screenshot from 2016-03-03 11-08-08

Add outline stroke to Text Renderings

Currently, each character is rendered as is. However, this can pose a problem if the color in which the character is rendered is same as the background ground. If an outline is drawn, it would be visually helpful to easy identify text in situations such as explained above.

Cannot load default config file

C02QH2D7G8WM:opencl userone$ ./histogram_opencl
Fontconfig error: Cannot load default config file
Freetype face initilization(3001)
C02QH2D7G8WM:opencl userone$ ./plot
-bash: ./plot: No such file or directory
C02QH2D7G8WM:opencl userone$ ./plot3_opencl
Fontconfig error: Cannot load default config file
Freetype face initilization(3001)

1.0 release

  • Documentation
  • Vendor Neutral Copy Headers
  • Improve Mouse based rotation interaction
  • [ ] Fix rendering bugs on AMD GPUs
  • 2D Vector Fields
  • Test Examples on Primary Platforms(Linux, OSX & WIndows)
  • Test Examples on Multiple GPU Vendors
  • Update cl.hpp in examples to use cl2.hpp and add that as external project for examples.

Optionally

  • glbinding switch
  • 3D Vector Fields

Font glyph packing

Early version maintained individual textures for each character glyph, which was very inefficient.

Pack the glyphs into a single texture.

histogram_opencl example color bars not unique, only last bar updates

The histogram_opencl example appears to have two bugs:

  1. The color of the bars is always yellow and
  2. Between successive frames only the last bar ever updates

See screenshots below.

Appearance of histogram_cuda shows bars that are in different colors and they all update their value every frame. This is the correct behavior.
screenshot from 2016-03-03 11-21-55

whereas histogram_opencl shows bars that are all yellow in color and only the last bar updates between successive frames:

osx build issues

On OSX El Capitan (10.11)
Using [email protected]
and clang:

forge (master)‣ clang --version
Apple LLVM version 7.0.0 (clang-700.1.76)
Target: x86_64-apple-darwin15.0.0
Thread model: posix

after cloning forge and running through the build process

I'm seeing

[ 69%] Building CXX object examples/CMakeFiles/example_histogram_opencl.dir/opencl/histogram.cpp.o
/Users/tmpvar/work/gfx/tmp/forge/examples/opencl/histogram.cpp:283:16: error: use of undeclared identifier 'fmod'
            if(fmod(persistance, 0.5f) < 0.01)
               ^
1 error generated.

after applying this patch

I was able to get it to build, but upon running the surface_opencl demo I see:

forge (master)‣ examples/opencl/surface_opencl
InfoLog:
WARNING: Output of vertex shader 'hpoint' not read by fragment shader

OpenGL Shader linking failed(2001)

FindForge.cmake only installed if BUILD_EXAMPLES=ON

I am currently working on an Gentoo ebuild for forge. I noticed that the CMake stuff is only installed if -DBUILD_EXAMPLES=ON is passed:

-- Installing: /var/tmp/portage/sci-visualization/forge-9999/image/usr/share/Forge/examples/CMakeLists.txt
-- Installing: /var/tmp/portage/sci-visualization/forge-9999/image/usr/share/Forge/examples/CMakeModules
-- Installing: /var/tmp/portage/sci-visualization/forge-9999/image/usr/share/Forge/examples/CMakeModules/FindOpenCL.cmake
-- Installing: /var/tmp/portage/sci-visualization/forge-9999/image/usr/share/Forge/examples/CMakeModules/FindForge.cmake
-- Installing: /var/tmp/portage/sci-visualization/forge-9999/image/usr/share/Forge/examples/CMakeModules/FindGLEWmx.cmake

Otherwise, only the forge library and headers get installed. Initally I expected that only FindForge.cmake would be installed. FindOpenGL.cmake and a FindGLEW.cmake are provided by the system.

Furthermore, I tried to change the install destination with -DFG_INSTALL_CMAKE_DIR="${ED}/usr/share/cmake/Modules" which shows no effect. Maybe you can give me a hint.

Plot should be origin centric

When displaying a plot which has values that cross zero, the value zero should appear in the plot and all labels should be equally spaced about zero.

2D Plot Object Improvement

  • Add option to use different type of markers for plots
  • Add option to render different type of plots eg. scatter etc. Probably add the ones listed here as we progress forward. But definitely add scatter plot.

Add support for drawing computer vision features

It is necessary to add support for drawing of computer vision features.

A circle/cross/X can be drawn around the coordinates where a feature is located. Feature matching can be drawn as lines between matching features in two different images.

See image below for example.

feature_tracking

ArrayFire event handling

Will event handlers, like mouse click, mouse drag, scrolling, etc. be integrated to ArrayFire?

3d line/scatter plots

  • 3d line plot
  • 3d scatter plot

These would be almost similar to what 2d plotting was doing.

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.