Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
1.1.0:models [2023/07/31 15:01] – created - external edit 127.0.0.1 | 1.1.0:models [2024/01/23 08:25] (current) – [Tutorial] admin | ||
---|---|---|---|
Line 11: | Line 11: | ||
A TGorillaModel instance needs to be a child / sub-child of a TGorillaViewport instance, otherwise it will not be displayed. | A TGorillaModel instance needs to be a child / sub-child of a TGorillaViewport instance, otherwise it will not be displayed. | ||
+ | |||
+ | ===== Tutorial ===== | ||
+ | |||
+ | {{youtube> | ||
+ | |||
===== Supported file formats ===== | ===== Supported file formats ===== | ||
Line 21: | Line 26: | ||
| FBX | ✔ | ✔ | ✔ | ✘ | ✘ | ✘ | ✘ | ✘ | 7.1 - 7.7 | only binary format, animation import for 7.3 - 7.7| | | FBX | ✔ | ✔ | ✔ | ✘ | ✘ | ✘ | ✘ | ✘ | 7.1 - 7.7 | only binary format, animation import for 7.3 - 7.7| | ||
| glTF/ | | glTF/ | ||
- | | OBJ | ✔ | ✔ | ✘ | ✘ | ✘ | ✘ | ✘ | + | | OBJ | ✔ | ✔ | ✘ | ✘ | ✘ | ✘ | ✘ |
| STL | ✔ | | STL | ✔ | ||
| X3D | ✔ | ✔ | ✔ | ✘ | ✘ | ✘ | ✘ | ✘ | | deprecated | | | X3D | ✔ | ✔ | ✔ | ✘ | ✘ | ✘ | ✘ | ✘ | | deprecated | | ||
Line 102: | Line 107: | ||
==== Sketchfab Import ==== | ==== Sketchfab Import ==== | ||
- | A great feature of Gorilla3D is the integrated Sketchfab support at design time. | + | A great feature of Gorilla3D is the integrated Sketchfab support at design time, which can be accessed by the TGorillaPrefabManager component. |
+ | |||
+ | {{: | ||
+ | |||
+ | {{: | ||
- | {{:1.0.0:g3d-ide-sketchfab.jpg?nolink|}} | + | {{:1.1.0:g3d-sketchfab-3.jpg|}} |
To take advantage of that feature: | To take advantage of that feature: | ||
- | - Drop a **TGorillaPrefabManger** component onto your form | + | - Drop a **TGorillaPrefabManager** component onto your form |
- Select the component in structure view and right click onto it | - Select the component in structure view and right click onto it | ||
- A popup menu appears with an " | - A popup menu appears with an " | ||
- | - A dialog with an UID input field appears, where you can simply type in the UID of a downloadable | + | - Another dialogue will open to search for your specific |
- | + | ||
- | You can find the UID of the relevant model in the URL, f.e. " | + | |
The plugin will download the model as glTF file from Sketchfab into: | The plugin will download the model as glTF file from Sketchfab into: | ||
Line 776: | Line 783: | ||
end; | end; | ||
</ | </ | ||
+ | |||
+ | ==== OBJ Export ==== | ||
+ | |||
+ | The OBJ exporter is capable of exporting multiple meshes and hierarchies into a *.obj file and to store material information in a separated *.mtl file. | ||
+ | |||
+ | The MTL file will automatically be stored at the same location as the *.obj file with the *.obj.mtl extension. | ||
+ | |||
+ | <file pascal> | ||
+ | |||
+ | uses | ||
+ | Gorilla.OBJ.Exporter; | ||
+ | | ||
+ | procedure TForm1.MenuItem1Click(Sender: | ||
+ | var LOBJExp : TGorillaOBJExporter; | ||
+ | begin | ||
+ | if Assigned(FModel) then | ||
+ | begin | ||
+ | if SaveDialog1.Execute() then | ||
+ | begin | ||
+ | LOBJExp := TGorillaOBJExporter.Create(); | ||
+ | try | ||
+ | LOBJExp.SaveToFile(FModel.Def as TModelDef, SaveDialog1.FileName); | ||
+ | finally | ||
+ | FreeAndNil(LOBJExp); | ||
+ | end; | ||
+ | |||
+ | ShowMessage(' | ||
+ | SaveDialog1.FileName); | ||
+ | end; | ||
+ | end; | ||
+ | end; | ||
+ | </ | ||
+ | |||
+ | |||
Next step: [[animations|Animations]] | Next step: [[animations|Animations]] |