View Full Version : 3D Printscreen 3DXML reader?
AtrusDni 05-31-2008, 11:29 PM Hey guys, I am trying to make a mel script that will read a 3DXML file. What is 3DXML you might ask? Go here:
http://www.3ds.com/products/3dvia/3d-xml/overview/
Download 3D Printscreen and the 3DXML Player.
3D Printscreen allows you to "extract" DirectX or OpenGL meshes from any application that is running. It works really well, even grabs the textures.
The Problem is . . .
It saves it to its proprietary format called 3DXML.
Not too big of a problem. The initial file it saves out is actually a renamed zip archive. So heres some directions to get the data:
1) Use 3D Print screen and grab a model.
2) Rename this new model.3dxml file to model.zip
3) Open up the zip file and inside you will find the real 3dxml file.
4) Extract that file and rename that to model.txt.
Now you can view all the information thats inside, (vertex positions, uv coordinates, etc) they even found a way to store the image files inside there too. (which is another question I had).
So this is pretty neat I think, but the problem is theres no way to access the data within Maya, so im working on a 3DXML reader mel script. Its EXTREMELY beta and basic, (I just started it yesterday) and at the moment im just trying to get the geometry imported correctly.
The problem im facing is if I have Maya open and grab a model from maya, it reads in perfectly fine. If I grab a model from a game, the triangles are all messed up, and im not sure why. Heres some screen shots to show what I mean:
http://i25.photobucket.com/albums/c86/Fishypants/cgtalk-post-image.jpg
Any help or information would be super awesome. Thanks.
|
|
AtrusDni
06-02-2008, 03:32 PM
Any ideas anyone?
AtrusDni
06-04-2008, 06:19 AM
Well, since no one seems interested, im going to continue on my own. I have been making progress, and thanks to Koichi Senada, I have been able to figure out the structure of the polygons better. So there is Poly Tris, Poly Strips and Poly Fans. So far I have tris and strips working correctly. Here is a Phantasy Star Universe grab:
http://i25.photobucket.com/albums/c86/Fishypants/lookbabe.jpg
I will keep posting my progress in case someone happens to stumble across this thread and finds it usefull.
Glenfx
07-29-2008, 02:43 AM
Hey this is quite interesting.
Ive been trying out the 3d print program since i wanted to study some game models and scenes but couldn't find a way to import them into maya.
what others are doing is converting the models trough adobe acrobat 3D, but the models loose all the UV data which looses a good deal of the whole idea of studying models.
(plus acrobat 3d isn't free)
I cant really help you with the code as i barely know what "if"s and "else"s are ^^'
How far did you go into the mel?.... is the one you posted the last version?
If not, can i ask you for the script? :B
PS: i found a similar application called 3DRipperDX (http://www.deep-shadows.com/hax/3DRipperDX.htm) It works similar to 3dvias 3dprint but only works in DirectX applications and not in opengl, i couldn't make it work in the global monitoring mode as it crashes my windows though :/
AtrusDni
07-29-2008, 05:24 AM
I have kind of haulted progress on this project because I cannot find a good way to write out images from maya without diving into the API, (which I am almost clueless about) Although I think one way is to write out an XPM file, which is what maya's icons are, they are ascii images. Maybe convert them after the image is created. I dunno.
Tried 3dripperDX, a lot of games that use gameguard fail to load because it sees 3dripperDX as a hack program. Plus I have yet to get a decent rip from it without all this distortion in the meshes. Also no textures from what I remember . . .
3D Printscreen seems to be the best ripper I have seen. Just gotta get it to work right ;-)
P.S.- I dont have the latest code on me right now, but ill post it later.
AtrusDni
10-12-2008, 06:01 PM
Shabam! I got the textures extracted! Im so excited. The method I used was using PIL (Python Imaging Library) and using python to extract and convert the base64 encoded images to png files. Now all that is left is the uv information and this thing will be done. Ill post the script once i've completed it. I have to convert the whole thing over from mel to python, so it might take a little bit.
AtrusDni
10-22-2008, 02:35 AM
Some progress thus far:
http://i25.photobucket.com/albums/c86/Fishypants/phantasy-star-model-rip.jpg
Not all the model types are supported yet. I have the triangle strips working, now I need to implement triangle fans and normal triangles. I have the textures extracting and creating shader networks and assigning them. This baby is almost done. yay!
suitaloon
03-28-2009, 11:55 AM
Dear Atrus Dni
I'm very interested by your app. Is it standalone? I'm trying to convert a 3dxml that I got from google earth to use it for an architectural rendering I'm working on right now, do you think i could give it a try or is it to early?
Thanks for what you do!
regards
Thomas, aka suitaloon
suitaloon
03-28-2009, 01:16 PM
Dear Atrus Dni
I'm very interested by your app. Is it standalone? I'm trying to convert a 3dxml that I got from google earth to use it for an architectural rendering I'm working on right now, do you think i could give it a try or is it to early?
Thanks for what you do!
regards
Thomas, aka suitaloon
AtrusDni
03-28-2009, 04:02 PM
Hey Thomas, its actually a python script that you run inside of maya. There are some things you have to setup first, you have to extract the real 3dxml file from the main one, because the main file is just a renamed zip. You also need the PIL (Python Image Library) and set it up to work with maya. Also its still in very early stages and probably wouldn't work too well. If you have 3d studio max, someone already wrote a good one that does the job nicely. Do a search for Koichi Senada in google, he has actually helped me out a little bit in understanding the 3dxml file format. Thats your best bet at the moment in reading the 3dxml files until I can get this working better.
Robert Bateman
03-30-2009, 10:18 AM
I have kind of haulted progress on this project because I cannot find a good way to write out images from maya without diving into the API, (which I am almost clueless about) Although I think one way is to write out an XPM file, which is what maya's icons are, they are ascii images. Maybe convert them after the image is created. I dunno.
MImage available in Python and the API. Realistically though, this whole thing would be 100 times easier if you just did it in the API to begin with. mel really isn't suited to this sort of thing.
AtrusDni
03-30-2009, 03:14 PM
Rob - I absolutely agree with you 100%, problem is, I am not that versed in C, I took a class on it like 6 years ago, and trying to find beginner information about the API is almost impossible to find.
I know you're probably busy and whatnot, but if you could lend a hand, I would be most appreciative. You seem to know the API the best out of everyone I have seen.
Radacci
04-13-2009, 10:33 AM
where could i get 3dxml importer for max 2009?
AtrusDni
04-13-2009, 03:23 PM
Read a few posts up /\
pieterhoen
06-04-2009, 01:14 PM
We have the same problem of getting a 3D printscreen from Google Earth into Maya. I would love to try out your MEL / Python script and mess around with it. I have some experience in scripting in Maya, maybe we can help each other out...
thehiddenice
12-17-2009, 01:45 PM
I am really interested if there are any updates on this?
AtrusDni
12-17-2009, 05:18 PM
Hey thehiddenice,
Yeah, I kinda stopped with progress on this because I found Koichi Senada's script for 3dsmax to work quite well. I usually just convert it in max, then export an fbx to maya. Works pretty well. If I get some free time, I might revisit this script, but who knows.
CGTalk Moderation
12-17-2009, 05:18 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.