Git Product home page Git Product logo

cnr-isti-vclab / meshlabjs Goto Github PK

View Code? Open in Web Editor NEW
227.0 227.0 51.0 71.64 MB

A javascript client based mesh processing tool. Built using vcg library, emscripten and webgl

Home Page: http://www.meshlabjs.net

License: GNU Affero General Public License v3.0

Shell 0.01% HTML 0.53% C++ 0.36% JavaScript 98.90% ActionScript 0.02% CSS 0.12% Batchfile 0.01% QMake 0.01% GLSL 0.05% C 0.01%

meshlabjs's People

Contributors

cignoni avatar francescodesogus avatar gabryxx7 avatar gmdit avatar idini avatar maggio-a avatar marcoloddo avatar nicolettiant89 avatar sgiammori avatar stefanogabriele 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

meshlabjs's Issues

Phong shader does not compile on chrome!

On OSX it works regularly on firefox and safari but gives the following compilation error on chrome:

THREE.WebGLShader: Shader couldn't compile.
THREE.WebGLShader: gl.getShaderInfoLog() ERROR: 0:73: '=' : global variable initializers must be constant expressions 
WARNING: 0:79: '=' : global variable initializers should be constant expressions (uniforms and globals are allowed in global initializers for legacy compatibility) 

THREE.WebGLShader: gl.getShaderInfoLog() WARNING: 0:41: '
' : extension directive must occur before any non-preprocessor tokens 

THREE.WebGLProgram: shader error: 0 gl.VALIDATE_STATUS
THREE.WebGLProgram: gl.getProgramInfoLog()invalid shaders
 exectution time 167 ms

Show Rendering Stats

ThreeJS has a small stat showing library for showing fps etc...
Not sure if we should use that or just the fps number

Parameter Widget: Point

Add a parameter widget for giving in input a 3D point or a 3D vector.
It should be able to offer the possibility to choose:

  • the position of a point over the surface (by picking)
  • the normal of a point over the surface (by picking)
  • the current viewing direction

Phong Shading Refactoring

Currently phong shader is a dump of the threejs phong shader. It is huge...
It should be reduced to the barely needed functionalities in the beloved spirit of reducing the code...

Texture Support

We should definitely have it.

In the Color dialog of the rendering tab there should be something to show the name of the file of the texture and the possibility to use the texture as base albedo color (togheter with uniform/pervertex/perface)

As a dedicated 2D ui space for viewing images and parametrizations we use one other tab called "texture" where we show the texture(s) of the current mesh. there is a button to show the parametrization in the image space.
There are Rulers on the side of the image (for uv coord) and the image is draggable and zoomable

Optionally we need a space to list all the textures associated with a mesh
it could be a combobox in this tab or a subtree element in the layer list.

Parameter Widget: Layer

Add a parameter widget to choose one of the available layers as a input parameter for a filter.
This is fundamental for algorithms that take in input two meshes and make something (like computing the Hausdorff distance)

Trackball Reset

We need a way to reset the trackball to the initial position

Rendering Default for Point Clouds

When a point cloud is added to the scene the default rendering mode should be Points and not filled.
Another (Much BETTER!) possibility could be that we have a clear api to turn on/off a rendering pass for a given mesh from inside the a filter. E.g. from the sampling filter when we have just created the newmesh we turn on the "Points" rendering pass for it.

Rendering Tab Parameter Unclear Association

In the rendering tab once you have opened the parameter for a given rendering pass (.e.g wire) it is no more clear to what rendering pass this parameters refer to...
Some visual cues should be added to maintain the relation between these parameters and the originating rendering pass.

Undo

It has to be implemented in a robust and complete way.

We store a DAG (direct aciclic graph) storing the dataflow representing all the actions done over our document (set of meshes).
each action can involve none, one or more current layers and it is stored togheter with its parameters
for each step we memorize a copy of the changed nodes.

Visualizing this dataflow graph could be useful (but left to future). We just need the possibility of navigating it back and forth.

Quoted Box

Quite similar to the MeshLab one: A bounding box of the current mesh that is also quoted, e.g. it has the coords values shown on the axes.
There are two tricky parts:

  • Choosing the right edge where to display the numbers. It is a view dependent choice that should choose the best (out of the possible 4) edge, i.e. the most external one.
  • Pretty format the numbers. Choose the right amount of numbers to be shown, again it is a view dependent choice, and it is a bit tricky (you have to choose the right subdivision for ticks so that nice numbers are always shown. It should be better than the meshlab one:
    • number could be rotated in 2D in the best way (perpendicular to the axis)
    • numbers could be fully 3D (lying in the plane of the right bbox face)

Geometric Info Overlay Plugin

An overlay that show on the 3D screen geometric info on the mesh (bbox size, volume, surface area, center of mass)

Documentation: Filter List

Use the tooltip text to automatically generate a (static) HTML page with all the available filters. This should be added to the pipeline of generating stuff (compiling cpp, compiling doc, compiling filter list)

Layer Managment

Delete Layer
Duplicate Layer
Flatten Layer

implemented as filters.

Parameter Widget: Relative Float

Like in meshlab we need a way to input a number that can be easily inserted as a percentage of the bbox of the scene
screen shot 2015-08-07 at 8 24 37 am
Like in the above example the two edit field are connected and continuously updated: the left editbox contain the value in world unit (as common float parameter input) and the right one contains the same value expressed as a percentage of the diagonal of the boundingbox of the scene. When the user change one value the other one is updated accordingly.
The widget returns the value in world unit

When specified we imagine something like that

vertRatioWidget = builder.RelativeFloat({
            defperc=1.0,
            label: "Vertex Ratio",
            tooltip: "Probability that a vertex is randomly selected"
        });

where defperc is the default percentage shown in the widget at the start

Log window short

In firefox and safary on osx the lower left log window use only the first two lines
(and also the font is different...)
screen shot 2015-07-18 at 12 17 56 pm

Add another class of plugins: tools

There is another class of plugins that should be added with its own tab: Tools

'Tools' are pieces of functionality that include direct interaction with the mesh itself by mean of mouse actions:

  • Selection Tool
  • Inspection tool
  • Measuring tool
  • Moving tool
  • Painting
  • Fixing/Smoothing

Each tool plugin should manage mouse input,
Should have a clear start/stop
The tool tab contains an icon for each tool.
The first icon is a trackball and it allow to return to the standard browsing mode. The space below the trackball is used for tool parameter.
Somewhere on the screen there should be a remainder of what tool mode the system is.

To allow a robust way of implementing undo each tool can modify the mesh(es) only by mean of c++ functions that take in input a mesh and some parameters like camera and finalized mouse input (e.g. the selection tool works by calling a c++ function that take in input the view parameters and the on screen rectangle given by the user).

Basic Hole filling

Hole filling:
Following the basic pieces in library provide a filter that fills a hole and, after the closure of the hole
it performs some remeshing in order to improve the generated triangulation.
Remeshing should be done by iterating refinement, smoothing and edge-flipping until certain conditions on the generated triangles are met.
Eventually at the end displace the vertex of the surface in order to ensure better boundary continuity.

Selection Rendering

Rendering that shows the selected elements
Parameters are:

  • color (default red)
  • float transparency
  • face boolean (default: true)
  • vert boolean (default: true)
  • vert size (size of the dot used to show selected vertices)

It is implemented using two auxiliary cpp functions that builds geometries that will be added to the threejs scene.

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.