The Three.js already provides example for previewing STL object in ASCII and Binary format, however I'm wondering how could I ready the volume, weight and density of the object itself?
Any hints will be helpful especially if three.js api provides as functionality?
Thank you in advance.
Tod Canovic
I guess your question is more : How to calculate the volume of a mesh, because the weight is related to the density of your object and you are the only one to be able to know what would that mesh represent and what material it would be made of.
Concerning the mesh volume calculation, there's already an answer to this question here : https://stackoverflow.com/a/1568551/2940964
Hope this helps
Related
I created an object and I want to change dynamically the geometry of that object. the only answer I could find so far was to implement scaling on that object, but it's not what I'm looking for, because it requires constant calculation and it's a bad solution for me. I will be happy to hear any tips and suggestions.
Using scaling is one of the fastest ways to change a geometry, as it only changes one of the parameters already used in the projection calculations. Other generic ways of modifying a geometry will be significantly slower, as every vertex needs to be updated and transferred to the GPU.
wondering if I a just don‘t see it in the docs, but how do I know which vertex belongs to which corner of my geometry (e.g. BoxGeometry)?
Is there any documentation telling this in general?
Thanks, fwerre
Isn‘t this a general interest, to be able to address certain vertices (and to know where they are)?
Somebody knows how it's possible to have so good quality for the 3D Objects like here http://showroom.littleworkshop.fr/? The objects are exported at this quality from 3DsMax or Blender or something similar, or the quality it's improved in threejs? As far I saw, the project was created with threejs. Any information regarding this project it will be helpful.
Thank you.
Question of quality is subjective. A better question would be "how can I create a scene using three.js with photo-realistic lighting and materials".
So here's an answer to that. There are a few points that make the example you provided look good:
1 - lighting. The example uses a mixture of direct and ambient lighting.
It is practically impossible to generate such lighting in real time in three.js (or any other 3d package for that matter) with the current state of the art on commodity hardware. So, you need to use light-maps. Light maps are pre-rendered textures of light and shadow, they can take a long time to generate, but look incredible, as demonstrated by example you mentioned. You can use Blender's Cycles renderer to generate light maps using "Bake" feature. The topic of lightmap generation is really outside of the scope of the question.
2 - Physically based materials. This is used to refer to material models that have excellent representation of real-life materials beyond "plastic". Three.js had at least 1 such maretial: StandardMaterial which is based on Metalness/Roughness/Albedo model (https://threejs.org/examples/?q=material#webgl_materials_standard)
good luck!
Turn on Antialias for better quality of rendering it works great
Also use lights as per requirement and camera view
I have been using Three.js for a couple of weeks now and am really blown away by the power of this library!
Now, I would like to leverage it in order to run raytracing simulations for lower frequencies than light (RF). I figure it should be possible to alter or create new lights that would represent the sources of RF waves and then write a specific renderer that would take into account the interference aspects that apply in the RF context.
Is that the right approach? If so what functions/libraries should I focus on? Maybe all the raytracing/raycasting is already done and can be reused with little modification?
Any help appreciated!
Thanks
M.
Yes depending on what domain you are modelling, radiometric simulations can be done with ray tracing. Photometric renderers are Radiometric renderers but with the domain restricted to the visible spectrum. Usually you can simply replace words like 'Lux' with 'Flux' which can give the indication that the domain being modelled can be outside the visible spectrum.
Bear in mind, depending on what you wish model, you need to assume that the RF waves will behave in a similar vein to a ray/photon. i.e Diffraction or movement through vector fields will require intelligence beyond standard path tracing, instead look at ray marching used in volumetric renderers. Volumetric ray tracing is more akin to finite element analysis since we don't just calculate the intersection point of the ray, but also consider the ray propagation through a medium (vector field) and the effect this medium has on the resultant ray path.
P.S Sorry can't help with specifics of Threejs :( Never used it.
I have a set of Points in 3D space.
The image below is an example:
I would like to turn these points into a surface. I just know the X,Y and Z values of the points.
For example, check out the image below, which shows a mesh of a human face generated from points in 3D space.
i googled so much but, what i found is some images and explaination
but no one has explained with practical aspect and practical example.
is there any good or best algorithms which help me to solve this problem.
Please....
Thaks...........
You want to do a Delaunay-Triangulation. See example application here: http://www.geometrylab.de/VoroGlide/.