Photonsters / PhotonFileEditor

Utilities to display, make and edit files for the Anycubic Photon printer
GNU General Public License v3.0
75 stars 13 forks source link

create a better 3d photon viewer to integrate in the pfe #83

Open X3msnake opened 6 years ago

X3msnake commented 6 years ago

https://github.com/ephtracy/voxel-model/blob/master/MagicaVoxel-file-format-vox-extension.txt

if we implement this file format export we can open photon files in this open source voxel Photoshop and edit the photon sliced files :) or simply use the viewer

https://ephtracy.github.io

X3msnake commented 6 years ago

Since MagicaVoxel is not Open source

Best alternative will be Goxel and VoxelShop

Voxelshop https://www.youtube.com/watch?v=SQJiifHfZPE

Goxel https://www.youtube.com/watch?v=h-52oe4P6jc

X3msnake commented 6 years ago

list of 22 voxel editors

https://www.slant.co/topics/1544/~voxel-editors

X3msnake commented 6 years ago

image

https://developer.nvidia.com/gvdb

X3msnake commented 6 years ago

https://github.com/nickgildea/leven http://ngildea.blogspot.com/ https://www.youtube.com/watch?time_continue=70&v=DkaxVzppDYU

X3msnake commented 6 years ago

Voxel-Engine A CPU based sparse voxel octree renderer.

https://github.com/bcmpinc/voxel-engine https://bcmpinc.wordpress.com/

X3msnake commented 6 years ago

Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.

https://github.com/bkaradzic/bgfx

image

X3msnake commented 6 years ago

https://github.com/Phyronnaz/VoxelPlugin

UNREAL ENGINE VOXEL PLUGIN

X3msnake commented 6 years ago

GIGASPACE http://gigavoxels.inrialpes.fr/download.html

A CUDA/GLSL library for the efficient 3D real-time rendering of highly detailed scenes.

Needs a Fermi processor

X3msnake commented 6 years ago

https://github.com/armory3d/armory_docs Armory is a game engine with full Blender integration, turning it into a complete game development tool.

Game Templates Archviz Templates Examples Global Illumination Voxel World Material Vault

X3msnake commented 6 years ago

Zmorph apparently uses Voxel thech in their slicer

https://voxelizer.com/

source: https://www.reddit.com/r/3Dprinting/comments/642nwq/voxelbased_file_formats/

X3msnake commented 6 years ago

Monolith Is free A Voxel-Based Modeling Engine For Multimaterial 3D Printing http://www.monolith.zone/examples/

X3msnake commented 6 years ago

https://medium.com/retronator-magazine/pixels-and-voxels-the-long-answer-5889ecc18190

X3msnake commented 6 years ago

https://github.com/html5rocks/www.html5rocks.com/tree/master/content/tutorials/webgl/million_letters https://www.html5rocks.com/en/tutorials/webgl/million_letters/

one idea is to use points or particles to render the photon model and use a animated Cube sprite that follows the isometric camera projevtion

X3msnake commented 6 years ago

threeoctree.js (r60) (sparse + dynamic) 3D spatial representation structure for fast searches The aim of this project is to create a fully featured search tree for the THREE.js WebGL library.

This build is stable up to THREE.js ~r60 (updates to latest THREE build on hold as my time is required on other projects)

https://github.com/collinhover/threeoctree

X3msnake commented 6 years ago

WHAT IS VOLUME RENDERING? Unlike traditional rendering uses triangles to display 3D graphics, volume rendering uses other methods such as Volume Ray Casting. This image-based method renders a 3D scalar field into a 2D image by casting rays along the 3D volume. Each pixel we see on the screen is the result of a ray that is going through the cube and getting intensity samples from the voxels at regular intervals.

http://www.lebarba.com

X3msnake commented 6 years ago

Voxeltastic! Ever need to ray trace your 3D images in some way that's more interested than slices? Don't want hard surfaces? Wanna do it in a web browser for the world to see? Try Voxeltastic! It's a A WebGL-based Raytraced Voxel Engine with Transparency. If you'd like a brief summary of what the default interface is, please click this link:

https://github.com/cnlohr/voxeltastic

X3msnake commented 6 years ago

This is/will be a real-time OpenGL Sparse Voxel Oct-tree Raycaster. It makes heavy use of GPU compute.

http://danpburke.blogspot.com/2012/11/one-shiny-dragon.html

