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 / 3D model bugs

Author
Message
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 22nd Jan 2020 19:33 Edited at: 3rd Feb 2020 09:51
Hi all.

So I've been playing with multi mesh models, and there seems to be some bugs across different formats (though it may also be partly the model - example attached). So

.OBJ - doesn't recognise animation or multiple meshes, even when using loadobjectwithchildren
.FBX - scaling doesn't work as expected, you can rotate and fix pivot, shadows still cast based on default mesh, won't display until color is set
.DAE - scaling and rotation seems broken (scale or rotate then fix object pivot - doesn't seem to work, fails the fulstrum cull while still on screen when scaled up etc) doesn't work, doesn't cast shadows, wont display until colour set

.X seems to work fine with averything though, but has anyone else found these isseus with model types? It seems to me AppGameKit is REALLY bad at handling nearly all the model types - I;ve never had a .BLEND model load, yet they are stated as supported.

Attachments

Login to view attachments
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 22nd Jan 2020 20:39
Same here. .Fbx works fine aswell .x . I think we have to set object scale permanent in both cases. I have never try with .dae . Obj are ok for static scenes. When sporting from any 3D program all meshes that have same texture will be loaded as single mesh ...so I use to asign all diferent textures and aply them with code. I have used most 3D programs and now Blender has every thing you can find in best programs. In just two weeks we can start undertanding Blender ...the best one for me and is free.

Cheers
I'm not a grumpy grandpa
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 24th Jan 2020 18:20
So, that model did have 9 meshes in the end, so that's fine.....but theres still some issues.

.OBJ - imports into MilkShape fine, all meshes in tact, AppGameKit shows only one mesh. The other formats rotation doesnt seems to work - shadows dont update with the object, nor do Collison boxes. And they still appear invisible until a colour is set.
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 24th Jan 2020 19:07
Yeah ...I saw your Obj model ....it didn't load correctly in Agk as only will be recognized one mesh ....if you load a .x file Agk will load all different meshes but we have to manually load and give a mesh texture .
I'm not a grumpy grandpa
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 24th Jan 2020 19:44
Yes, but why wont AppGameKit recognise more than one mesh in an OBJ file when every other program seems to, I think is the question. Animation doesnt work either. For a .x you need to lock the root bone, so perhaps it that? Where theres no bones, AppGameKit doesnt seem to like recognising multiple meshes or animation.
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 24th Jan 2020 19:53
Im not sure why Agk team do it like that ...l suppose that is in order to be able to export to android . What I realized is that when exporting to .x all meshes need thiferent textures ...perhaps about animation all bones need to have different names
I'm not a grumpy grandpa
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 24th Jan 2020 20:12
Hmmm.....not sure it would he anything to do with android.
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 3rd Feb 2020 01:21 Edited at: 3rd Feb 2020 01:22
I've never had any problems with FBX and AppGameKit working together. Well, I have, but that was my own ignorance.

I see 9 meshes in your fbx file in Blender.

When exporting to FBX the scaling needs to be adjusted as FBX Units Scaled.

If I recall correctly, FBX is scaled at 100 times larger in its original format.

I don't have much experience with OBJ, but even unity will not accept OBJ animations.
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 3rd Feb 2020 09:49
And shadows work ok for FBX models? For me, rotating them doesnt rotate the shadows, like the vertices are transformed after the shadow is rendered.
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 3rd Feb 2020 09:54
I've updated the top post to remove the reference to too many meshes....it was a bad example.model as it had 9 meshes but 3 textures.

For .OBJ, animation is one thing, but it wont show multiple meshes either. On the .X format, to get multiple meshes to recognise you have to save it with a skeleton, even if it's a single root bone; animation is the same. My guess is .OBJ is similar, but Milkshape at least has no facility to export bones in a .OBJ file that I can see.
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 3rd Feb 2020 22:18 Edited at: 3rd Feb 2020 22:19
The only time I have ever had problems with shadows is when I had too many vertices in one giant object(I made all the walls and other obstacles in a level 1 object). I had to split the object up.

Are you rotating the object in a shader? I believe the default shadow shader for AppGameKit is using the position stored in "attribute highp vec3 position" that it passes to the shadow shader. So, rotating an object in a shader will not have accurate shadows.

Here is what I got about the OBJ issue:
Quote: "Search Results
Featured snippet from the web
The OBJ file format is a simple data-format that represents 3D geometry alone — namely, the position of each vertex, the UV position of each texture coordinate vertex, vertex normals, and the faces that make each polygon defined as a list of vertices, and texture vertices."


I *thought* I've read in various places that OBJ does not support meshes. Some 3d programs have added that capability in, but assimp does not support it. I'm just going based off my memory here, and could be wrong.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 3rd Feb 2020 23:23
Ive always thought of OBJ as static and not animated due to older compatabilities
but chafari the trickster has worked around this https://forum.thegamecreators.com/thread/225745
MerryChristmas Everyone
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 3rd Feb 2020 23:41
Nope, just rotating it using AGKs rotate commands, no vertex shader alterations.
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 4th Feb 2020 00:50 Edited at: 4th Feb 2020 00:53
I'm at a loss. Can you show us a video?

Here is one of mine. The character and trees are fbx. I only use fbx, as it seems to support everything. The shadows don't shake, because its done via shader. The tree falling down is via physics not animation, and the shadows are correct.

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 4th Feb 2020 01:21
The kart physics models are all .obj files and the shadows look ok there

Login to post a reply

Server time is: 2024-04-19 07:30:59
Your offset time is: 2024-04-19 07:30:59