Three.js dentmodifier - three.js

I have been trying to use dent modifier for 3D vehicle loaded using objmtl loader. The model is loaded using multiple obj and mtl files. While I am trying to create dent it is not crating the dent on selected portion. Also when I call computeFaceNormals the model itself is getting distorted. I am not sure if the issue is in my obj files itself. I have attached all obj files as well as the html that I am trying. Can someone please guide me where I am going wrong #mrdoob
issue can be found at http://tinyurl.com/oc4j76a

Related

Issues adding texture to Reality Converter?

Anyone having issues with Reality Converter by Apple. Mainly, when I add an .obj file, it’s able to display the white object. However, when I go ahead and add a texture .png files into the Materials folder, nothing gets updated. I end up with a plain white 3d object (even after restarting/exporting).
The only way it works is if I upload a .gITF folder, where it will actually add in the textures/color.
Not sure if this is a glitch? Or if I’m doing something wrong?
In order to apply a texture to .obj file you need not only a texture file but also its inseparable companion .mtl file (Material Template Library) – a special material definitions file for .obj.

Issue with Model Derivative translation

We have been using Model derivative translation to convert our textured mesh obj files to svf format to display in the forge viewer for many months now. For the past 3 days, the translation results in a weird mesh in the viewer. If we use meshlab to open our obj files, they look perfectly fine.
Have there been any updates? Is there something we can check?
Used meshlab to view the obj file to make sure our texture model is OK.
Attaching snapshot of the OBJ model viewed in viewer.autodesk.com
Update May 29th:
Looks like the issue is fixed. This problem was similar to Translation of zip file (contains object and material file with different colors) results to a viewables of single color.

Cinema 4D animations in Three JS

I've been trying to set up a decent workflow for Cinema 4D and Three JS. The problem is with animations. So while I do get the models to load in .obj and .dae, animations are not working. I understand there are some limitations to how Cinema exports the file and how Three understands them.
I've also tried to include Blender into the workflow, but it unfortunately distorts the animations, and for some reason does not output working .json when I've imported them from a Cinema project.
Anyone here who figured this one out? Many thanks.
So I managed to get simple PSR-animations working without having to touch Blender, using this Collada converter:
http://rmx.github.io/collada-converter/preview/examples/convert.html
You'll also have to modify the xml tags in the file:
https://superuser.com/questions/148024/how-to-import-mesh-animation-from-cinema4d-into-blender
Unfortunately it does not seem to handle morphs. For that I had to resort to Blender, where I created the model in C4D, imported it in Blender, baked it, then exported it as .json.
I would be very happy if this could be a little bit more simple! : )
You can try my Cinema 4D plugin:
https://github.com/BlackDice/Cinema4D-Threejs-Exporter

Three.js ColladaLoader failed to load model: some elements seem to have no vertices

I tried to import models from the 3D Warehouse, but some models fail to load (error in ColladaLoader.js (line 2808)
Uncaught TypeError: Cannot read property 'input' of null). I experienced this error with a lot of different models from 3D warehouse.
I prepared a fiddle (elcsiga/rep1z1xt/4), it loads the model from a different domain via ajax (CORS violation), however it worked me in Chrome.
A fully working example (fails to load model):
http://projecthost.hu/webview/jsfiddle/metro.html
Exactly same code with the monster model from three.js repository (it works):
http://projecthost.hu/webview/jsfiddle/monster.html
The collada model is available here: projecthost.hu/webview/jsfiddle/metro.dae
First I tried to download it as a .kmz file, unzip and use the .dae file in it directly. Additionally, I tried to download the .skp file, opened it in Sketchup and exported it into .dae format, but got the same error in ColladaLoader.js.
Do these models contain an unsupported geometry, or is it a bug in Collada loader?
Thanks.
The Model don't have any vertices so the Loader cant create a geometry. (maybe I'm wrong)
You created the Model via Google SketchUp right?
https://github.com/mrdoob/three.js/wiki/Using-SketchUp-Models
find
var vertexData = sources[ this.vertices.input['POSITION'].source ].data;
in ColladaLoader.js, replace it with
var vertexData = [];
if (this.vertices && this.vertices.input['POSITION'].source) {
vertexData = sources[ this.vertices.input['POSITION'].source ].data;
}
this can fix my problem by avoiding empty vertices. It may lost some info of dae file, but it won't harm ColladaLoader.js's function.

Maya animation in Three.js

I'm trying to get my Maya animated walk cycle into three.js. I have exported the animation with the model into the .dae format, changed the path to my model in the example. My model is being loaded, but it doesn't do any animation. What could be the problem? My main goal is to create a character who walks with WASD as his walk cycle is being played.
Any suggestions where should I start?
If you are using collada loader, the animation should work without any problem. I have used the collada loader to animate one of my models using three.js, and it works like charm.
A better example to take a cue on how to make it work is webgl_loader_collada_keyframe.html .
Converting to the DAE format and then to JS is rife with problems, and it rarely works for animations. THREE.js comes with an exporter for Maya, but it only works for static models.
I have created an updated version that also supports exporting rigged and animated models. It doesn't require any intermediate steps: it just outputs straight to a .JS file. We have a pull request to integrate the updated exporter with the THREE trunk, but if you want to get the new and improved exporter immediately you can get it from this repository: https://github.com/BlackTowerEntertainment/three.js/tree/maya_animation_exporter. The exporter files are in utils/exporters/maya.
Hope this helps.

Resources