Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [BUG] 2.019 LoadObjectWithChildren does not support .DAE files with textures and froget to set

Author
Message
Jack
19
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 25th May 2016 21:38 Edited at: 25th May 2016 22:10
LoadObjectWithChildren does not support .DAE files with textures and froget to set the correct scale, LoadObject does work like expected ib the same model.
The same Object loaded with LoadObject does show the textures and is scaled correctly.

I have even tried to apply an shader for animated models, but it was no help, the object still appears white.
The .DAE format is readable, so I managed to find all UV maps for Layer 0 and Layer 1, so they are existing in there and are shown correctly with the loadobject command.
I also figured out, that the .DAE format has a unit conversation scale factor float in the header. After I set the scale to that factor, the object "loadobjectwithchildren" object
had the same size as the regular one loaded with "loadobject". This is definitly some strange behaviour.

Is there any kind of shader that could fix the problem?








I have attached an example.


AGK Version: 2.019

[/url]

Attachments

Login to view attachments
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 26th May 2016 20:26
Unfortunately AppGameKit does not support scaling on boned objects as we use Dual Quaternions which do not support scaling. This means AppGameKit ignores the scale when using LoadObjectWithChildren and it becomes a lot bigger. LoadObject does not suffer from this restriction so it can scale the object as necessary.

Currently AppGameKit doesn't load textures when loading objects, I need to work out a way of doing this without wasting memory (sharing the image if multiple objects use it, but not delete it until the last object using it has been deleted). For now it is easiest for you to keep control of your own textures and load and delete them as you need them. You can texture individual meshes with SetMeshImage, or child objects with GetObjectChildID and SetObjectImage, depending on how you object is modeled.

Login to post a reply

Server time is: 2024-04-20 05:45:19
Your offset time is: 2024-04-20 05:45:19