JeremyAnsel.Media.WavefrontObj
3.0.58
dotnet add package JeremyAnsel.Media.WavefrontObj --version 3.0.58
NuGet\Install-Package JeremyAnsel.Media.WavefrontObj -Version 3.0.58
<PackageReference Include="JeremyAnsel.Media.WavefrontObj" Version="3.0.58" />
<PackageVersion Include="JeremyAnsel.Media.WavefrontObj" Version="3.0.58" />
<PackageReference Include="JeremyAnsel.Media.WavefrontObj" />
paket add JeremyAnsel.Media.WavefrontObj --version 3.0.58
#r "nuget: JeremyAnsel.Media.WavefrontObj, 3.0.58"
#:package JeremyAnsel.Media.WavefrontObj@3.0.58
#addin nuget:?package=JeremyAnsel.Media.WavefrontObj&version=3.0.58
#tool nuget:?package=JeremyAnsel.Media.WavefrontObj&version=3.0.58
JeremyAnsel.Media.WavefrontObj
JeremyAnsel.Media.WavefrontObj is a .Net library to handle Wavefront Obj .obj and .mtl files.
Usage
// Sample: read an obj file with textures.
// The obj file (.obj) contains the geometry of the 3d object. The material file (.mtl) defines the textures.
// open an obj file
ObjFile objFile = ObjFile.FromFile("objfile.obj");
// open the associated material file
ObjMaterialFile objMaterialFile = ObjMaterialFile.FromFile("objfile.mtl");
// Get the materials
foreach (ObjMaterial material in objMaterialFile.Materials)
{
// name of the material
string? name = material.Name;
// filename of the texture
string? filename = material.DiffuseMap?.FileName;
}
// The 3d geometry contains faces, vertices, normals, and texture coordinates.
// The vertices, normals, and texture coordinates are defined in global lists.
// The faces contain indices to these lists. The indices start at 1.
// Get the vertices
foreach (ObjVertex v in objFile.Vertices)
{
// a vertex has a position and an optional color
ObjVector4 position = v.Position;
ObjVector4? color = v.Color;
}
// Get the normals
foreach (ObjVector3 v in objFile.VertexNormals)
{
}
// Get the texture coordinates
foreach (ObjVector3 v in objFile.TextureVertices)
{
}
// Get the faces
foreach (ObjFace face in objFile.Faces)
{
// name of the texture as defined in the material file
// face.MaterialName is the name of the material as in material.Name
string? textureName = face.MaterialName;
// points of the face
// for a triangle there are 3 points
// for a quad there are 4 points
// there can be more points for a polygon
List<ObjTriplet> points = face.Vertices;
foreach (ObjTriplet point in points)
{
// index into the global vertices list
int vertexIndex = point.Vertex - 1;
// index into the global normals list
int normalIndex = point.Normal - 1;
// index into the global texture coordinates list
int textureCoordinatesIndex = point.Texture - 1;
}
}
An invalid index is 0. In the specs an index can be positive or negative. Positive means that the index starts at the beginning of the global list. Negative means that the index starts at the end of the list. While reading the library converts negative indices to positive indices. That is why the invalid index is 0.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.8
- No dependencies.
-
.NETStandard 2.0
- System.Numerics.Vectors (>= 4.6.1)
-
net6.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on JeremyAnsel.Media.WavefrontObj:
Package | Downloads |
---|---|
BE32.Marathon
A library for SONIC THE HEDGEHOG (2006) file formats. |
|
L3D.Net
L3D XML serializer, validator, builder and .l3d container reader |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on JeremyAnsel.Media.WavefrontObj:
Repository | Stars |
---|---|
freezy/VisualPinball.Engine
:video_game: Visual Pinball Engine for Unity
|
|
Eremex/controls-demo
|
Version | Downloads | Last Updated |
---|---|---|
3.0.58 | 125 | 8/21/2025 |
3.0.56 | 454 | 4/23/2025 |
3.0.54 | 125 | 4/12/2025 |
3.0.53 | 147 | 4/11/2025 |
3.0.52 | 140 | 4/11/2025 |
3.0.50 | 388 | 3/29/2025 |
3.0.49 | 112 | 3/29/2025 |
3.0.47 | 146 | 3/28/2025 |
3.0.46 | 283 | 3/13/2025 |
3.0.44 | 157 | 2/24/2025 |
3.0.42 | 111 | 2/24/2025 |
3.0.39 | 3,612 | 9/22/2024 |
3.0.38 | 2,807 | 7/28/2024 |
3.0.37 | 105 | 7/28/2024 |
3.0.36 | 355 | 4/26/2024 |
3.0.35 | 239 | 2/27/2024 |
3.0.33 | 506 | 12/7/2023 |
3.0.32 | 160 | 11/29/2023 |
3.0.29 | 4,286 | 4/14/2023 |
3.0.28 | 205 | 4/14/2023 |
3.0.27 | 777 | 3/25/2023 |
3.0.26 | 832 | 2/15/2023 |
3.0.23 | 429 | 2/14/2023 |
3.0.21 | 320 | 2/2/2023 |
3.0.20 | 3,530 | 4/30/2022 |
2.0.19 | 31,753 | 8/4/2020 |
2.0.18 | 2,575 | 7/1/2020 |
2.0.17 | 555 | 7/1/2020 |
2.0.16 | 600 | 7/1/2020 |
2.0.15 | 536 | 7/1/2020 |
2.0.14 | 541 | 7/1/2020 |
2.0.13 | 557 | 7/1/2020 |
2.0.12 | 542 | 7/1/2020 |
2.0.11 | 580 | 7/1/2020 |
2.0.10 | 526 | 7/1/2020 |
2.0.9 | 546 | 7/1/2020 |
2.0.8 | 546 | 7/1/2020 |
2.0.6 | 6,508 | 10/9/2019 |
1.0.4 | 657 | 9/20/2019 |
1.0.3 | 606 | 9/19/2019 |
1.0.2 | 3,406 | 8/13/2018 |
1.0.1 | 1,504 | 11/18/2017 |