-
-
Notifications
You must be signed in to change notification settings - Fork 35.7k
Maya exported json file not able to play animation and display multiple texture #9997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @mrdoob , |
Hi @mrdoob |
/ping @ascloutier |
The latest plugin code on the dev branch should have working transparency. From what I can tell it should also be in the r82 release. I can look into it again. The values in your file definitely look wrong, but with out seeing the maya file it's hard to know for sure where the problem is. I will say that, while I've managed to make some improvements, the maya plugin is still not in very good shape. I would like to rewrite it from scratch but I'm not going to be able to even start that until the new year and I'm not exactly sure when. Until that happens, animation doesn't seem like it will work. In the way it was originally written I've never been able to successfully export animations. The person (people) who wrote the Blender plugin did a much better job there than was done on the Maya plugin. You may have more luck exporting from Blender until I can (hopefully) get around to creating a new Maya plugin. |
Hi @ascloutier |
Just giving this a bump, I tried adding my own tracks to threeJsFileTranslator.py with startFrame and endFrame and name. Then going through in JS after and create the AnimationAction/AnimationClips/AnimationTracks for each node by pulling them out of the one animations array the plugin gives you now in the export. It's really complicated though and had to resort to running my models through Blender.
This part worked at least. I was using empty group objects nested under one called animations that lived in the root. The nested groups had the attributes startFrame, endFrame added, the name of the node as the AnimationAction name. Using the newer Maya versions 'Anim' tab would be a much better option. Though, having them all on one timeline and nodes like these would not be the end of the world and actually more straight forward in a way. That is how Torque did it anyways :) |
hi <html>
<head>
<script src="three.js"></script>
<script src="three.min.js"></script>
</head>
<body>
<script>
var camera, scene, renderer;
var geometry, material, mesh;
init();
animate();
function init() {
camera = new THREE.PerspectiveCamera(35, window.innerWidth / window.innerHeight, 0.01, 1000 );
camera.position.z = 1;
scene = new THREE.Scene();
renderer = new THREE.WebGLRenderer( { antialias: true } );
renderer.setClearColor(0*000000);
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
var light= new THREE.AmbientLight(0*ffffff , 0.5);
scene.add(light);
var light2= new THREE.PointLight(0*ffffff , 0.5);
scene.add(light2);
var loader= new THREE.JSONLoader();
loader.load('untitled.json', handle_load);
function handle_load(geometry, material){
var mesh= new THREE.mesh(geometry, material);
scene.add(mesh);
mesh.position.z = -10;
}
function render(){
renderer.render(scene, camera);
requestAnimationFrame(render);
}
render();
}
</script>
</body>
</html> |
@samiasultan Please don't post your help request here. Use the forum or stackoverflow instead. |
Hi Devs,
I am trying to display a 3D model using .json file with the help of JSONLoader, but it display only black screen. I have exported .json from 'maya exporter plugin'. I want to load all its texture from json file only. I have tried several ways but still result is far away? I have spend lots of time on Google, Stack Overflow, Clara.io but not getting any relevant answer. I already added this issue on SO, but not found any solution.
Here it is link :
I am being confused that is it possible to render maya exported json with Three.js till current release or not. Please help me to sort out this issue.
Here it is my json file:
new-heart.txt
Here it is my json (material array):
Here it is my code:
Here it is my screen shot:
Description of the problem
Three.js version
Browser
OS
Hardware Requirements (graphics card, VR Device, ...)
The text was updated successfully, but these errors were encountered: