Skip to content

Commit

Permalink
Merge pull request #14117 from donmccurdy/deprecate-blender-exporter
Browse files Browse the repository at this point in the history
Remove Blender exporter, add 'Loading 3D models' guide.
  • Loading branch information
mrdoob authored May 29, 2018
2 parents 64a1fc9 + 44aaa9c commit 2a0d0bb
Show file tree
Hide file tree
Showing 104 changed files with 140 additions and 11,588 deletions.
1 change: 1 addition & 0 deletions docs/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ var list = {
"How to run things locally": "manual/introduction/How-to-run-things-locally",
"Drawing Lines": "manual/introduction/Drawing-lines",
"Creating Text": "manual/introduction/Creating-text",
"Loading 3D Models": "manual/introduction/Loading-3D-models",
"Migration Guide": "manual/introduction/Migration-guide",
"Code Style Guide": "manual/introduction/Code-style-guide",
"FAQ": "manual/introduction/FAQ",
Expand Down
10 changes: 5 additions & 5 deletions docs/manual/introduction/Animation-system.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ <h3>Animation Clips</h3>
<p class="desc">

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

Each *AnimationClip* usually holds the data for a certain activity of the object. If the
mesh is a character, for example, there may be one AnimationClip for a walkcycle, a second
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/introduction/FAQ.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h2>Which 3D model format is best supported?</h2>
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.
</p>
<p>
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.
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].
</p>
</div>

Expand Down
132 changes: 132 additions & 0 deletions docs/manual/introduction/Loading-3D-models.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<base href="../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>

<body>
<h1>[name]</h1>
<br />

<p>
3D models are available in hundreds of file formats, each with different
purposes, assorted features, and varying complexity. Although
<a href="https://github.com/mrdoob/three.js/tree/dev/examples/js/loaders">
three.js provides many loaders</a>, choosing the right format and
workflow will save time and frustration later on. Some formats are
difficult to work with, inefficient for realtime experiences, or simply not
fully supported at this time.
</p>

<p>
This guide provides a workflow recommended for most users, and suggestions
for what to try if things don't go as expected.
</p>

<h2>Before we start</h2>

<p>
If you're new to running a local server, begin with
[link:#manual/introduction/How-to-run-things-locally how to run things locally]
first. Many common errors viewing 3D models can be avoided by hosting files
correctly.
</p>

<h2>Recommended workflow</h2>

<p>
Where possible, we recommend using glTF (GL Transmission Format). Both
<small>.GLB</small> and <small>.GLTF</small> versions of the format are
well supported. Because glTF is focused on runtime asset delivery, it is
compact to transmit and fast to load. Features include meshes, materials,
textures, skins, skeletons, morph targets, animations, lights, and
cameras.
</p>

<p>
Public-domain glTF files are available on sites like
<a href="https://sketchfab.com/models?features=downloadable&sort_by=-likeCount&type=models">
Sketchfab</a>, or various tools include glTF export:
</p>

<ul>
<li><a href="https://github.com/KhronosGroup/glTF-Blender-Exporter">glTF-Blender-Exporter</a> by the Khronos Group</li>
<li><a href="https://github.com/KhronosGroup/COLLADA2GLTF">COLLADA2GLTF</a> by the Khronos Group</li>
<li><a href="https://github.com/facebookincubator/FBX2glTF">FBX2GLTF</a> by Facebook</li>
<li><a href="https://github.com/AnalyticalGraphicsInc/obj2gltf">OBJ2GLTF</a> by Analytical Graphics Inc</li>
<li><a href="https://www.allegorithmic.com/products/substance-painter">Substance Painter</a> by Allegorithmic</li>
<li><a href="https://www.foundry.com/products/modo">Modo</a> by Foundry</li>
<li><a href="https://www.marmoset.co/toolbag/">Toolbag</a> by Marmoset</li>
<li>&hellip;and <a href="https://github.com/khronosgroup/gltf#gltf-tools">many more</a></li>
</ul>

<p>
If your preferred tools do not support glTF, consider requesting glTF
export from the authors, or posting on
<a href="https://github.com/KhronosGroup/glTF/issues/1051">the glTF roadmap thread</a>.
</p>

<p>
When glTF is not an option, popular formats such as FBX, OBJ, or COLLADA
are also available and regularly maintained.
</p>

<h2>Troubleshooting</h2>

<p>
You've spent hours modeling an artisanal masterpiece, you load it into
the webpage, and — oh no! 😭 It's distorted, miscolored, or missing entirely.
Start with these troubleshooting steps:
</p>

<ol>
<li>
Check the JavaScript console for errors, and make sure you've used an
<em>onError</em> callback when calling <em>.load()</em> to log the result.
</li>
<li>
View the model in another application. For glTF, drag-and-drop viewers
are available for
<a href="https://gltf-viewer.donmccurdy.com/">three.js</a> and
<a href="http://sandbox.babylonjs.com/">babylon.js</a>. If the model
appears correctly in one or more applications,
<a href="https://github.com/mrdoob/three.js/issues/new">file a bug against three.js</a>.
If the model cannot be shown in any application, we strongly encourage
filing a bug with the application used to create the model.
</li>
<li>
Try scaling the model up or down by a factor of 1000. Many models are
scaled differently, and large models may not appear if the camera is
inside the model.
</li>
<li>
Look for failed texture requests in the network tab, like
<em>C:\\Path\To\Model\texture.jpg</em>. Use paths relative to your
model instead, such as <em>images/texture.jpg</em> — this may require
editing the model file in a text editor.
</li>
</ol>

<h2>Asking for help</h2>

<p>
If you've gone through the troubleshooting process above and your model
still isn't working, the right approach to asking for help will get you to
a solution faster. Whenever possible, include your model (or a simpler
model with the same problem) in any formats you have available. Include
enough information for someone else to reproduce the issue quickly —
ideally, a live demo.
</p>

<p>
TODO: Do we recommend model-related questions go to GitHub, Stack Overflow,
or the Discourse forum?
</p>
</body>

</html>
3 changes: 0 additions & 3 deletions utils/exporters/blender/.gitignore

This file was deleted.

67 changes: 1 addition & 66 deletions utils/exporters/blender/README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,3 @@
# Three.js Blender Export

Exports Three.js' ASCII JSON format.

## IMPORTANT

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).

## Installation


Recommended Blender version **>= 2.73.0**

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).

Once that is done, you need to activate the plugin. Open Blender preferences, look for
Addons, search for `three`, enable the checkbox next to the `Import-Export: Three.js Format` entry.

Goto Usage.

### Windows

Should look like this:

C:\Program Files\Blender Foundation\Blender\2.7X\scripts\addons

OR (for 2.6)

C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.6X\scripts\addons

### OSX

In your user's library for user installed Blender addons:

/Users/(myuser)/Library/Application Support/Blender/2.7X/scripts/addons

OR (for 2.79)

/Applications/Blender/blender.app/Contents/Resources/2.79/scripts/addons

### Linux

By default, this should look like:

/home/USERNAME/.config/blender/2.6X/scripts/addons

For Ubuntu users who installed Blender 2.68 via apt-get, this is the location:

/usr/lib/blender/scripts/addons

For Ubuntu users who installed Blender 2.7x via apt-get, this is the location:

/usr/share/blender/scripts/addons


## Usage

Activate the Import-Export addon under "User Preferences" > "Addons" and then use the regular Export menu within Blender, select `Three.js (json)`.


## Enabling msgpack

To enable msgpack compression copy the msgpack to scripts/modules.


## Importer

Currently there is no import functionality available.
> **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).
Loading

0 comments on commit 2a0d0bb

Please sign in to comment.