Skip to content

Commit

Permalink
Cleanup documentation a little.
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardMoyse authored and sponce committed Jan 11, 2023
1 parent fbf3c0c commit d42f25e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions guides/developers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* [Using JSROOT](./using-jsroot.md)
* [Running with XR (AR/VR) support](./running-with-xr-support.md)
* [Convert GDML/ROOT Geometry to GLTF](./convert-gdml-to-gltf.md)
* [Geometry tips and tricks](./geometry-tips.md)
* [How to make a Phoenix release](./../release.md)

## Phoenix architecture
Expand Down
10 changes: 5 additions & 5 deletions guides/developers/geometry-tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

This guide is intended to provide some tips on creating an experimental geometry for use within Phoenix.

At the time of writing, the threejs recommended geometry format is gltf (GL Transmission Format) or glb (the binary ) (see this [threejs documentation](https://threejs.org/docs/#manual/en/introduction/Loading-3D-models) for details).
At the time of writing, the threejs recommended geometry format is gltf (GL Transmission Format) or glb (the binary version of gltf). See this [threejs documentation](https://threejs.org/docs/#manual/en/introduction/Loading-3D-models) for details.

One big advantage of gltf/glb is Phoenix can use the embedded GLTF scenes to populate the geometry menu. So rather than having a lot of separate files for the different parts of an experiment, and then adding them individually to the top level scene and UI one-by-one e.g.:
```
```typescript
this.eventDisplay.loadGLTFGeometry(
'assets/geometry/barrel.gltf',
'Barrel',
Expand All @@ -20,13 +20,13 @@ One big advantage of gltf/glb is Phoenix can use the embedded GLTF scenes to pop
);
```

you can instead load _one_ file, and Phoenix will loop over the internal structure and create the appropriate geometry UI entries. See the LHCB example, specifically [lhcb.component.ts](lhcb.component.ts) for instance.
you can instead load _one_ file, and Phoenix will loop over the internal structure and create the appropriate geometry UI entries. See the LHCB interactive example for how this works in practice (specifically, [lhcb.component.ts](lhcb.component.ts) is where the geometry is loaded).

# Creating gltf/glb content
## Blender
[Blender](https://www.blender.org) is an incredibly powerful _free_ tool to create 3D content. It also has an impressive set of importers and exporters, including an gltf exporter, meaning you can load content from almost any format and save it as compressed glb. It also understands scenes (see the Blender [documentation](https://docs.blender.org/manual/en/latest/scene_layout/scene/introduction.html) for more), so you can load many different geometry files, put them in their own scenes, and export, and then Phoenix will fill the geometry UI menu for you, as described above.
[Blender](https://www.blender.org) is an incredibly powerful _free_ tool to create 3D content. It also has an comprehensive set of importers and exporters (including an gltf exporter, obviously) meaning you can load content from almost any format and save it as compressed glb. It also understands scenes (see the Blender [documentation](https://docs.blender.org/manual/en/latest/scene_layout/scene/introduction.html) for more), so you can load many different geometry files, put them in their own scenes and export, and then Phoenix will fill the geometry UI menu for you as described above.

When exporting the content from Blender it is VERY important that you remember to Apply all transformations - otherwise you can be in the situation that your geometry looks perfect inside Blender, but is the wrong size/rotation when viewed in Phoenix.
* **N.B.** When exporting content from Blender it is very important that you remember to [Apply](https://docs.blender.org/manual/en/latest/scene_layout/object/editing/apply.html) all transformations - otherwise you can be in the situation that your geometry looks perfect inside Blender, but is the wrong size/rotation when viewed in Phoenix.

## From ROOT or GDML
Read [this guide](convert-gdml-to-gltf.md) for how to convert from gdml or ROOT to gltf.
Expand Down

0 comments on commit d42f25e

Please sign in to comment.