vpenades / SharpGLTF

glTF reader and writer for .NET Standard
MIT License
476 stars 75 forks source link

how to add scene with both translation and rotation #147

Closed kkbandaru closed 2 years ago

kkbandaru commented 2 years ago

One more question

how to add the scene using scenebuilder with both Translation and rotation.

merged.AddScene(terrain, Matrix4x4.CreateTranslation(0,0,0));

vpenades commented 2 years ago

If you have never used Matrix4x4, I'd suggest you to learn about it, and about matrix transformations in general, before digging further into the gltf library.

kkbandaru commented 2 years ago

thanks, i am developing apps in babylonjs and unreal for long time, this Matrix4x4 abstracted for developers , any how after your message i started understanding about Matrix4x4.

one more questions, i want to to set the texture base color for material with uScale and VScale i am trying to set like this, how to set Uscale and VScale materialBuilder.WithChannelImage("BaseColor", basePath + filename);

vpenades commented 2 years ago

https://github.com/vpenades/SharpGLTF/blob/acd6f8a7345987f1e50eaaf3b26d213d9a78998c/tests/SharpGLTF.Toolkit.Tests/Materials/MaterialBuilderTests.cs#L138