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 / Save 3D object - SaveObject command?

Author
Message
Bored of the Rings
User Banned
Posted: 30th Aug 2015 12:13 Edited at: 30th Aug 2015 12:14
Hi, searched the forums on whether it was possible to actually save a 3D object out using either AGK2 or AGK1 and couldn\'t find anything and no documentation. I see there is a LoadObject but no SaveObject? Seems daft to me to have a load and not a save.

Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 30th Aug 2015 13:13
unfortunately a oneway, this 3d part is still work in progress.

AGK (Steam) V2 Beta .. : Windows 10 Pro, 8.1 Pro 64 Bit : AMD (15.7.1) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 30th Aug 2015 18:02 Edited at: 31st Aug 2015 00:47
saving out an obj file manually is easy. the obj format is text based and if you need to see an example of it done... check out my animation plugin. It has the ability to create raw objects and save them out and load back in.


i can write you a quick example using it if you like.... just let me know.



edit: this is the updated include file


www.sheldonscreations.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 30th Aug 2015 18:07 Edited at: 31st Aug 2015 00:46
infact here is the example as i see ive done this before.


so just have that first text as an included file and then this is your source using it.



this creates a file from scratch and textures it.

edit: updated from missing function!
download the complete source here---------------------------->

**notice** this only works with polygon meshes(triangular)... no quads

www.sheldonscreations.com

Attachments

Login to view attachments
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 30th Aug 2015 18:23
oh....also you can load a mesh in for editting with this new command



the object number to load in and the file name...
this will fill the array in with the data of the object for easy editting.

then when done editting dump it back to a file...



examine the functions in the include file to see what the paramiters do.

www.sheldonscreations.com
Bored of the Rings
User Banned
Posted: 30th Aug 2015 23:27 Edited at: 31st Aug 2015 00:11
@SoftMotion3D: thank you so much for this I will give it a try tomorrow. I owe you one. This is great.

[edit] the only problem I had was it couldn't find function setindexdata2.

Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 31st Aug 2015 00:13
Quote: "setindexdata2."


let me have a look... thats odd

www.sheldonscreations.com
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 31st Aug 2015 00:22 Edited at: 31st Aug 2015 01:35
doh! give me another sec.....

here it is... i'll update the download...




if you want to learn it there is a complete 3d animation code inside there. I developed an animation program (3d model rigger and animator) and could post a quick example using it if ya want.
get the animator app here:http://www.sheldonscreations.com/forum/index.php/topic,4.0.html

i will give it a quick update to make sure its what im using.
edit: the editor is completely up to date for windows... mac is still behind... if i get bored i will turn it on and update it for mac to.

www.sheldonscreations.com

Login to post a reply

Server time is: 2024-11-16 20:27:05
Your offset time is: 2024-11-16 20:27:05