etaler / Etaler

A flexable HTM (Hierarchical Temporal Memory) framework with full GPU support.
BSD 3-Clause "New" or "Revised" License
89 stars 14 forks source link

3D visualizations feature #39

Closed alior101 closed 5 years ago

alior101 commented 5 years ago

Hi Martin, After lots of work trying many 3D libs I finally settled on Easy3D lib - I wrapped it in LayersVisualization lib since the original lib was not fit for multithreading opengl working and gpu buffers online update. I created a new tim_visualize example in which you can see in real time the activity of neurons with the same cell column structure... This is of course just a starting point and the real benefit will come from visualizing grid cell planes and their multi layers influence ... Tell me if you have any issue with it ... Lior

Screenshot from 2019-07-16 12-07-58

marty1885 commented 5 years ago

@alior101 Wow, impressive work! I'll try to build it tomorrow.

It seems that you have included the entire Easy3D library in Etaler repo. Would you mind moving it into separate repo and add it as a submodule? So we can manage the library easier, and pulling from upstream becomes easier too. If you like to, I can open a repo in Etaler's organization.

alior101 commented 5 years ago

Now with easy3d as submodule :)

marty1885 commented 5 years ago

@alior101 Thanks! After further viewing the changed files. It seems that you have also pulled in the entirety of ImGui and (seems to be) Easy3D's shader source code. Please put them in another repository so we can keep up with upstream.

Also, Easy3D is licensed under GPLv3 while Etaler is released under BSD 3 clause. Which aren't compatible with each other... Maybe we could make your visualizer a standalone application/library? Or any suggestion?

alior101 commented 5 years ago

Hi Martin. Imgui can be easily converted to submode. I haven't thought about the licensing issues.. It seems like it's a real issue.. I might make a separate repo of LayersVisualizer as a lib.. Will that be OK in term of license if it's submoduled into etaler ?..

On Wed, Jul 17, 2019, 19:57 Martin Chang notifications@github.com wrote:

@alior101 https://github.com/alior101 Thanks! After further viewing the changed files. It seems that you have also pulled in the entirety of ImGui and (seems to be) Easy3D's shader source code. Please put them in another repository so we can keep up with upstream.

Also, Easy3D is licensed under GPLv3 while Etaler is released under BSD 3 clause. Which aren't compatible with each other... Maybe we could make your visualizer a standalone application/library? Or any suggestion?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/etaler/Etaler/pull/39?email_source=notifications&email_token=AAXET3AFY74RNGGFIIEBTFLP75FP5A5CNFSM4ID62B42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2FCDAQ#issuecomment-512369026, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXET3F4DMQDTD5CE4JXOGDP75FP5ANCNFSM4ID62B4Q .

alior101 commented 5 years ago

Also, any preferences as to shared or static lib in term of license compatability?

On Wed, Jul 17, 2019, 22:29 Lior Assouline alior101@gmail.com wrote:

Hi Martin. Imgui can be easily converted to submode. I haven't thought about the licensing issues.. It seems like it's a real issue.. I might make a separate repo of LayersVisualizer as a lib.. Will that be OK in term of license if it's submoduled into etaler ?..

On Wed, Jul 17, 2019, 19:57 Martin Chang notifications@github.com wrote:

@alior101 https://github.com/alior101 Thanks! After further viewing the changed files. It seems that you have also pulled in the entirety of ImGui and (seems to be) Easy3D's shader source code. Please put them in another repository so we can keep up with upstream.

Also, Easy3D is licensed under GPLv3 while Etaler is released under BSD 3 clause. Which aren't compatible with each other... Maybe we could make your visualizer a standalone application/library? Or any suggestion?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/etaler/Etaler/pull/39?email_source=notifications&email_token=AAXET3AFY74RNGGFIIEBTFLP75FP5A5CNFSM4ID62B42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2FCDAQ#issuecomment-512369026, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXET3F4DMQDTD5CE4JXOGDP75FP5ANCNFSM4ID62B4Q .

marty1885 commented 5 years ago

Will that be OK in term of license if it's submoduled into etaler ?..

Since the LayerVisualizer isn't used anywhere is the core library (please confirm this). We could move the LayerVisualizer into it's own directory under the Etaler's root directoy. And add a GPLv3 licence there (and also mark tm_visualize as GPLv3 instead of BSD). Turning it into a standalone yet tightly integrated lib.

Either static/dynamic is fine here.

alior101 commented 5 years ago

Hi Martin, What about holding it in a separate repo and just submodule it inside tm_visualize example since it's not used elsewhere in the core ? It is just a simple 3d point and connections cloud visualization lib so maybe other people could make use of it in visualizing general 3d connected nodes .. What do you say ? Is it still OK in term of license ?

On Thu, Jul 18, 2019 at 6:22 AM Martin Chang notifications@github.com wrote:

Will that be OK in term of license if it's submoduled into etaler ?..

Since the LayerVisualizer isn't used anywhere is the core library (please confirm this). We could move the LayerVisualizer into it's own directory under the Etaler's root directoy. And add a GPLv3 licence there. Turning it into a standalone yet tightly integrated lib.

Either static/dynamic is fine here.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/etaler/Etaler/pull/39?email_source=notifications&email_token=AAXET3CQSHMZIG6LFZUHJCTP77OYBA5CNFSM4ID62B42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2HGSHQ#issuecomment-512649502, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXET3AEVQOHB3B63OOKCBLP77OYBANCNFSM4ID62B4Q .

marty1885 commented 5 years ago

You mean hold LayerVisualizer in a separate repo and submodule it inside tm_visualize? Yes, that will also work. Let me know if I got things wrong. And please remember add GPLv3 deceleration in the top of tm_visualize.

