Git Product home page Git Product logo

easy3d's People

Contributors

alior101 avatar danifeist avatar liangliangnan avatar maidamai0 avatar vissarion avatar xkunwu 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  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

easy3d's Issues

Consider adding prefix easy3d to build artifact names

For now several libraries builds in easy3d: algo, core, fileio, kdtree, util, renderer, gui, viewer. As a result corresponding binary items are being created like libalgo.a, libcore.a, ...
But such namings are not suitable for adding easy3d libraries in separate projects for several reasons:

  1. Possible name collisions. For example "core" is too common name.
  2. Not fully clear which libraries are added in projects. Let's suppose that we see in project libraries list something like "opencv_core core gui boost_system". It's not fully and instantly clear that "core" and "gui" are from easy3d. But with boost and opencv in such case everything is ok.
  3. In build library directory there are libraries like "libglew.a", "libcore.a", so easy3d libs are mixed with 3rd party libs.

So probably adding prefix easy3d to artifact names will be a better style: easy3d_core, easy3d_gui, ...

Octree visualization

Is this possible to visualize octree data structure in Easy3d?. Because I am trying to insert my octree files, but it is showing in the compiler window that octree is working and it is not replicate in visualization window.

Huge (e.g., >1 billion) point cloud rendering

Hi,
So far I did octree, frustum culling and level of detail in this library. When I tried to load more than 2.5 million points, it kick me out from the debugging. Is this possible to handle large amount pointclouds in this library. Can you please give some suggestions?

Qt: LinesDrawable

I'm trying to display lines on Qt. My problem is that nothing is displayed if I add LinesDrawable to a mesh (or a pointcloud). Here is a reproducible code (diff for Tutorial_303_Viewer_Qt).

https://pastebin.com/VqQpYKGi

If I build and run it in Debug, I see the following error messages.

debug : High - API - ERROR : GL_INVALID_OPERATION error generated. VAO names must be generated with glGenVertexArrays before they can be bound or used.
GL error: 
	file: vertex_array_object.cpp
	line: 83
	function: bind
	info: Invalid operation (The specified operation is not allowed in the current state)
debug : High - API - ERROR : GL_INVALID_OPERATION error generated. Array object is not active.
GL error: 
	file: drawable.cpp
	line: 275
	function: draw
	info: Invalid operation (The specified operation is not allowed in the current state)

Adding glGenVertexArrays() call didn't solve the problem.
My environment is Ubuntu 18.04 x64 with Geforce 1080.

Shader link error

(edit found solution, described in comments below)
Hello,

Thank you for creating this incredible tool, it has been very useful on my other computer.

I am on a new laptop running into a problem with the shaders as seen in the screenshots attached. I did not have this issue on my desktop. GPU is RTX 2080 on desktop. Laptop has RTX 2080 super max-q).

The Viewer does not render things that use the shaders such as point impostor spheres which is my primary goal. The console is rapidly spammed when the mouse is moved in the Viewer window. I am able to workaround by just adding the PointsDrawable to the Viewer and not setting impostor type.

I was not able to solve this problem with googling. I hope you have some insight into this.

Here is the console output for your Copy/Paste convenience:

2021-02-25` 18:29:58,702 ERROR [default] Type mismatch: Type of gl_ClipDistance different between shaders.
Out of resource error.
 - 'points/points_spheres_geometry_color'
debug : High - SHADER COMP - ERROR : SHADER_ID_LINK error has been generated. GLSL link failed for program 8, "": Type mismatch: Type of gl_ClipDistance different between shaders.
Out of resource error.

Pictures are just samples, I can provide more if you wish.
Thank you even if this cannot be solved!
Tut201
Tut302
Tut307
PointsDrawable_SPHERE
This last picture is from my code trying to set imposter type to PointsDrawable::SPHERE. Just commenting out "drawable->set_impostor_type(PointsDrawable::SPHERE);" will make there be no issues - probably because the shader isn't being used.

req: Recognize

if possible, implement recognize 3d model on images through rotation matrix.
thanks.

Transparency

hi,
Transparency can possible without fbo? (Tutorial_505_Transparency)
thanks.

texture

hi,
you have any tutorial for texture quads from image?
texture draw as background.
jignesh

Viewer management

Hello,
I would like to integrate your viewer to show a live point cloud stream in a wider application.
I have a few doubts:

  1. I need to keep on updating the visualized point cloud while I receive the data from an active camera: can you suggest me the best way to do it?
  2. If I close and then reopen the viewer I get this error even if the application keeps on working (apparently) fine:

debug : High - API - ERROR : GL_INVALID_OPERATION error generated. Buffer name does not refer to an buffer object generated by OpenGL.
debug : High - API - ERROR : GL_INVALID_OPERATION error generated. Target buffer must be bound and not overlapped with mapping range.
debug : High - API - ERROR : GL_INVALID_OPERATION error generated. Buffer name does not refer to an buffer object generated by OpenGL.
debug : High - API - ERROR : GL_INVALID_OPERATION error generated. Target buffer must be bound and not overlapped with mapping range.
debug : High - API - ERROR : GL_INVALID_OPERATION error generated. Buffer name does not refer to an buffer object generated by OpenGL.
debug : High - API - ERROR : GL_INVALID_OPERATION error generated. Target buffer must be bound and not overlapped with mapping range.
E0612 19:56:27.232616 8642 vertex_array_object.cpp:79] GL error:
file: /media/xxx/Data/Libraries/Easy3D/easy3d/renderer/vertex_array_object.cpp
line: 79
function: bind
info: Invalid operation (The specified operation is not allowed in the current state)

I'm not really able to undestand it. May you help me, please?

Thank you very much and congratulations for your great work!

How to use Easy3D library in qt existing application

Hello,

At first thanks a lot for the library.
I really need what this library supports in my qt application. In particular, i would like to call the methods of this lib inside my qt application. However, i did not understand how i could this.

I would like to point out that i use cmake outside qt to configure the source code.
Could you please help me?
Thank you in advance,
Elena.

Use Easy3D as an external library

I'm trying to use Easy3D from my own package, but I can't really understand how I'm supposed to get the 3rd party libraries right to make it compile. I'm getting this error:

Cannot open include file: '3rd_party/glog/glog/logging.h': No such file or directory

But in LiangliangNan\Easy3D\3rd_party\glog there is no glog directory, so I don't understand how the code compiles in the examples. Can you explain? I added LiangliangNan/Easy3D/3rd_party to the include path in my CMakeLists.txt file but it's not found (because the glog directory doesn't contain a glog subdirectory).

What am I doing wrong?

updating model in real time

Hi,
Is there a way to

  1. receive timer interrupt similar to key press events ?
  2. update the model in RT and update the GPU to enable simple animations ?

Thanks

Req: About Rotation

implement Rotate model Only X axis and only Y axis method.
surface mesh vertices transform from rotation matrix method.
thanks.

Point cloud visualization only shows green color

I was trying to visualize the bunny.bin example using the code you provided in Quick glance section but the bunny is showed in green only. Could you please suggest what could have been wrong? I am using Windows OS. --Thanks!

VS2017 编译错误

hi Liangliang
VS2017 编译有错误:
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 C2666 “easy3d::Vec<4,float>::operator []”: 2 个重载有相似的转换 easy3d (Easy3D\easy3d) C:\Users\Jiaquan\Desktop\Easy3D-v_1.0\easy3d\transform.cpp 208

make a deb out of the lib

Hi,
This library is super useful for easy and simple visualization but it must be integrated into other projects in order to serve it purpose. Integrating a cmake project into another one is little cumbersome while a deb package containing lib files is easier :)

lighting

I have a box.obj file, but the box does not have a normal vector, so in the viewer there is no 3D lighting.
123

box.obj------------------------------------------------

v -48.000000 -48.000000 -48.000000
v 48.000000 -48.000000 -48.000000
v 48.000000 48.000000 -48.000000
v -48.000000 48.000000 -48.000000
v -48.000000 48.000000 48.000000
v 48.000000 48.000000 48.000000
v 48.000000 -48.000000 48.000000
v -48.000000 -48.000000 48.000000

f 1 2 3
f 1 3 4
f 5 4 3
f 5 3 6
f 6 3 2
f 6 2 7
f 7 2 1
f 7 1 8
f 8 1 4
f 8 4 5
f 8 5 6
f 8 6 7

CGAL bug on 32-bit Windows

At line 72 (and other lines below), the following is hardcoded which doesn't run on 32-bit Windows:

#ifdef _MSC_VER
#include <intrin.h>
#pragma intrinsic(_BitScanForward64)
#pragma intrinsic(_BitScanReverse64)
#endif

A workaround is to replace the above code by

#ifdef _MSC_VER
#include <intrin.h>
#ifdef EASY3D_OS_64_BITS
#pragma intrinsic(_BitScanForward64)
#pragma intrinsic(_BitScanReverse64)
#else
#define _BitScanForward64 _BitScanForward
#define _BitScanReverse64 _BitScanReverse
#pragma intrinsic(_BitScanForward64)
#pragma intrinsic(_BitScanReverse64)
#endif
#endif

Change the licence

I would love to use your library - it looks great. But the GPL Licence would poison our complete code base.
Is there any chance that you change the license to a more liberal (like Apache 2)?

Depth image problem

Hi Liangliang,

Is there any interface of your framework can produce rendering depth image from point cloud and camera intrinsic and camera pose?

The input is camera intrinsic, camera pose and point cloud (only XYZ), and the output is the depth image (the width and height are the same as camera image, and there is depth value of some of these pixels)

Best,
Yu

Req: Draw Images

hi,
Can draw image in center of viewer background? and access to the camera? like zoom in and zoom out.

thanks.

line width

Hi,
Is there a support for other than default line width 1.0f ?
I tried adding glLineWidth support to drawable.cpp but opengl complained for invalid value ..
Thanks

Use animated models

Is there any helper for rigging in the library? I am looking an easy to use library to show animated meshes. I like this library because it is really easy to use, but I cannot find if it is possible to use bones/animations and so on.

Drawing points with specific coordinate

Is it possible to draw point instead of vector?
Im working on motion capture project and using your project to show quick result.
Now im passing array of vec3 with (x, y, z) of eash point, but get something like this:
image

Problem with make

Hello!
Im using Ubutnu 18.04 and terminal versions of cmake and make.
Im clone your repo and
mkdir build && cd ./build
sudo cmake ..
cd ../
sudo make
then get this error

In file included from /home/garaev/Projects/Easy3D/easy3d/viewer/viewer.cpp:62:0:
/home/garaev/Projects/Easy3D/easy3d/util/timer.h: In lambda function:
/home/garaev/Projects/Easy3D/easy3d/util/timer.h:206:31: error: ‘bind’ is not a member of ‘std’
auto f = std::bind(func, owner, std::forward(args)...);
^~~~
/home/garaev/Projects/Easy3D/easy3d/util/timer.h:206:31: note: suggested alternative: ‘find’
auto f = std::bind(func, owner, std::forward(args)...);
^~~~
find
/home/garaev/Projects/Easy3D/easy3d/util/timer.h: In lambda function:
/home/garaev/Projects/Easy3D/easy3d/util/timer.h:238:27: error: ‘bind’ is not a member of ‘std’
auto f = std::bind(func, owner, std::forward(args)...);
^~~~
/home/garaev/Projects/Easy3D/easy3d/util/timer.h:238:27: note: suggested alternative: ‘find’
auto f = std::bind(func, owner, std::forward(args)...);
^~~~
find
/home/garaev/Projects/Easy3D/easy3d/util/timer.h: In lambda function:
/home/garaev/Projects/Easy3D/easy3d/util/timer.h:273:31: error: ‘bind’ is not a member of ‘std’
auto f = std::bind(func, owner, std::forward(args)...);
^~~~
/home/garaev/Projects/Easy3D/easy3d/util/timer.h:273:31: note: suggested alternative: ‘find’
auto f = std::bind(func, owner, std::forward(args)...);
^~~~
find
easy3d/viewer/CMakeFiles/viewer.dir/build.make:686: recipe for target 'easy3d/viewer/CMakeFiles/viewer.dir/viewer.cpp.o' failed
make[2]: *** [easy3d/viewer/CMakeFiles/viewer.dir/viewer.cpp.o] Error 1
CMakeFiles/Makefile2:609: recipe for target 'easy3d/viewer/CMakeFiles/viewer.dir/all' failed
make[1]: *** [easy3d/viewer/CMakeFiles/viewer.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

How can i solve it?

Req : Model Transformation

hi,
can you implement 3d model tranform by rotation matrix? (like cloud compare->edit->apply transformation)

thanks.

Problem about the Tutorial_603_PointCloud_PlaneExtraction

Hello, Thank you for your work. I have been starred this repo for a long time. Recently, I have a demand to use the code about effcient ransac but I met some problem. As it happens that I found you add a tutorial about the planeextraction.So I make and test it with the data you provide - building_cloud.bin. The problem is sometimes that the plane extraction can't work and the terminal output as below. Sometimes works. It is so strange. Do you have any advice? Thank you very much! By the way ,I also use the source code of effcient ransac in my project, the problem in my project is that with same data and parameter, the number of detected plane can be 0 or other. It is also very strange.

Failed one
terminal output "ERROR IN GLOBAL REBUILD"
2019-11-06 16-47-21 的屏幕截图
Success one
2019-11-06 16-48-12 的屏幕截图

Build Errors - Portable File Dialogs header

Hello,

I was using one of the previous version of this library and everything was working very nice.
I was trying to build and run the newest version, however i have problem to build it.

I am using QtCreator in order to build the code however it seems that there are some errors in a header file called portable-file-dialogs.h. I am using QtCreator in windows machine. Here are some of the errors:

Easy3D-master\3rd_party\portable_file_dialogs\portable_file_dialogs.h:677: error: 'lstrcpyW_instead_use_StringCbCopyW_or_StringCchCopyW' was not declared in this scope
lstrcpyW(ofn.lpstrFile, m_wdefault_path.c_str());

Easy3D-master\3rd_party\portable_file_dialogs\portable_file_dialogs.h:952: error: invalid use of incomplete type 'IFileDialog {aka struct IFileDialog}'

         hr = ifd->GetResult(&item);

C:\Qt\Tools\mingw730_64\x86_64-w64-mingw32\include\combaseapi.h:79: error: invalid static_cast from type 'IFileDialog*' to type 'IUnknown*'

 static_cast<IUnknown *> (*pp);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Do you have any idea of how to handle the errors below?
Thanks a lot for your time.

Culling

Hi, I implemented octree and i want to apply culling. Is this possible to implement culling in easy3d. If yes, how???

Running viewer->run() inside a thread crashes

Hi,
When I run the viewer->run() inside a thread (in order no to block my main program execution) imgui crash

`Visualizer::Visualizer()
{
viewer = new easy3d::ViewerImGui("str");
// this works
// viewer->run();
// this doesnt ...
std::thread th1(&Visualizer::StartViewer, this);
}

void Visualizer::StartViewer()
{
viewer->run();
}
`
The crash error is
terminate called without an active exception
ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to compile vertex shader!
ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to compile fragment shader!
ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to link shader program! (with GLSL '#version 150
')

When I run viewer->run() directly, I can see the viewer window - but then run() is blocking and execution stops ..
Any idea how to fix that ?
Thanks
Lior

Document explain

Hi, I want to use this framework, but I found that there are not many materials. Can you give me some links?

And I would like to produce 2D image from mesh grid map in a camera frame, can this framework work?

Best,
Yu

model draw problem

can not draw Transparency(AverageColorBlending::draw) model over image.

Select nodes and elements

Is it possible to implement the following functions with modern OpenGL pipeline?

  1. Interactive rectangle selection of nodes or elements;
  2. Hiding the selected nodes and elements.

Rq: Scale

how to get model and camera scale?

How to change the point size ?

Hi,
Great work! I think it's one of the simplest and clearest 3D Rendering projects out here!
Can anyone point me to the place where I can change the "point" size in the cloud point view ?
Thanks!

Problem with image export

Hello, can i import mesh as .obj file and export as image? Dont find this opportunity in tutorials.

Problem with texture for .obj file

I run viewer, press ctrl+O and load .obj file, but i see only mesh without texture. How can load .obj file with texture? For comparision in Meshlab this file opens with texture.
Screenshot from 2019-05-19 15-27-55

access vertex location

Hi Suppose I would like to assign a color to a point clouds points according to its location. How do I access the vertex location in the cloud vertices iterator. Something along the lines of ...

for (auto v : gccloud->vertices()) 
{
     gccolors[v] = vec3(v.pos[0],0,0); 
}

Thanks

Angle wrapper

First of all impressive work: efficient and organized. Thank you!

I often find myself trying to view 3D data through a Windows remote desktop connection (RDC), as the data is too big or the time lost to download it locally is an overhead. The problem with RDC is that it does not have access to the GPU, and so any OpenGL app fails to open. However DirectX is still available and works great. There are a number of solutions:

  • replace RDC with something else, like TeamViewer; downside: RDC is faster than any other remote viewer out there, plus free
  • use a OpenGL software rendered like mesa; downside: very slow, especially with large 3d data, and lack of some advanced OpenGL features
  • add Angle support to the app; downside: might not be easy to implement; upside: all rendering will be done through native DirectX, which not only is far better than software rendering, but potentially even faster then native OpenGL, as many Windows drivers favor DirectX over OpenGL.

Can you pls add support for Angle to Easy3D? This will be a feature that will additionally differentiate your viewer from anything out there, plus will help me and many other using RDC on daily bases.

req: Mapple

hi, dear.

can you give me source code of mapple?

thanks,
jignesh

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.