Alice Community  

Go Back   Alice Community > General Discussion > Questions and Comments

Reply
 
Thread Tools Display Modes
Exporting a2c files
Old
jmadar
Guest
 
Status:
Posts: n/a
Default Exporting a2c files - 06-01-2010, 02:22 PM

Just wondering if there is a way to export a2c files to another format, say .obj?
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 06-01-2010, 06:43 PM

Yes. This was my first answer, and X is saying its wrong. I dont know which one is true


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames

Last edited by jediaction; 06-05-2010 at 07:17 AM.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 06-01-2010, 11:56 PM

No. The Alice models were made for Alice only, and only Alice can read them. You'd need to write a custom conversion program yourself, which would be a fair amount of effort for a relatively small reward.


(')>
   
Reply With Quote
wrong
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Lightbulb wrong - 06-05-2010, 05:03 AM

Quote:
Originally Posted by x2495iiii View Post
No. The Alice models were made for Alice only, and only Alice can read them. You'd need to write a custom conversion program yourself, which would be a fair amount of effort for a relatively small reward.
Actually, youre wrong, Alice has a hidden .obj export option that I only just found yesterday. It is a python script that will export any given model from the world as a .obj model to a given filename when the world is run, in a matter of seconds, or less. The only problem is that it exports without textures.

First make a blank new world, then insert whatever model you want to export from the gallery, then add this script to the scripting area:
Code:
import java
import edu

#EXPORT A WORLD MODEL AS A .OBJ MODEL
def exportToObj( model, filename ):
    fos = java.io.FileOutputStream( filename )
    edu.cmu.cs.stage3.alice.scenegraph.io.OBJ.store( fos, model.getSceneGraphTransformable() )
    fos.close()
Then, in the events area add a scripting tile to run at world start, with contents:
Code:
exportToObj( world.object, "C:\Users\user\Documents\\alice 2\\bird.obj")
Replace world.object with the object name (with world. on the beginning), if neccessary rename the object first so there are no spaces or gaps between letters in its name. Replace "C:\Users\user\Documents\\alice 2\\bird.obj" with the filename to export as, please use only existing folders. Im not too sure why, but Im sure the double slashes at the end are neccessary, if it doesnt work try fidling around with double and single slashes.
Then run the world and wait a couple of seconds.
Done


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [-]
   
Reply With Quote
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Red face 06-05-2010, 05:13 AM

can I just say, it is terrible at exporting some things, and works fine for others.


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [-]
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 06-16-2010, 10:55 PM

Impressive. Thanks arty. Now I just need to find out how zone got those models to be divided properly into subparts and fully customized worlds will become a reality.


(')>
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 578
Join Date: Nov 2008
Location: In the interwebs
Default 06-17-2010, 08:57 AM

What did I do? I know very little about 3D objects in Alice. I don't make them, I just make them do stuff. What world did I split them into sub-parts?


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 06-17-2010, 12:43 PM

Wait, sorry, that was zenteo. My bad, I'm having a hard time keeping track of all the people surpassing me .


(')>
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 06-17-2010, 03:01 PM

I just have to say. YOU MISSPELLED Thanks. I know i misspell because of my keyboard but...ya knaw


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 06-17-2010, 03:21 PM

Who misspelled thanks? I can see only one instance of the word on this page (besides yours and the one in this post), and it's spelled properly (and I haven't edited it recently, either).


(')>
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.