I have a very simple scene and I want to export a bezier curve / nurbs curve to JSON. Nothing I do seems to export anything. I can export meshes etc.
I'm sure I have done this in the past but I have no idea how to do it anymore.
Thanx a lot!
Related
I have a Blender file that contains some curves shapes.
These curves have some shape keys and I'd like to export it to a glTF file to be consumed by Three.js.
The problem is that exported glTF does not include the shape keys animations for the curves.
The glTF 2.0 format supports triangle meshes, lines/edges, and points. It does not directly support curves or NURBS. Blender's glTF exporter does have the ability to export all three primitive types (in recent versions) or to bake static curves and surfaces to meshes, but I don't think that it can bake animations on those curves. I think you would need to do that before exporting from Blender, and I'm not sure how — https://blender.stackexchange.com/ might be the place to ask on that topic.
As it is well known, threejs.org recommends using gltf for models.
I'm trying to use a simple shape (plane) with a texture.
When I export from Blender 2.97b the shape appears 180 degrees rotated so I rotate the shape in Blender to avoid rotating it in three.js.
The real problem is that the texture always appears rotated vs the mesh, no matter what I tried. Has anyone imported gltf from Blender? I wonder if anything will ever work properly when using Blender...
Blender export settings I use for gltf 2.0:
export selected only
convert z-up to y-up
export texture coordinates
export normals
export materials
I have installed pipeline via node.js and each time I convert and compress to .glb based on the Khronos info here:enter link description here
I also use a Three.MeshBasicMaterial and assign the png image as a map.
I'm trying to load a skinned mesh from blender into a THREE.js scene, but it... looks a little odd:
There is a skeleton that was loaded from the animation only, the mesh modified for the game, and there is a little one that is directly loaded from the three.js ObjectLoader.
It's supposed to look more like this (from blender):
I found it!
when exporting from blender, I modified the number of influences to 4. It appears that some vertices were being modified by more than one bone and therefore when only two influencing bones were exported it distorted.
I had create a dice in blender and then export it to three.js but when I load it in the scene then it showing up inverted.
http://www.sggame.bugs3.com/dice.html
I done it in blender software by flip the normals inside of the object and recalculate the normals. then agiain export it to three.js
I'm wondering why the mesh in lesson 10 looks more three-dimensional then mine. My meshes look like they have no surface and no depth. Here is an example picture:
Any suggestions? I don't see if there is a difference in loading the meshes (xtk's version compared to mine). I think it doesn't depend on the (type of) data because in ParaView it looks more three-dimensional.
It is because your mesh files have no normals.
Paraview will create normals if you don't provide it - not XTK -
You can generate normals for your meshes fairly easily with VTK:
http://www.vtk.org/doc/nightly/html/classvtkPolyDataNormals.html
1-vtkPolyDataReader
2-vtkPolyDataNormals
3-vtkPolyDataWriter
Maybe you can export the meshes from Paraview or Slicer? Maybe the exported meshes will contain the normals...