Voxel Rendering Test https://www.youtube.com/watch?v=xW2YZBkk53I

SourceCode https://github.com/burito/voxel

X3msnake commented 6 years ago

VoxCad

VoxCAD (Voxel CAD) is a cross-platform open source voxel modeling and analyzing software. VoxCAD includes the Voxelyze 3D dynamics engine with large deformations, collision detection, multiple materials, volumetric actuation, etc. Check out the

https://sites.google.com/site/voxcadproject/file-cabinet

X3msnake commented 6 years ago

Voxelengine3 is a ThreeJS WebGL voxel engine. The code has NOT been polished and is provided "as is". There are a lot of code that are redundant and there are tons of improvements that can be made.

https://www.findbestopensource.com/product/lallassu-voxelengine3

X3msnake commented 6 years ago

http://scholarworks.rit.edu/theses/9378/

Current technology allows MRI and other patient data to be translated into voxel-based 3D models for the purpose of visualization. However, these voxel models are extremely complex and are not suitable for rapid real-time manipulation. For true “on-the-fly” interactivity, polygon-based models must be hand-built using other methods and imported into a game engine.This project develops an algorithm to translate complex datasets into optimized models for real-time interactivity without sacrificing accuracy of the original imaging modality.

1.Osirix – Advanced Open-Source PACS Workstation DICOM Viewer http://www.osirix-viewer.com/

  1. 3D Slicer- A multi-platform, free and open source software package for visualization and medical image computing http://www.3dslicer.org

3.MudBox – Autodesk¨ Mudbox™ 3D digital sculpting and digital painting software http://usa.autodesk. com

4.3D Coat – Retopologizing and 3D sculpting software http://3d-coat.com

5.MAYA - Autodesk¨Maya¨ 3D animation software delivers an end-to-end creative workflow with compression tools for animation, modeling, simulation, visual effects, rendering, matchmoving, and compositing on a highly extensible production platform http://usa.autodesk.com

6.Unreal Engine 3 – a complete development framework for PCs, iOS, Xbox 360¨, and PlayStation¨ 3, providing a vast array of core technologies, content creation tools and support infrastructure http://www. unrealengine.com/

X3msnake commented 6 years ago

https://github.com/Gforcex/OpenGraphic/blob/master/README.md

OpenGraphic Graphic Engine & Game Engine open source list!

NardJ commented 6 years ago

What could help is, is erode the model to a shell width of 1 voxel and store the voxels as 3d coord's instead of storing complete voxel array.

NardJ commented 6 years ago

@Photonsters/photonsters I almost have a voxel viewer in PFE, but I can't get my model to light properly. All sides have the same light intensity. The following is an octagon with a thickness, however the side walls have the same lighting intensity as the top walls. (Don't know about the light blue artifact line at the bottom) image

My points array is a flat/1D array of triangle corner points. My normals array is a flat/1D array of normal 3d-vectors for each triangle. I feel like I am missing something really basic about using OpenGL. Any help is appreciated!

The following code is in the init procedure:

# ===============================================
# First add points to buffer
# ===============================================
points = numpy.array(points,dtype=numpy.float32)
points=points * scale
self.voxelPtBufferLen = len(points) // 3

glEnableClientState(GL_VERTEX_ARRAY)
self.voxelPtBufferIdx = glGenBuffers(1)
dataSizePt = arrays.ArrayDatatype.arrayByteCount(points)

# print ("datasize",dataSize)
glBindBuffer(GL_ARRAY_BUFFER, self.voxelPtBufferIdx)
glBufferData(GL_ARRAY_BUFFER, dataSizePt, points, GL_STATIC_DRAW)

glDisableClientState(GL_VERTEX_ARRAY)

# ===============================================
# Second add normals for each triangle to buffer
# ===============================================
normals = numpy.array(normals, dtype=numpy.float32)
self.voxelNmBufferLen = len(normals)

glEnableClientState(GL_NORMAL_ARRAY)
self.voxelNmBufferIdx = glGenBuffers(1)
dataSizeNm = arrays.ArrayDatatype.arrayByteCount(normals)

glBindBuffer(GL_ARRAY_BUFFER, self.voxelNmBufferIdx)
glBufferData(GL_ARRAY_BUFFER, dataSizeNm, normals, GL_STATIC_DRAW)

glDisableClientState(GL_NORMAL_ARRAY)

And in the loop I have the following code to draw the model

