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 / Version 2 release - Objects take MINUTES to load

Author
Message
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 2nd Dec 2014 17:10
Thought it had hung, but left it for 5 minutes and yes, it does load.
However, several minutes for (OBJ) objects that loaded virtually instantly on beta v2!

Attachments

Login to view attachments
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 3rd Dec 2014 03:57 Edited at: 3rd Dec 2014 04:06
Quote: " instantly on beta v2!"
i havent seen a beta release yet.... its all been alphas.

device specific or across platforms?

loading times seem fine to me... i will check your model.

SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 3rd Dec 2014 04:02 Edited at: 3rd Dec 2014 04:15
lol!

Quote: "14130 vertex positions"

this is no where close to low poly..

of coarse thats gunna take a while to load!!! thats a butt load of vertices for a small tank! We are talking about thousands of triangles...yes several thousand being used to construct that thing. That file even paused my note pad editor just to load it in.

fyi... id cut down the vertex count/triangle count significantly!
i would consider 100 triangles or less low polly. To construct a simple 3d cube is only 12 triangles. (24 vertex positions providing sides are not shared)

nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 3rd Dec 2014 20:17 Edited at: 3rd Dec 2014 20:18
Yes I know it's big (you should have seen it before I started reducing it - over 50,000!) The low_poly name was after it's been run through some poly reducing processes.
However, it loaded instantly in Alpha 3, so something has changed here.

It's actually about 10 secs or something (the minutes was for loading a bunch of models)

This is on PC (an extremely fast one too).

Referring to beta v2, I think Paul was going to stop calling it alpha now, seeing as it's released on steam and all.

SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 4th Dec 2014 01:34
humm... well i have no idea. I have not noticed anything through the alphas however i have not been playing with anything complex either... so i cant judge.

Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 15th Jan 2015 15:54
I think I have just experienced this problem. Agk2 seems much slower to load obj files.

Anyone else experience this?

SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 15th Jan 2015 18:01 Edited at: 15th Jan 2015 20:33
yeah i hafta back track on this to. part of the slowness is because its creating a 3d file from a text file...

so the more complex your model is... the longer it takes to load it.

i heard obj format has a binary version with the extension mod.... maybe paul can add this as a temporary solution for load times but if it was working fast before....it must be related to reading strings from a file?

has anyone done a physical test... loading the same model with agk v1 and then v2 to see if there is a difference?

www.sheldonscreations.com
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 15th Jan 2015 18:34
I ran an old project today on v2 and I thought it crashed but it was just that it took around 30 seconds to load a few obj files.

I ran it again on v1 and it loads really quickly. It seems something has been changed for the worse in this case.

nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 15th Jan 2015 20:24
Absolutely. Weird, as I was just thinking about this today.

For me, I've not loaded AppGameKit again since I ran into this.

Yes, I did a test in the opening post.

Quote: "However, several minutes for (OBJ) objects that loaded virtually instantly on beta v2!"


it was using a text file for OBJ before. It's just now become impossibly slow.

SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 15th Jan 2015 20:25 Edited at: 15th Jan 2015 20:35
i asked paul if he could look at this cause im loading about 35 models and it takes a full minute to do it. They are not even complicated models....

and i dont want to release my nagacremo entry with a minute load time to play.... it looks bad!

www.sheldonscreations.com
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 15th Jan 2015 22:46
Well.. I pointed this out on 2nd Dec, so I hope he does look at it. I'm not even going to start another project until this is addressed.

SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 16th Jan 2015 00:47
i just found something interesting which may or may not decrease load times.

http://www.danpearce.co.uk/optimizing-3d-obj-files/

im going to modify my code that outputs obj files to see if 2 decimal places will cut the file size down by much.... i think it will resulting in faster load time.

i will report my findings

www.sheldonscreations.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 16th Jan 2015 01:39 Edited at: 16th Jan 2015 02:11
wow...yup tgc better look at this!

i just decreased my file sizes from 1 meg down to half and i didnt see any speed increase of loading that file.

all i did was cut the decimal place to 3 max and one of my files is now half the size it was and looks exactly the same.

seeing that the time it took to load this file and the other 1 are exactly the same so its something paul did.

i remember paul saying that 3d models were not cleaning up vertex data when deleted and he fixed that. This means he definetly touched the 3d code and slowed it down somehow. I may be switching back to agk v1 if this isnt fixed soon.

did you say it was good in alpha 2? im going to look on my retired pc to see if i can find a copy.

edit: wait.. im going to see if this is just a windows problem. gunna try loading the same project onto mac right now.

www.sheldonscreations.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 16th Jan 2015 02:28 Edited at: 16th Jan 2015 02:34
ok this is what ive tested...
my games loading speed tested:

windows - takes 82 seconds
mac - takes 12 seconds (its a lower spec pc then my windows pc!)
blackberry - takes 255 seconds...omg!

this is brutal!

once all of these are loaded on the 3 machines they perform exactly the same fps with no problems.

www.sheldonscreations.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 18th Jan 2015 22:18 Edited at: 20th Jan 2015 19:28
here is my video.... i will delete it when tgc fixes the problem

edit: video has now been deleted as the error will be fixed in the next release!
awesome!

www.sheldonscreations.com
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 20th Jan 2015 19:06
Thanks for the example model, it revealed an unnecessary bounds check that essentially calculated the length of the file data every time it read a line from the file. I'll fix this for the next version.
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 20th Jan 2015 19:26
Thanks paul... this is a major saver...

i cant thank you enough... i will delete my video asap!

www.sheldonscreations.com
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 21st Jan 2015 08:53
Great news, thanks Paul and SoftMotion3D

SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 22nd Jan 2015 15:10 Edited at: 22nd Jan 2015 15:13
@paul from tgc

for a temporary solution... when im creating my obj file, is it possible for me to just not use a carrige return? Just have one big continuation of tab or space delimited data?

would this load faster in theory or be a mess of a string to handle?

I ask because i want to release my nagacremo by monday coming up.
and my current load time is terrible.

is there a max length per string i need to follow?

www.sheldonscreations.com
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 22nd Jan 2015 17:47
Unfortunately the OBJ file requires new line characters to separate vertices. You could try and convert the file to the AGO format which uses a different loading function not based on new line characters, the format is documented here and someone wrote a converter here, but I haven't tested it.
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 22nd Jan 2015 18:10 Edited at: 22nd Jan 2015 18:11
humm... looks like the most detailed code is what was written with python so its a tad ruff to follow.

Im using darkbasic to write my obj files so i will need to just rewrite or add an additional save format.

reading and catching little bits... but hard to understand fully. how would i write this simple triangle with 1 face and 3 verts as an ago.


if you have time paul... how would i write this triangle shape as an ago with 0,0,0 offset and 0,0,0 rotation

Id appreciate it thanks... this would be enough information for me to build an exporter

www.sheldonscreations.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 22nd Jan 2015 22:53
ok i just finally picked this out.... i will try this but if its changed from this please let me know paul.....thanks.



www.sheldonscreations.com
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 22nd Jan 2015 23:28
The example you found is still valid, and should continue to be valid in the future as I want to keep it backwards compatible.
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 23rd Jan 2015 03:03 Edited at: 23rd Jan 2015 03:04
so paul....

i came up with this exported from my obj file but it doesnt seem to load into agk.


i dont know if you can spot any errors in that but its suppose to be a small box shape.

any ideas? is it suppose to be tab delimited er something?

www.sheldonscreations.com
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 23rd Jan 2015 03:41
Vertex 0 doesn't appear to be in the index list, vertices would be in the range 0-23. I couldn't spot anything else immediately wrong with it.
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 23rd Jan 2015 05:10 Edited at: 23rd Jan 2015 05:13
interesting enough....something loads but it doesnt display anything graphically. I fixed the index numbers...

i can change rotation of the object...position.... just cant see it so it must load something. Just doesnt display any faces.

I will try some things out and see if i can get it to work.
I tried to install that python stuff to try generating an ago file to study...but i dont understand a thing about it and couldnt get it to work.

paul.. do you have an example ago file i can look at to study?

www.sheldonscreations.com
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 23rd Jan 2015 05:46
Looking again at your file you are missing quotes around the word "Float".
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 23rd Jan 2015 15:27 Edited at: 23rd Jan 2015 15:32
ok im getting very close to having this work.

see example object below:


so this is my last hangup. Something is wrong with the uv data and gives me 2 errors.

ran as is it will say not enough float values
if i add 1 single float value to the stack it says theres too many.

this object will load if i remove the Type{"Float"} from the uv attribute but im guessing without uv data. I'll check that right now.
.

www.sheldonscreations.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 23rd Jan 2015 15:38 Edited at: 23rd Jan 2015 16:03
oh....i got it



this works perfectly if anyone needs a template!

thanks alot paul.

now i can make some easy model export tools.

anyone want .x,.3ds,.dbo to .ago ?

(this will just be for solid meshes fyi but possible multi textured if that feature works)

edit: it doesnt look like the texturing feature is working yet... correct me if im wrong paul but it looks like i still need to load an image manually to texture it.

www.sheldonscreations.com
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 23rd Jan 2015 16:53
Quote: "it doesnt look like the texturing feature is working yet... correct me if im wrong paul but it looks like i still need to load an image manually to texture it."


Correct, when I look at the 3D commands again I'll see if I can get this to work automatically.
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 23rd Jan 2015 19:00
ok thanks.... i now have my game converted to ago format


thanks for your help!

www.sheldonscreations.com
Mikko
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 23rd Jan 2015 19:05 Edited at: 23rd Jan 2015 19:13
Hi.

@SoftMotion 3d

I would like to have a converter.

I started to make this maze-game, but the obj loading time is too long.
It takes ages to even get to debug something.

this is the draft of this game as video:
https://www.youtube.com/watch?v=5WhZb7ggYZU

If you have time, please do the converter. Obj->Ago at least.
I cross my fingers...
Mikko

EDIT: Congratulations of your game !

mikko_ketonen( )hotmail.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 23rd Jan 2015 19:11
no problem.... does your object have quads?

im not sure how ago works with quads yet but i can deffinetly spit one out for triangle based models.

give me an hour or so to whip one up!

www.sheldonscreations.com
Mikko
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 23rd Jan 2015 19:28 Edited at: 23rd Jan 2015 19:30
Great.

Triangle based is good. I have now free stock models, but I try
to use your AGK_SM3D to build animated ones.
Now the simple animation just changes the whole model between frames.

By the way, is your "Model Props" program downloadable somewhere ?
The old link on the forum did not work anymore.

Mikko

mikko_ketonen( )hotmail.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 23rd Jan 2015 19:40
model props...id hafta upload it back to the server. I just moved to a new website and have not had any time to add everything.

are you after a batch converter or is it ok if its a single model at a time?

i would keep your animated models as obj's as the agk_sm3d app uses those to construct new files from scratch. However for all your level and scene design.. id use ago

when agk's next update comes out the obj's will load much faster!

give me an hour and i will put together an obj to ago converter...but dont use this for agk_sm3d app

www.sheldonscreations.com
Mikko
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 23rd Jan 2015 20:30
Single model converter is fine.

Ok, I will not use ago's in agk_sm3d app.

mikko_ketonen( )hotmail.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 23rd Jan 2015 22:32
i posted the converter here:

http://forum.thegamecreators.com/?m=forum_view&t=213385&b=41

www.sheldonscreations.com
Mikko
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 23rd Jan 2015 23:32
Thank you very much.
I'll test it tomorrow.

Mikko

mikko_ketonen( )hotmail.com

Login to post a reply

Server time is: 2024-11-25 17:22:46
Your offset time is: 2024-11-25 17:22:46