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 / Convert 3d files to AGO (converter)

Author
Message
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 23rd Jan 2015 22:31 Edited at: 25th Jan 2015 16:37
edit: updated jan 25,2015 [source included but is messy!]


now converts: [ .x, .3ds, .dbo , .obj] To .ago

this does not work for all obj files and does not work with objects using quads.

as soon as the ago format supports multi texture i will also add that to this converter.


download here:---------------------------------------------------->

www.sheldonscreations.com

Attachments

Login to view attachments
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 23rd Jan 2015 23:26 Edited at: 23rd Jan 2015 23:29
Hi,

it throws an error: Runtime Error 188 - Array does not exists or array subscipts out of bounds at line 660

I tried to convert a simple one sided square, made with sketchup.

It creates an .ago file, but it can't finish as you can see:


[Offtopic]I need a one sided square for my long time project. (world is made out of voxel's)
The build in agk palanes are double sided and so eat double the pervormance.
I thought I knew how to create objects for OpenGl but it doesn't work somehow:

[/Offtopic]


Using AppGameKit V2 Tier1
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 23rd Jan 2015 23:36
can you upload the square obj file so i can inspect it to see where its crashing.

thanks.... i suspect your model is made with quads but i cant confirm till i see your obj file

www.sheldonscreations.com
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 24th Jan 2015 00:00
Sure:



Using AppGameKit V2 Tier1
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 24th Jan 2015 00:18
thats an interesting file.... i will add support for it and update the converter.

www.sheldonscreations.com
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 24th Jan 2015 00:30 Edited at: 24th Jan 2015 00:32
I don't know how obj files look like exactly But now i know
Sketchup says its an .obj file.

Thank you for the support


Using AppGameKit V2 Tier1
Mikko
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 24th Jan 2015 00:31 Edited at: 24th Jan 2015 00:42
I tested briefly.
Loading is blazing fast compared to obj.

I have to scale objects x10 compared to obj.

One obj model looses uw mapping in conversion.

No actual problems.

I just say WoW, thanks.

EDIT:
Withh some objects I get error:
Runtime Error 118 - Array does not exist or array subscript out of bounds at line 658

mikko_ketonen( )hotmail.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 24th Jan 2015 00:48 Edited at: 24th Jan 2015 16:15
yup im working on that problem....

also jambo... turns out your file is a quad so its not supported sorry.

when you see the reference

f 1/1/1 2/2/2 3/3/3 4/4/4

in some order like that where there is 4 sets of data per face.... i cant convert that sorry...

if i tried hard i could do it but its a lot more code to handle it.

give me a few mins to update the converter to have uw mapping...didnt know anyone used it.

correct me if im wrong... is it u,v,w? the 3rd item thats missing?

Quote: "Runtime Error 118 - Array does not exist or array subscript out of bounds at line 658
"

i can fix this...give me a few mins

www.sheldonscreations.com
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 24th Jan 2015 01:35
SoftMotion3D you are about to make my repository work difficult lol ^^

Can I have your permission to add this?

Mikko
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 24th Jan 2015 02:08
Here are two examples of converted objects.

The image mapping on the "wasp" works.

But the mapping on the "mesh_sarah" does not.

there's also original obj files, where mapping works also with "mesh_sarah"




Objects are originally from www.reinerstilesets.de

mikko_ketonen( )hotmail.com
Mikko
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 24th Jan 2015 02:10
Here's the "wasp" object.

mikko_ketonen( )hotmail.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 24th Jan 2015 02:39
ok i just updated the first post

let me check those files for ya mikko

and yup mrvalentine i can even post the source if ya want it.

www.sheldonscreations.com
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 24th Jan 2015 02:43
If you can package it in the zip it would be brilliant, maybe specify it in a SOURCE folder with the app?

I am nearly done with my update to my repository, it is much more sleeker, will post a new GC post about it soon...

Thanks!

SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 24th Jan 2015 02:43
Quote: ""mesh_sarah""
is now crashing..... give me some more time to resolve this one and i will post a fix

www.sheldonscreations.com
Mikko
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 24th Jan 2015 02:53 Edited at: 24th Jan 2015 03:00
With the new version, error is the same, but line is different.

Runtime Error 118 - Array does not exist or array subscript out of bounds at line 361

With this attached object.


It's 4 am ... going to bed... cheers.

mikko_ketonen( )hotmail.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 24th Jan 2015 03:47 Edited at: 24th Jan 2015 04:04
ok updated again.....sorry i didnt fix the texture alignment errors with sarah yet.

whatever editor your using to make the file...OMG! Programmers nightmare

its probably really good but it recycles vertex data... this makes it very hard to copy.

when i get a triangle to make and its referencing the same vertex point as another one used but with different uv data....well id hafta make a whole bunch of new code to catch that...lol! I would need to copy the vertex data to a new memory location and then feed it new uv and normals data.

ouch!



solution: [if your file didnt convert properly]
-save it as .x
-goto this website and convert .x to .obj http://www.greentoken.de/onlineconv/
-that obj file generated should load into this just fine and convert it to ago.


edit: i will add .x and .dbo and .3ds to ago next and that may solve uv issues from converting obj's to ago's

www.sheldonscreations.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 24th Jan 2015 16:10 Edited at: 24th Jan 2015 16:36
ok it now converts .x, .3ds, .dbo to ago aswell

try it out and let me know of any crazyness thats going on.
this does not support multi texture yet but will in the future.

updated first post... i just thought of something.... does anyone want to convert to obj as well?



edit: i need people to let me know if the normals are correct.
in the ago format, the faces where flipped so i wouldnt be suprized if i need to flip the normals data also.
please let me know if it looks correct.
also the uv data was flipped also so i had to go 1.0-data to get correct alignment. That will most likely not work if you had uv data over 1.0 or below 0.0

www.sheldonscreations.com
Mikko
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 24th Jan 2015 17:22 Edited at: 24th Jan 2015 17:28
There's no more errors.

But here's one example, where uv mapping still does not work with ago.

It works with the original included obj.

Edit.I dont know if it's important, but conversion also changes objects facing "north" to "south".

mikko_ketonen( )hotmail.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 24th Jan 2015 18:30
Quote: "Edit.I dont know if it's important, but conversion also changes objects facing "north" to "south"."


yes that is important... ok this is really strange how the ago format works...

in the ago file....play with this value and tell me what it takes to make it face the correct direction as im not familiar with rotation quats..



where it says rotation on your file.... tell me what it takes to adjust that facing the correct way and i will add it to the exporter.
also i need to know if the normals are working correctly.

with that file thats not getting the uv correct...can you try to save it as a .x and load it into the converter and see if it works then.

www.sheldonscreations.com
Mikko
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 24th Jan 2015 19:32
I changed RotationQuat{1,0,0,0} to different values, but the the object had always the same orientation.

x- or 3ds files dont seem to help for the mapping.

But why does the mapping of the earlier wasp work, and this doesn't ??

mikko_ketonen( )hotmail.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 24th Jan 2015 21:01
oh....it did on the last? ok i will put an option in.

I tried to make it pickup mixed data and rewrite it...but i guess that doesnt work for all files.

let me add an option to adjust it on the converter.

www.sheldonscreations.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 24th Jan 2015 21:22
was this not correct?

see image.... and this is the produced ago

www.sheldonscreations.com

Attachments

Login to view attachments
Mikko
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 24th Jan 2015 21:46 Edited at: 24th Jan 2015 22:06
Is that obj from my last message (24th Jan 2015 18:22) ?
if you managed to convert it and that's ago in the picture, then
it works now.


Edit: It looks like the earlier wasp model, that worked already,
but why it works, but this new one not?

There is something different in the new obj file. I may have exported them differently, but can't say how.

Obj files work in the earlier and newer wasp-objects, but converted ago only in
earlier.

mikko_ketonen( )hotmail.com
Mikko
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 24th Jan 2015 22:40 Edited at: 24th Jan 2015 22:42
Here's another test.

This obj-model of crab works in Agk2 with right uv mapping.

When converted to ago, the model is like 10x smaller and the mapping
does not work.

Funny thing is also, that LoadObjects height -parameter does nothing
with ago's.

mikko_ketonen( )hotmail.com
Mikko
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 25th Jan 2015 15:02 Edited at: 25th Jan 2015 15:09
I exported the crab differentially, and now mapping works.Object attached).

But it seems, that the whole object is mirrored in x-direction.
The red x on the crabs face should be on its own left side, like can
be seen when obj model is loaded.

Maybe it is also mirrored in z direction also, because it is facing "south"

Is it possible to have version of the converter, where x and z are *-1 . ?

mikko_ketonen( )hotmail.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 25th Jan 2015 15:54
let me run another test .... it should be simple to reverse vertex data on any axis

www.sheldonscreations.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 25th Jan 2015 16:40 Edited at: 25th Jan 2015 16:42
ok looks like it was just a miror problem on z.... this explains why i had to invert the index faces but now thats resolved. I suspect that the normals should now be good also.

fixed!

download from first post.


the original file converter done in python was incorrect. All it did was flipped the triangle faces when it actually should have flipped the z axis.

www.sheldonscreations.com
Mikko
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 25th Jan 2015 17:18
Its perfect.

The size difference must be something inside agk2, so I can live with that.

Thanks for the hard work.

mikko_ketonen( )hotmail.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 25th Jan 2015 18:39
hey no problem as i needed the converter too!

i like your game by the way!

if you would like to see what it looks like using agk_sm3d in a game.... i just posted a proto-type rpg that uses agk_sm3d's animation format.

see game here:http://forum.thegamecreators.com/?m=forum_view&t=213134&b=51

www.sheldonscreations.com
Mikko
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 25th Jan 2015 20:48 Edited at: 25th Jan 2015 20:50
Thanks, I'll try to get it finished for Android soonish.

I loaded and tested your game. It feels professional with
agk_sm3d animations. With that rpg engine, you can make series
of games after the first one.

mikko_ketonen( )hotmail.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 25th Jan 2015 21:55
Quote: "I loaded and tested your game. It feels professional with
agk_sm3d animations. With that rpg engine, you can make series
of games after the first one."


thanks! I have allot of work to do on the game and i bet it will take me a few years to finish.

www.sheldonscreations.com

Login to post a reply

Server time is: 2024-11-25 18:04:05
Your offset time is: 2024-11-25 18:04:05