colorFront = (0.1, 0.3, 0.6)
colorBack = (1, 0.3, 0.3)
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, (0.2, 0.2, 0.2))
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, (0.8, 0.8, 1.0))
glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, 50.0)

glEnable(GL_DEPTH_TEST)
glEnable(GL_NORMALIZE)

glLight(GL_LIGHT1, GL_AMBIENT, (0.3, 0.0, 0.0, 1))
glLight(GL_LIGHT1, GL_DIFFUSE, (0.6, 0.0, 0.0, 1))
glLight(GL_LIGHT1, GL_SPECULAR, (0.9, 0.0, 0.0, 1))
glLight(GL_LIGHT1, GL_POSITION, (10,10,10))
glLight(GL_LIGHT1, GL_SPOT_DIRECTION, (-10,-10,-10))
glEnable(GL_LIGHT1)

glBegin(GL_QUADS)
glColor3f(1.0,1.0,0)
glVertex3f(10, 10, 10)
glVertex3f(12, 12, 12)
glVertex3f(10, 12, 12)
glVertex3f(12, 10, 12)
glEnd()

glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)
glColor3fv(colorFront)

# DRAW VOXELS
glEnableClientState(GL_VERTEX_ARRAY)
glBindBuffer(GL_ARRAY_BUFFER, self.voxelPtBufferIdx)
glVertexPointer(3,GL_FLOAT,0,None)

glEnableClientState(GL_NORMAL_ARRAY)
glBindBuffer(GL_ARRAY_BUFFER, self.voxelNmBufferIdx)
glNormalPointer(GL_FLOAT, 0, 0)

glDrawArrays(GL_TRIANGLES, 0, self.voxelPtBufferLen)

glDisableClientState(GL_VERTEX_ARRAY)
glDisableClientState(GL_NORMAL_ARRAY)
NardJ commented 6 years ago

Solved. We have a voxel viewer :-)

image

There are still bugs too remove and coloring of model should be enhanced.,

X3msnake commented 6 years ago

interesting. congrats Master.

how does it stand up to massive data?

No dia domingo, 19 de agosto de 2018, Nard Janssens < notifications@github.com> escreveu:

Solved. We have a voxel viewer :-)

[image: image] https://user-images.githubusercontent.com/11459480/44310770-49bc2600-a3dc-11e8-8b82-575bab270037.png

There are still bugs too remove and coloring of model should be enhanced.,

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Photonsters/PhotonFileEditor/issues/83#issuecomment-414138458, or mute the thread https://github.com/notifications/unsubscribe-auth/AKke-ue_xCYsO0LQmQSU3MtXg35aYqQzks5uSY_9gaJpZM4VxViQ .

-- Com os melhores cumprimentos, Vinicius Silva

X3msnake commented 6 years ago

here's some more findings

https://github.com/topics/octree

@NardJ

look at the python octree one https://github.com/inducer/boxtree

https://documen.tician.de/boxtree/

Another one https://github.com/jcummings2/pyoctree

X3msnake commented 6 years ago

https://youtu.be/gNZtx3ijjpo

X3msnake commented 6 years ago

this one is for three.js https://github.com/vanruesc/octree-helper/blob/master/README.md

another https://github.com/gkjohnson/threejs-octree

X3msnake commented 6 years ago

https://www.shapeways.com/forum/t/converting-voxel-data-to-supported-3d-format.1931/

ISOSURF https://mi.eng.cam.ac.uk/Main/GMTSoftware

NardJ commented 6 years ago

Cool stuff. Maybe something for the next version. (First I am planning to complete the slicer and voxel viewer itself.)

X3msnake commented 6 years ago

http://borg.ensc.sfu.ca/research/fdoct-gpu-code.html

In this paper, we describe how to highly optimize a CUDA based platform to perform real-time processing of optical coherence tomography interferometric data and 3D volumetric rendering using commercially-available cost-effective graphic processing units (GPUs). The maximum complete attainable axial scan processing rate (including memory transfer and displaying Bscan frame) was 2.24 megahertz for 16 bits pixel depth and 2048 FFT size; the maximum 3D volumetric rendering (including B-scan, en face view display, and 3D rendering) rate was ~23 volumes/second (volume size:1024x256x200). To the best of our knowledge, this is the fastest processing rate reported to date with a single-chip GPU and the first implementation of realtime video-rate volumetric OCT processing and rendering that is capable of matching the acquisition rates of ultrahigh-speed OCT.

X3msnake commented 6 years ago

