Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with scene creation #44

Open
ZigZalgo opened this issue Sep 19, 2018 · 1 comment
Open

Help with scene creation #44

ZigZalgo opened this issue Sep 19, 2018 · 1 comment

Comments

@ZigZalgo
Copy link

I'm currently trying to create a new Scene using a custom 3D model format not supported by Assimp. The issue is, is I am not very knowledgeable when it comes to unsafe/unmanaged code in c#.

My issue is that when I try to create a new Scene(), the scene is read-only. This is intentional, and I've read that there is a different way to do this. However I'm unsure of my interpretation of how to work this into my project.

From my understanding, I must first create an AiScene, and assign to the AiScene, pointers which reference the structures housing all the data, then pass a pointer to the AiScene reference into the method Scene.FromUnmanagedScene(AiScene*). Is this correct?

I am very confused about this, and any help at all would be greatly appreciated.

@Starnick
Copy link

Starnick commented Oct 5, 2018

Hi,

Please post issues on the actual AssimpNet repository that I maintain (https://bitbucket.org/Starnick/assimpnet/src/master/).

The managed Scene data structure is not read only. Once imported, it can be manipulated in however manner you want. You can create a new scene structure from scratch. In either scenario, the scene can then be exported. And really, the only time you need to create a new scene from scratch is when you're exporting.

In the export scenario, the library will use that "FromManagedScene" function to create a representation of the data that native assimp can work with. As an end-user you do not need mess with anything in the Assimp.Unmanaged namespace. All you need to do is work with the .net classes in the main namespace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants