Skip to content

Commit 2a0d0bb

Browse files
authored
Merge pull request #14117 from donmccurdy/deprecate-blender-exporter
Remove Blender exporter, add 'Loading 3D models' guide.
2 parents 64a1fc9 + 44aaa9c commit 2a0d0bb

File tree

104 files changed

+140
-11588
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+140
-11588
lines changed

docs/list.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ var list = {
1010
"How to run things locally": "manual/introduction/How-to-run-things-locally",
1111
"Drawing Lines": "manual/introduction/Drawing-lines",
1212
"Creating Text": "manual/introduction/Creating-text",
13+
"Loading 3D Models": "manual/introduction/Loading-3D-models",
1314
"Migration Guide": "manual/introduction/Migration-guide",
1415
"Code Style Guide": "manual/introduction/Code-style-guide",
1516
"FAQ": "manual/introduction/FAQ",

docs/manual/introduction/Animation-system.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ <h3>Animation Clips</h3>
3535
<p class="desc">
3636

3737
If you have successfully imported an animated 3D object (it doesn't matter if it has
38-
bones or morph targets or both) - for example exporting it from Blender with the
39-
[link:https://github.com/mrdoob/three.js/tree/master/utils/exporters/blender/addons/io_three Blender exporter] and
40-
loading it into a three.js scene using [page:JSONLoader] -, one of the geometry's
41-
properties of the loaded mesh should be an array named "animations", containing the
42-
[page:AnimationClip AnimationClips] for this model (see a list of possible loaders below).<br /><br />
38+
bones or morph targets or both) for example exporting, it from Blender with the
39+
[link:https://github.com/KhronosGroup/glTF-Blender-Exporter glTF Blender exporter] and
40+
loading it into a three.js scene using [page:GLTFLoader] — one of the response fields
41+
should be an array named "animations", containing the [page:AnimationClip AnimationClips]
42+
for this model (see a list of possible loaders below).<br /><br />
4343

4444
Each *AnimationClip* usually holds the data for a certain activity of the object. If the
4545
mesh is a character, for example, there may be one AnimationClip for a walkcycle, a second

docs/manual/introduction/FAQ.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h2>Which 3D model format is best supported?</h2>
1616
The recommended format for importing and exporting assets is glTF (GL Transmission Format). Because glTF is focused on runtime asset delivery, it is compact to transmit and fast to load.
1717
</p>
1818
<p>
19-
three.js provides loaders for many other popular formats like FBX, Collada or OBJ as well. Nevertheless, you should always try to establish a glTF based workflow in your projects first.
19+
three.js provides loaders for many other popular formats like FBX, Collada or OBJ as well. Nevertheless, you should always try to establish a glTF based workflow in your projects first. For more information, see [link:#manual/introduction/Loading-3D-models loading 3D models].
2020
</p>
2121
</div>
2222

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<base href="../../" />
7+
<script src="list.js"></script>
8+
<script src="page.js"></script>
9+
<link type="text/css" rel="stylesheet" href="page.css" />
10+
</head>
11+
12+
<body>
13+
<h1>[name]</h1>
14+
<br />
15+
16+
<p>
17+
3D models are available in hundreds of file formats, each with different
18+
purposes, assorted features, and varying complexity. Although
19+
<a href="https://github.com/mrdoob/three.js/tree/dev/examples/js/loaders">
20+
three.js provides many loaders</a>, choosing the right format and
21+
workflow will save time and frustration later on. Some formats are
22+
difficult to work with, inefficient for realtime experiences, or simply not
23+
fully supported at this time.
24+
</p>
25+
26+
<p>
27+
This guide provides a workflow recommended for most users, and suggestions
28+
for what to try if things don't go as expected.
29+
</p>
30+
31+
<h2>Before we start</h2>
32+
33+
<p>
34+
If you're new to running a local server, begin with
35+
[link:#manual/introduction/How-to-run-things-locally how to run things locally]
36+
first. Many common errors viewing 3D models can be avoided by hosting files
37+
correctly.
38+
</p>
39+
40+
<h2>Recommended workflow</h2>
41+
42+
<p>
43+
Where possible, we recommend using glTF (GL Transmission Format). Both
44+
<small>.GLB</small> and <small>.GLTF</small> versions of the format are
45+
well supported. Because glTF is focused on runtime asset delivery, it is
46+
compact to transmit and fast to load. Features include meshes, materials,
47+
textures, skins, skeletons, morph targets, animations, lights, and
48+
cameras.
49+
</p>
50+
51+
<p>
52+
Public-domain glTF files are available on sites like
53+
<a href="https://sketchfab.com/models?features=downloadable&sort_by=-likeCount&type=models">
54+
Sketchfab</a>, or various tools include glTF export:
55+
</p>
56+
57+
<ul>
58+
<li><a href="https://github.com/KhronosGroup/glTF-Blender-Exporter">glTF-Blender-Exporter</a> by the Khronos Group</li>
59+
<li><a href="https://github.com/KhronosGroup/COLLADA2GLTF">COLLADA2GLTF</a> by the Khronos Group</li>
60+
<li><a href="https://github.com/facebookincubator/FBX2glTF">FBX2GLTF</a> by Facebook</li>
61+
<li><a href="https://github.com/AnalyticalGraphicsInc/obj2gltf">OBJ2GLTF</a> by Analytical Graphics Inc</li>
62+
<li><a href="https://www.allegorithmic.com/products/substance-painter">Substance Painter</a> by Allegorithmic</li>
63+
<li><a href="https://www.foundry.com/products/modo">Modo</a> by Foundry</li>
64+
<li><a href="https://www.marmoset.co/toolbag/">Toolbag</a> by Marmoset</li>
65+
<li>&hellip;and <a href="https://github.com/khronosgroup/gltf#gltf-tools">many more</a></li>
66+
</ul>
67+
68+
<p>
69+
If your preferred tools do not support glTF, consider requesting glTF
70+
export from the authors, or posting on
71+
<a href="https://github.com/KhronosGroup/glTF/issues/1051">the glTF roadmap thread</a>.
72+
</p>
73+
74+
<p>
75+
When glTF is not an option, popular formats such as FBX, OBJ, or COLLADA
76+
are also available and regularly maintained.
77+
</p>
78+
79+
<h2>Troubleshooting</h2>
80+
81+
<p>
82+
You've spent hours modeling an artisanal masterpiece, you load it into
83+
the webpage, and — oh no! 😭 It's distorted, miscolored, or missing entirely.
84+
Start with these troubleshooting steps:
85+
</p>
86+
87+
<ol>
88+
<li>
89+
Check the JavaScript console for errors, and make sure you've used an
90+
<em>onError</em> callback when calling <em>.load()</em> to log the result.
91+
</li>
92+
<li>
93+
View the model in another application. For glTF, drag-and-drop viewers
94+
are available for
95+
<a href="https://gltf-viewer.donmccurdy.com/">three.js</a> and
96+
<a href="http://sandbox.babylonjs.com/">babylon.js</a>. If the model
97+
appears correctly in one or more applications,
98+
<a href="https://github.com/mrdoob/three.js/issues/new">file a bug against three.js</a>.
99+
If the model cannot be shown in any application, we strongly encourage
100+
filing a bug with the application used to create the model.
101+
</li>
102+
<li>
103+
Try scaling the model up or down by a factor of 1000. Many models are
104+
scaled differently, and large models may not appear if the camera is
105+
inside the model.
106+
</li>
107+
<li>
108+
Look for failed texture requests in the network tab, like
109+
<em>C:\\Path\To\Model\texture.jpg</em>. Use paths relative to your
110+
model instead, such as <em>images/texture.jpg</em> — this may require
111+
editing the model file in a text editor.
112+
</li>
113+
</ol>
114+
115+
<h2>Asking for help</h2>
116+
117+
<p>
118+
If you've gone through the troubleshooting process above and your model
119+
still isn't working, the right approach to asking for help will get you to
120+
a solution faster. Whenever possible, include your model (or a simpler
121+
model with the same problem) in any formats you have available. Include
122+
enough information for someone else to reproduce the issue quickly —
123+
ideally, a live demo.
124+
</p>
125+
126+
<p>
127+
TODO: Do we recommend model-related questions go to GitHub, Stack Overflow,
128+
or the Discourse forum?
129+
</p>
130+
</body>
131+
132+
</html>

utils/exporters/blender/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

utils/exporters/blender/README.md

Lines changed: 1 addition & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,3 @@
11
# Three.js Blender Export
22

3-
Exports Three.js' ASCII JSON format.
4-
5-
## IMPORTANT
6-
7-
The exporter (r69 and earlier) has been completely replaced. Please ensure you have removed the io_three_mesh addon from your Blender addons directory before installing the current addon (io_three).
8-
9-
## Installation
10-
11-
12-
Recommended Blender version **>= 2.73.0**
13-
14-
Copy the io_three folder to the scripts/addons folder. If it doesn't exist, create it. The full path is OS-dependent (see below).
15-
16-
Once that is done, you need to activate the plugin. Open Blender preferences, look for
17-
Addons, search for `three`, enable the checkbox next to the `Import-Export: Three.js Format` entry.
18-
19-
Goto Usage.
20-
21-
### Windows
22-
23-
Should look like this:
24-
25-
C:\Program Files\Blender Foundation\Blender\2.7X\scripts\addons
26-
27-
OR (for 2.6)
28-
29-
C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.6X\scripts\addons
30-
31-
### OSX
32-
33-
In your user's library for user installed Blender addons:
34-
35-
/Users/(myuser)/Library/Application Support/Blender/2.7X/scripts/addons
36-
37-
OR (for 2.79)
38-
39-
/Applications/Blender/blender.app/Contents/Resources/2.79/scripts/addons
40-
41-
### Linux
42-
43-
By default, this should look like:
44-
45-
/home/USERNAME/.config/blender/2.6X/scripts/addons
46-
47-
For Ubuntu users who installed Blender 2.68 via apt-get, this is the location:
48-
49-
/usr/lib/blender/scripts/addons
50-
51-
For Ubuntu users who installed Blender 2.7x via apt-get, this is the location:
52-
53-
/usr/share/blender/scripts/addons
54-
55-
56-
## Usage
57-
58-
Activate the Import-Export addon under "User Preferences" > "Addons" and then use the regular Export menu within Blender, select `Three.js (json)`.
59-
60-
61-
## Enabling msgpack
62-
63-
To enable msgpack compression copy the msgpack to scripts/modules.
64-
65-
66-
## Importer
67-
68-
Currently there is no import functionality available.
3+
> **NOTICE:** The Blender exporter for the Three.js JSON format has been removed, to focus on better support for other workflows. For recommended alternatives, see [Loading 3D Models](https://threejs.org/docs/#manual/introduction/loading-3d-models). The Three.js JSON format is still fully supported for use with [Object3D.toJSON](https://threejs.org/docs/#api/core/Object3D.toJSON), the [Editor](https://threejs.org/editor/), [THREE.ObjectLoader](https://threejs.org/docs/#api/loaders/ObjectLoader), [THREE.JSONLoader](https://threejs.org/docs/#api/loaders/JSONLoader), and [converters](https://github.com/mrdoob/three.js/tree/dev/utils/converters).

0 commit comments

Comments
 (0)