alior101 commented 5 years ago

done :)

alior101 commented 5 years ago

All your reviews are OK. The only issue I have is with the resource dir ... Easy3D internal viewer is opening a hardcoded "resources/shaders" path dir and if the shaders are not found the GPU can not render points and lines ... I don't want to fork Easy3D for the sole purpose of be able to specify shaders dir, but I have no problem putting them into another separate repo ..

alior101 commented 5 years ago

Hi Martin, I moved the resources to the visualize directory ... this means that the tm_visualize will have to be run from the build dir and not from the etaler workspace root since easy3d lib expects to load the resources from ./resources - this is mostly relevant to vscode development env .. where the cmake plugin runs the example from the etaler root ..

marty1885 commented 5 years ago

Sorry I was away in the weekends. I'll make some changes so the vosualozer also works with the GPU. And it should be ready to merge.

BTW, seems you have deleted the docker/ folder. Why is that?

marty1885 commented 5 years ago

@alior101 Also, is the .gdbinit file required? If not, please remove it.

alior101 commented 5 years ago

It's automatic if you work with vscode - if not, there is a docker file but it's just for building the image. Inside you will have to clone from repo. I highly recommend working with vscode since it has an automatic remote development inside a container.. I know you don't have issue with c++17 but many debian based distro are way behind and are missing lots of the features your code relies upon ..

On Mon, Jul 22, 2019 at 10:51 AM Martin Chang notifications@github.com wrote:

Sorry I was away in the weekends. I'll make some changes so the vosualozer also works with the GPU. And it should be ready to merge.

BTW, seems you have deleted the docker/ folder. Why is that?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/etaler/Etaler/pull/39?email_source=notifications&email_token=AAXET3FSDW6I6E6PW4P5CFLQAVRIXA5CNFSM4ID62B42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2PCRHI#issuecomment-513681565, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXET3FPEPCJCF2REF5NXXTQAVRIXANCNFSM4ID62B4Q .

alior101 commented 5 years ago

Hi Martin,This gdbinit contains many useful macros for working with stl .. I know you are working with cling so you don't need it but maybe other will do. Btw, I like this cling idea and trying to work with it to implement the grid cells functionality ... It's cool that it has root and it's graphics capabilities so tightly attached .. I saw it has GL exmaples so maybe it will replace LayersVissualizer library in the future when I master it enough ...

On Mon, Jul 22, 2019 at 6:04 PM Martin Chang notifications@github.com wrote:

@alior101 https://github.com/alior101 Also, is the .gdbinit file required? If not, please remove it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/etaler/Etaler/pull/39?email_source=notifications&email_token=AAXET3FGHTSIRLNFXYQ2RJLQAXD7DA5CNFSM4ID62B42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2QG6BA#issuecomment-513830660, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXET3FRPFORMN6FVKHIZ7DQAXD7DANCNFSM4ID62B4Q .

marty1885 commented 5 years ago

About the docker script's location. I was worrying that people who doesn't use VSCode won't know that folder contains docker scripts. And the common place to store Dockerfile is in /docker.

And for the .gdbinit file. I was thinking that people might have their own setup and will replace it with their own. Now I'm thinking that weather providing an alternative default is a good thing to do.

marty1885 commented 5 years ago

@alior101 I think it is good to have easy access of docker enviroment in VSCode. But at the same time, others not using VSCode will have trouble finding the dockerfile. Whould you mind me putting a READE in /docker to redirect people?

alior101 commented 5 years ago

sure

On Wed, Jul 31, 2019 at 3:50 AM Martin Chang notifications@github.com wrote:

@alior101 https://github.com/alior101 I think it is good to have easy access of docker enviroment in VSCode. But at the same time, others not using VSCode will have trouble finding the dockerfile. Whould you mind me putting a READE in /docker to redirect people?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/etaler/Etaler/pull/39?email_source=notifications&email_token=AAXET3A2MMGC2VPLEFYLUCTQCDOV3A5CNFSM4ID62B42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3FXE5Y#issuecomment-516649591, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXET3CK3LHJID3WTZ4634LQCDOV3ANCNFSM4ID62B4Q .

marty1885 commented 5 years ago

@alior101 A final problem. In your submodules:

[submodule "Etaler/3rdparty/Easy3D"]
    path = Etaler/3rdparty/Easy3D
    url = https://github.com/LiangliangNan/Easy3D.git
    branch = master
[submodule "Etaler/3rdparty/LayersVisualizer/Easy3D"]
    path = Etaler/3rdparty/LayersVisualizer/Easy3D
    url = https://github.com/LiangliangNan/Easy3D.git

Why is there 2 instance of Easy3D? Are they both needed?

alior101 commented 5 years ago

sorry.. :) fixed

On Thu, Aug 1, 2019 at 11:20 AM Martin Chang notifications@github.com wrote:

@alior101 https://github.com/alior101 A final problem. In your submodules:

[submodule "Etaler/3rdparty/Easy3D"] path = Etaler/3rdparty/Easy3D url = https://github.com/LiangliangNan/Easy3D.git branch = master [submodule "Etaler/3rdparty/LayersVisualizer/Easy3D"] path = Etaler/3rdparty/LayersVisualizer/Easy3D url = https://github.com/LiangliangNan/Easy3D.git

Why is there 2 instance of Easy3D? Are they both needed?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/etaler/Etaler/pull/39?email_source=notifications&email_token=AAXET3EV6IQHUQBUENURBTLQCKMDZA5CNFSM4ID62B42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3JYLMQ#issuecomment-517178802, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXET3AE5LEEZ43S7CHWFN3QCKMDZANCNFSM4ID62B4Q .

marty1885 commented 5 years ago

Looks good to me! Merging.