-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Incorrectly exported a project from Blender #9454
Comments
@WestLangley ??? |
@BenCidPerez Sounds like we're not handling the cameras correctly? |
@mrdoob Don't think it's only a camera issue. The light source also is getting flipped by 90° - the scene export is not converting from blender coordinates (z-up) to three.js (y-up), so everything is on it's side unless you rotate it manually. |
Thanks! |
Yesterday, almost finished modeling my first 3D game and realized that the situation is hopeless. |
@acopalipsis I'm having a bit of a hard time totally understanding the problems you are having. Our company has created several prototypes and games for customers using a combination of blender and three.js and although the exporter most definitely got some problems, it hasn't been terrible - compared with the blender - support of other webGL-based 3D-frameworks (and believe me, I think we tried them all) it is actually the framework that works best with blender. Granted, you maybe trying to use some advanced features, thereby running into problems we did not encounter yet - another reason why some example-files could help understanding the issues. |
@BenCidPerez create new project -> delete cube -> create circle -> edit mode hotkey (E, 0, enter, alt + M, at center) -> file -> export -> threejs json -> http://threejs.org/editor/ -> import .json -> create light... -> scene is empty. The view from below - you will see a circle. And so it is always. And in my code I'm loading with ObjectLoader. And this is only part of the problem. The main problem with partially smoothed objects. If you try to restore the normal in threejs, smooth becomes the whole object. But I still decided to import it into threejs as .obj... But what about animation? For the animation you want to export from blender as threejs .json? |
If you turn on "backface culling" in blender, you will see, that your normals are wrong already in the blender file. They are all pointing down, so in the scene, if you look from above, you won't see anything, unless you use "THREE.DoubleSide" on your material, thereby disabling backface culling for that material specifically. That is not the fault of THREE.js - your model is just created that way.
@acopalipsis You need to split the edges by duplicating the vertices of the edge. Easiest way to do this, is using blender's edge-split modifier. This is not THREE.js specific. But I don't think this is the right place for a general "Creating game assets in Blender" discussion. I can't say anything about the three.js editor - never used it. We export everything as JSON from blender and import it into our Three.js projects. Maybe you want to take a look at some Blender-related tutorials, and afterwards some export-related ones, like this one here: |
@BenCidPerez specifically, in this case You are right. |
The JSON Blender exporter has been removed with Also see: https://threejs.org/docs/#manual/introduction/Loading-3D-models |
A project in Blender -
three editor (note the arrows to the active camera) -
the render shows a black screen on that picture is not attached.
Turn around 180 degrees (note the arrows to the active camera) -
The source of light from above, lighting is the side.
Is it possible to fix this and how?
The text was updated successfully, but these errors were encountered: