mrdoob / three.js

JavaScript 3D Library.
https://threejs.org/
MIT License
102.81k stars 35.38k forks source link

Can't run jar compiler in windows x64 #332

Closed aminnaggar closed 13 years ago

aminnaggar commented 13 years ago

Hey, I've been using the 3ds Max script to export my OBJ's so far with plenty of success.

Now I however I'm trying to get some animation going, but the exporter in 3DS MAX doesn't support animations afaik. So after doing a bit of digging I found a bunch of steps from an old issue.

These were the instructions given by @guardianResearch : step 1 - find or create an animated model in blender - for example myawesomemodel.blender step 2 - create a new folder to hold the base model, all morphs and images step 3 - to create the model - select only the mesh and export to OBJ with the usual 3js requirements (look in the python convert_obj_three,py comments for OBJ export settings) to create myawesomemodel.obj (and MTL for materials) step 4 - to create the morphs - now export again to obj but also click 'export animation' this will create a BUNCH of morphs in your folder - myawesomemodel_00001.obj, .... step 5 - use the python obj converter like this > python path_to_converter/convert_objthree.py -i myawesomemodel.obj -o myaweseommodel.js -m "myawesomemodel*.obj" myawesomemodel.js will be your animated model notice the quotes - they are importantalso note the number of frames - you will need to change the keyframes variable in the render cycle to match your model's number of morphsYou may also want to fiddle with the duration setting which is how long the cycle lasts hope that helps


Anyways I tried running the compiler as he specified but everytime I run the jar it doesn't do anything. I also went to http://code.google.com/p/closure-compiler/downloads/list as was specified in the README file and downloaded the latest version but that didn't help neither.

When I tried to run it in Eclipse I got this error:

Buildfile: C:\Users\mino\Learning\WebGL\three.js-89a4d0e\utils\build.xml build:

BUILD FAILED C:\Users\mino\Learning\WebGL\three.js-89a4d0e\utils\build.xml:8: Execute failed: java.io.IOException: Cannot run program "python": CreateProcess error=2, The system cannot find the file specified

Total time: 189 milliseconds

Any light you shed on the topic would be very helpful. Thank you in advance.

mrdoob commented 13 years ago

Do you have python installed?

aminnaggar commented 13 years ago

Alright I installed python after you mentioned it and still had trouble. So for those of you out there who can't get it to work. Create a small test.bat file or something like that and you can follow this format:

C:\Python\python.exe convert_obj_three.py -i squishedSpheres00.obj -o squishedSpheres.js -m "squishedSpheres*.obj" pause

the main thing to look out for being entering the full path "C:\Python\python.exe" as opposed to just typing "python"

Also, you can download this script (http://www.scriptspot.com/3ds-max/scripts/mass-exporting-of-selected-objects-in-3dsmax) which helped me export my object into sequential obj files from my 3DS MAX time line, with ease.


ok now that I am able to use the script to create a morphing JSON file. I found a problem that I thought maybe you can help me with.

1: The object doesn't morph like I designed it to in 3ds Max. so this is what I designed http://cl.ly/3z0N002C1b2X3w3L361o but this is what I got http://cl.ly/2b0j0C11160G1R2z1M1H notice how the mesh bends in the wrong direction in webGL. Is there any way I can help guide it a bit ?

I don't know how to make this easy for you but I copied my code into a fiddle http://jsfiddle.net/CjYu9/


Thank's again for all the help

mrdoob commented 13 years ago

Uhm, that's a hard thing to debug... Have you tried to load the .obj's independently in Blender or Max to make sure they look good? Does the code match the number of keyframes your animation have?

Otherwise, I don't think we can do much unless you can zip the whole thing and upload it somewhere.

mrdoob commented 13 years ago

Actually, do you mind opening another issue for that? The issue in the topic has been solved now.

aminnaggar commented 13 years ago

Thanks mrdoob :)