processing discourse octree library https://github.com/thwegene/OCT/blob/master/README.md

X3msnake commented 6 years ago

From Laser Scanning to Finite Element Analysis of Complex Buildings by Using a Semi-Automatic Procedure

Cloud2FEM (Point Cloud 2 Voxel)

https://www.researchgate.net/profile/Alessandro_Lambertini/publication/280548230_From_Laser_Scanning_to_Finite_Element_Analysis_of_Complex_Buildings_by_Using_a_Semi-Automatic_Procedure/links/55b89ad708aed621de05eebb/From-Laser-Scanning-to-Finite-Element-Analysis-of-Complex-Buildings-by-Using-a-Semi-Automatic-Procedure.pdf?origin=publication_detail

X3msnake commented 6 years ago

https://github.com/cagcoach/BlenderPlot/

A script for plotting voxel diagrams using Blender

Video Tutorial: https://www.youtube.com/watch?v=vrxsk6D1KhQ&feature=youtu.be

X3msnake commented 6 years ago

https://www.paraview.org/overview/

ParaView is an open-source, multi-platform data analysis and visualization application. ParaView users can quickly build visualizations to analyze their data using qualitative and quantitative techniques.

Can read Voxel Data in XYZ format

https://www.youtube.com/watch?v=UwKFg0yOlCA&t=45s https://www.youtube.com/watch?v=jbq26vWdNdE

X3msnake commented 6 years ago

http://fiji.sc/ Fiji is an image processing package—a "batteries-included" distribution of ImageJ, bundling a lot of plugins which facilitate scientific image analysis.

https://imagej.net/plugins/3d-viewer/index.html https://imagej.net/3D_Viewer This plugin offers hardware-accelerated visualization possibilities for image stacks, using the Java 3D library. Stacks can be displayed as texture-based volume renderings, surfaces or orthoslices.

image

X3msnake commented 6 years ago

PAPER: Voxel-based Solid Models: Representation, Display and Geometric Analysis https://pdfs.semanticscholar.org/b2ec/9d0c9fadba4174e1ae5d29fccb7b344dc365.pdf

X3msnake commented 5 years ago

following this thread in FB group here is another cat scan software to investigate

https://www.cti.gov.br/pt-br/invesalius/nova-versão-invesalius-31

This one does allow for importing arbitrary images into a full 3D reconstruction Youtube

X3msnake commented 5 years ago

OrtogOnBlender add-on: Import DICOM voxel data on Blender

X3msnake commented 5 years ago

ITK snap, another CAT rebuilder

NardJ commented 5 years ago

Voxel Engine in C++

NardJ commented 5 years ago

BinVox Editor could also be a good starting point. Some python code at https://github.com/dimatura/binvox-rw-py.

X3msnake commented 5 years ago

@NardJ Invesalius is actually written in python

https://github.com/invesalius/invesalius3/tree/master/presets/raycasting

NardJ commented 5 years ago

Goxel claims to be unlimited, but upon testing a large size it crashes.

MagicaVoxel won't allow larger objects (in the editor) than 126x126x126. It seems that it is possible to create a world/scene with multiple objects and this of larger dimensions. MagicaVoxel claims being limited to rendering volumes of 2048x2048x1024 (But not that many solid voxels.)

(Qubicle costs money.)

NardJ commented 5 years ago

Did a test converting Photon file to STL file. It works, but takes a long time and generates large files (GBs). Slic3r could not load file due to memory issues and crashed. Best route for voxelviewer is raycaster.

NardJ commented 5 years ago

Another program to reconstruct a model from slices: https://www.slicer.org/, but slow/unusable on my laptop.

X3msnake commented 5 years ago

yes def raycast for visualizationand we need to compress the data with octree and prpbably fractal compression. also would help to use only the outside voxels of a model

No dia domingo, 13 de janeiro de 2019, Nard Janssens < notifications@github.com> escreveu:

Did a test converting Photon file to STL file. It works, but takes a long time and generates large files (GBs). Slic3r could not load file due to memory issues and crashed. Best route for voxelviewer is raycaster.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Photonsters/PhotonFileEditor/issues/83#issuecomment-453855432, or mute the thread https://github.com/notifications/unsubscribe-auth/AKke-oUPsxEZ7SGWYx63k4dSyRG4NIebks5vC4ARgaJpZM4VxViQ .

-- Com os melhores cumprimentos, Vinicius Silva