|
| 1 | +--- |
| 2 | +id: load-3d-document-with-options |
| 3 | +url: conversion/net/load-3d-document-with-options |
| 4 | +title: Load 3D document with options |
| 5 | +weight: 19 |
| 6 | +description: "Learn how to load and convert 3D model documents (FBX, OBJ, GLTF, 3DS) with advanced options using GroupDocs.Conversion for .NET API." |
| 7 | +keywords: Load 3D document, Load and convert FBX, Load and convert OBJ, Load and convert GLTF, 3D model conversion |
| 8 | +productName: GroupDocs.Conversion for .NET |
| 9 | +hideChildren: False |
| 10 | +toc: True |
| 11 | +--- |
| 12 | +[**GroupDocs.Conversion**](https://products.groupdocs.com/conversion/net) provides [ThreeDLoadOptions](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/threedloadoptions) to control how source 3D model documents are processed. 3D documents include formats like FBX, OBJ, GLTF, 3DS, U3D, and other 3D modeling file formats. |
| 13 | + |
| 14 | +The following options are available: |
| 15 | + |
| 16 | +| Option | Description | |
| 17 | +|--------|-------------| |
| 18 | +|**[Format](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/threedloadoptions/format)** | The document type is auto-detected during loading, but you can explicitly specify the source format. Available options include: *Fbx, ThreeDS, ThreeMF, Amf, Ase, Dae, Drc, Gltf, Obj, Ply, Rvm, U3d, Usd, Usdz, Vrml, X* | |
| 19 | + |
| 20 | +## Load FBX document |
| 21 | + |
| 22 | +The following code snippet shows how to load an FBX (Filmbox) document with explicit format specification: |
| 23 | + |
| 24 | +With v24.10 and later: |
| 25 | + |
| 26 | +```csharp |
| 27 | +using GroupDocs.Conversion; |
| 28 | +using GroupDocs.Conversion.FileTypes; |
| 29 | +using GroupDocs.Conversion.Options.Convert; |
| 30 | +using GroupDocs.Conversion.Options.Load; |
| 31 | + |
| 32 | +Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new ThreeDLoadOptions |
| 33 | +{ |
| 34 | + Format = ThreeDFileType.Fbx |
| 35 | +}; |
| 36 | + |
| 37 | +using (Converter converter = new Converter("character-model.fbx", getLoadOptions)) |
| 38 | +{ |
| 39 | + PdfConvertOptions options = new PdfConvertOptions(); |
| 40 | + converter.Convert("character-model.pdf", options); |
| 41 | +} |
| 42 | +``` |
| 43 | + |
| 44 | +Before v24.10: |
| 45 | + |
| 46 | +```csharp |
| 47 | +using GroupDocs.Conversion; |
| 48 | +using GroupDocs.Conversion.FileTypes; |
| 49 | +using GroupDocs.Conversion.Options.Convert; |
| 50 | +using GroupDocs.Conversion.Options.Load; |
| 51 | + |
| 52 | +Func<LoadOptions> getLoadOptions = () => new ThreeDLoadOptions |
| 53 | +{ |
| 54 | + Format = ThreeDFileType.Fbx |
| 55 | +}; |
| 56 | + |
| 57 | +using (Converter converter = new Converter("character-model.fbx", getLoadOptions)) |
| 58 | +{ |
| 59 | + PdfConvertOptions options = new PdfConvertOptions(); |
| 60 | + converter.Convert("character-model.pdf", options); |
| 61 | +} |
| 62 | +``` |
| 63 | + |
| 64 | +## Load OBJ document |
| 65 | + |
| 66 | +The following code snippet shows how to load an OBJ (Wavefront) document: |
| 67 | + |
| 68 | +With v24.10 and later: |
| 69 | + |
| 70 | +```csharp |
| 71 | +using GroupDocs.Conversion; |
| 72 | +using GroupDocs.Conversion.FileTypes; |
| 73 | +using GroupDocs.Conversion.Options.Convert; |
| 74 | +using GroupDocs.Conversion.Options.Load; |
| 75 | + |
| 76 | +Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new ThreeDLoadOptions |
| 77 | +{ |
| 78 | + Format = ThreeDFileType.Obj |
| 79 | +}; |
| 80 | + |
| 81 | +using (Converter converter = new Converter("building-model.obj", getLoadOptions)) |
| 82 | +{ |
| 83 | + PdfConvertOptions options = new PdfConvertOptions(); |
| 84 | + converter.Convert("building-model.pdf", options); |
| 85 | +} |
| 86 | +``` |
| 87 | + |
| 88 | +Before v24.10: |
| 89 | + |
| 90 | +```csharp |
| 91 | +using GroupDocs.Conversion; |
| 92 | +using GroupDocs.Conversion.FileTypes; |
| 93 | +using GroupDocs.Conversion.Options.Convert; |
| 94 | +using GroupDocs.Conversion.Options.Load; |
| 95 | + |
| 96 | +Func<LoadOptions> getLoadOptions = () => new ThreeDLoadOptions |
| 97 | +{ |
| 98 | + Format = ThreeDFileType.Obj |
| 99 | +}; |
| 100 | + |
| 101 | +using (Converter converter = new Converter("building-model.obj", getLoadOptions)) |
| 102 | +{ |
| 103 | + PdfConvertOptions options = new PdfConvertOptions(); |
| 104 | + converter.Convert("building-model.pdf", options); |
| 105 | +} |
| 106 | +``` |
| 107 | + |
| 108 | +## Convert FBX to OBJ |
| 109 | + |
| 110 | +The following code snippet shows how to load an FBX document and convert it to OBJ format: |
| 111 | + |
| 112 | +With v24.10 and later: |
| 113 | + |
| 114 | +```csharp |
| 115 | +using GroupDocs.Conversion; |
| 116 | +using GroupDocs.Conversion.FileTypes; |
| 117 | +using GroupDocs.Conversion.Options.Convert; |
| 118 | +using GroupDocs.Conversion.Options.Load; |
| 119 | + |
| 120 | +Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new ThreeDLoadOptions |
| 121 | +{ |
| 122 | + Format = ThreeDFileType.Fbx |
| 123 | +}; |
| 124 | + |
| 125 | +using (Converter converter = new Converter("animated-scene.fbx", getLoadOptions)) |
| 126 | +{ |
| 127 | + ThreeDConvertOptions options = new ThreeDConvertOptions |
| 128 | + { |
| 129 | + Format = ThreeDFileType.Obj |
| 130 | + }; |
| 131 | + converter.Convert("animated-scene.obj", options); |
| 132 | +} |
| 133 | +``` |
| 134 | + |
| 135 | +Before v24.10: |
| 136 | + |
| 137 | +```csharp |
| 138 | +using GroupDocs.Conversion; |
| 139 | +using GroupDocs.Conversion.FileTypes; |
| 140 | +using GroupDocs.Conversion.Options.Convert; |
| 141 | +using GroupDocs.Conversion.Options.Load; |
| 142 | + |
| 143 | +Func<LoadOptions> getLoadOptions = () => new ThreeDLoadOptions |
| 144 | +{ |
| 145 | + Format = ThreeDFileType.Fbx |
| 146 | +}; |
| 147 | + |
| 148 | +using (Converter converter = new Converter("animated-scene.fbx", getLoadOptions)) |
| 149 | +{ |
| 150 | + ThreeDConvertOptions options = new ThreeDConvertOptions |
| 151 | + { |
| 152 | + Format = ThreeDFileType.Obj |
| 153 | + }; |
| 154 | + converter.Convert("animated-scene.obj", options); |
| 155 | +} |
| 156 | +``` |
| 157 | + |
| 158 | +## Convert OBJ to GLTF |
| 159 | + |
| 160 | +The following code snippet shows how to convert from OBJ to GLTF format: |
| 161 | + |
| 162 | +With v24.10 and later: |
| 163 | + |
| 164 | +```csharp |
| 165 | +using GroupDocs.Conversion; |
| 166 | +using GroupDocs.Conversion.FileTypes; |
| 167 | +using GroupDocs.Conversion.Options.Convert; |
| 168 | +using GroupDocs.Conversion.Options.Load; |
| 169 | + |
| 170 | +Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new ThreeDLoadOptions |
| 171 | +{ |
| 172 | + Format = ThreeDFileType.Obj |
| 173 | +}; |
| 174 | + |
| 175 | +using (Converter converter = new Converter("product-design.obj", getLoadOptions)) |
| 176 | +{ |
| 177 | + ThreeDConvertOptions options = new ThreeDConvertOptions |
| 178 | + { |
| 179 | + Format = ThreeDFileType.Gltf |
| 180 | + }; |
| 181 | + converter.Convert("product-design.gltf", options); |
| 182 | +} |
| 183 | +``` |
| 184 | + |
| 185 | +Before v24.10: |
| 186 | + |
| 187 | +```csharp |
| 188 | +using GroupDocs.Conversion; |
| 189 | +using GroupDocs.Conversion.FileTypes; |
| 190 | +using GroupDocs.Conversion.Options.Convert; |
| 191 | +using GroupDocs.Conversion.Options.Load; |
| 192 | + |
| 193 | +Func<LoadOptions> getLoadOptions = () => new ThreeDLoadOptions |
| 194 | +{ |
| 195 | + Format = ThreeDFileType.Obj |
| 196 | +}; |
| 197 | + |
| 198 | +using (Converter converter = new Converter("product-design.obj", getLoadOptions)) |
| 199 | +{ |
| 200 | + ThreeDConvertOptions options = new ThreeDConvertOptions |
| 201 | + { |
| 202 | + Format = ThreeDFileType.Gltf |
| 203 | + }; |
| 204 | + converter.Convert("product-design.gltf", options); |
| 205 | +} |
| 206 | +``` |
| 207 | + |
| 208 | +## Convert FBX to U3D |
| 209 | + |
| 210 | +The following code snippet shows how to convert from FBX to U3D (Universal 3D) format: |
| 211 | + |
| 212 | +With v24.10 and later: |
| 213 | + |
| 214 | +```csharp |
| 215 | +using GroupDocs.Conversion; |
| 216 | +using GroupDocs.Conversion.FileTypes; |
| 217 | +using GroupDocs.Conversion.Options.Convert; |
| 218 | +using GroupDocs.Conversion.Options.Load; |
| 219 | + |
| 220 | +Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new ThreeDLoadOptions |
| 221 | +{ |
| 222 | + Format = ThreeDFileType.Fbx |
| 223 | +}; |
| 224 | + |
| 225 | +using (Converter converter = new Converter("game-asset.fbx", getLoadOptions)) |
| 226 | +{ |
| 227 | + ThreeDConvertOptions options = new ThreeDConvertOptions |
| 228 | + { |
| 229 | + Format = ThreeDFileType.U3d |
| 230 | + }; |
| 231 | + converter.Convert("game-asset.u3d", options); |
| 232 | +} |
| 233 | +``` |
| 234 | + |
| 235 | +Before v24.10: |
| 236 | + |
| 237 | +```csharp |
| 238 | +using GroupDocs.Conversion; |
| 239 | +using GroupDocs.Conversion.FileTypes; |
| 240 | +using GroupDocs.Conversion.Options.Convert; |
| 241 | +using GroupDocs.Conversion.Options.Load; |
| 242 | + |
| 243 | +Func<LoadOptions> getLoadOptions = () => new ThreeDLoadOptions |
| 244 | +{ |
| 245 | + Format = ThreeDFileType.Fbx |
| 246 | +}; |
| 247 | + |
| 248 | +using (Converter converter = new Converter("game-asset.fbx", getLoadOptions)) |
| 249 | +{ |
| 250 | + ThreeDConvertOptions options = new ThreeDConvertOptions |
| 251 | + { |
| 252 | + Format = ThreeDFileType.U3d |
| 253 | + }; |
| 254 | + converter.Convert("game-asset.u3d", options); |
| 255 | +} |
| 256 | +``` |
0 commit comments