uomoartificiale Posted February 24, 2009 Share Posted February 24, 2009 I don't know how to contact the author of this wonderful tool, so I post my contribution here hoping he could notice. I added SMD export support for the meshes (wdr/wdd) wih texture support. The mechanic is quite rough, I admit, but it's proving to work quite well, as you can see from the screenshot. While SparkIV loads a wdr/wdd model in the preview window, a file called output.smd is created in a subfolder called 'out' (relative to the program location). When a new model is previewed the file is wiped and created again. Texture/groups are supported. If the author is planning to add bones&animation support, my vote is for the SMD format: it's really easy to manage and supports vertex-weight. I'm attaching the source file I modified (mainly the ModelGenerator.cs) and a 0.61 build for the ones who can't compile the source. Downloads: 061 source MOD: http://rapidshare.com/files/202081650/SparkIV_061SMD.zip 061 binary: http://rapidshare.com/files/202082476/Spar...1_SMDExport.zip Link to comment Share on other sites More sharing options...
Funky_Donkey_BG Posted February 24, 2009 Share Posted February 24, 2009 Aru your tools are perfect.But can you please allow to add bigger textures-I made some HD textures for the friends and other peds but i want them to be imported in their native resolution(1024x1024,512x512) not two times smaller.Thanks and keep up the good work. Link to comment Share on other sites More sharing options...
nkretschmann Posted February 24, 2009 Share Posted February 24, 2009 dear uomoartificiale: i was waiting for a tool like yours. - great work unfortunatly i couldnot get the extracted models to work in any of my 3d applications. i searched and found an plugin for both 3d max 09 and softimage xsi - but in both cases i got an error that the smd files i wanted to load were corrupt. which software do you use to edit the extracted models? thanks, niels Link to comment Share on other sites More sharing options...
Millenia Posted February 24, 2009 Share Posted February 24, 2009 (edited) dear uomoartificiale: i was waiting for a tool like yours. - great work unfortunatly i couldnot get the extracted models to work in any of my 3d applications. i searched and found an plugin for both 3d max 09 and softimage xsi - but in both cases i got an error that the smd files i wanted to load were corrupt. which software do you use to edit the extracted models? thanks, niels The screenshot he posted is from Milkshape 3D And you're right, apparently the vertex weighter cocks something up and these don't work with the MAX plugin Also it seems to occasionally delete some faces at random :E E:/ And if you try to open a model with multiple textures, only the first one is shown But thanks for this tool anyways, it's a massive helper - I managed to already retexture one weapon now that I could actually extract the uvmaps from the model and not having to do guesswork Edited February 25, 2009 by Millenia Link to comment Share on other sites More sharing options...
uomoartificiale Posted February 25, 2009 Share Posted February 25, 2009 I used Milkshape whose importer is quite forgiving. I know where the problem lies. I can easily fix it today to get the exporter producer a SMD format complaint file. Link to comment Share on other sites More sharing options...
uomoartificiale Posted February 25, 2009 Share Posted February 25, 2009 Ok. Done. I tried the exported file with 3dsMax7 and the cannonFodder SMD import tool and it seems to work correctly. The model is imported with a dummy bone, just delete it. Downloads: source MOD: http://rapidshare.com/files/202314868/SparkIV_061SMD2.zip binary: http://rapidshare.com/files/202314778/Spar..._SMDExport2.zip Link to comment Share on other sites More sharing options...
Millenia Posted February 25, 2009 Share Posted February 25, 2009 Now I'm not getting any mesh when importing :E Tried with Max 09, 8 and Milkshape Link to comment Share on other sites More sharing options...
uomoartificiale Posted February 25, 2009 Share Posted February 25, 2009 could you please upload somewhere (zip it then rapidshare) the output.smd file? Link to comment Share on other sites More sharing options...
Millenia Posted February 25, 2009 Share Posted February 25, 2009 http://millenia.half-lifecreations.com/pri.../1235603102.rar There, it's the AK47 model Link to comment Share on other sites More sharing options...
SLAYERMAGGOT Posted February 25, 2009 Share Posted February 25, 2009 Ok. Done. I tried the exported file with 3dsMax7 and the cannonFodder SMD import tool and it seems to work correctly. The model is imported with a dummy bone, just delete it. Downloads: source MOD: http://rapidshare.com/files/202314868/SparkIV_061SMD2.zip binary: http://rapidshare.com/files/202314778/Spar..._SMDExport2.zip Can you please upload this to another hoster, please? Rapidshare is bitchy Link to comment Share on other sites More sharing options...
simkas Posted February 25, 2009 Share Posted February 25, 2009 Ok. Done. I tried the exported file with 3dsMax7 and the cannonFodder SMD import tool and it seems to work correctly. The model is imported with a dummy bone, just delete it. Downloads: source MOD: http://rapidshare.com/files/202314868/SparkIV_061SMD2.zip binary: http://rapidshare.com/files/202314778/Spar..._SMDExport2.zip How am I supposed to export into smd's with this? When I double click on a wdd file, I just get an error. Link to comment Share on other sites More sharing options...
Dj Paragon Posted February 25, 2009 Share Posted February 25, 2009 (edited) Hi ! Just a little question, will be possible in the future to replace a png with a bigger one ? Like replacing a 512 tex by a 1024 tex ? Or maybe the possibility to create a bigger tex inside the wtd ? Big thx for this great soft dude. EDIT: Oh sorry, I didn't saw this post. After 24 pages, I'm going to be tired ! lol Edited February 25, 2009 by Dj Paragon Link to comment Share on other sites More sharing options...
Fabio206 Posted February 25, 2009 Share Posted February 25, 2009 Hi ! Just a little question, will be possible in the future to replace a png with a bigger one ? Like replacing a 512 tex by a 1024 tex ? Or maybe the possibility to create a bigger tex inside the wtd ? Big thx for this great soft dude. Already asked http://www.gtaforums.com/index.php?showtop...st&p=1059006898 great work aru uomoartificiale sei italiano? Link to comment Share on other sites More sharing options...
jjcoolj91 Posted February 25, 2009 Share Posted February 25, 2009 this is very innovative, hope you or aru can expand more on this Scripting Link to comment Share on other sites More sharing options...
itchyflakes Posted February 25, 2009 Share Posted February 25, 2009 If you want to import the smd files to a newer version of max you can use the smd importer found here: http://www.wunderboy.org/3dapps.php#max_smd supports max 9, 2008 and 2009 (I only tested on 3ds max 2009) open the smd in note pad or similar application and add this to the beginning of the file: (without quotes) "version 1 nodes 0 "SMDImport" -1 end skeleton time 0 0 -0.241456 -0.134534 0.000000 0.000000 -0.000000 0.000000 end triangles" and at the very end of it add: "end".(without the quotes) so you should have something like this: (What is bolded is what you add in notepad.) version 1 nodes 0 "SMDImport" -1 end skeleton time 0 0 -0.241456 -0.134534 0.000000 0.000000 -0.000000 0.000000 end triangles feet_diff_002_a_uni 0 0.15625 -0.09765625 -0.9970703 0.3203125 -0.2617188 -0.9101563 0.6589661 -0.8873291 0 0.1391602 -0.1044922 -0.9970703 0.15625 -0.984375 -0.07421875 0.6951141 -0.9062653 0 0.1162109 -0.1005859 -0.9970703 -0.3085938 -0.875 -0.375 0.7484436 -0.9035797 feet_diff_002_a_uni 0 0.15625 -0.09765625 -0.9970703 0.3203125 -0.2617188 -0.9101563 0.6589661 -0.8873291 0 0.1162109 -0.1005859 -0.9970703 -0.3085938 -0.875 -0.375 0.7484436 -0.9035797 0 0.09765625 -0.08544922 -0.9970703 -0.4492188 -0.203125 -0.8671875 0.7907562 -0.8741608 end but obviously a lot more numbers in there, i shortened to show how it is done. Then fire up 3ds max import the smd and it should work. any questions just send me a pm. Link to comment Share on other sites More sharing options...
simkas Posted February 26, 2009 Share Posted February 26, 2009 (edited) When I import the smd into 3dmax 8 using that first one posted, the one that's supposed to work with milkshape, it imports the model, but some polygons seem to be missing. When I try to import it using that second one, the one that's supposed to work with 3dmax, it doesn't even import anything. Also, could you make it so it wouldn't always export the file with the exact same name "output"? Actually, it seems that importing Niko's head only gives me those missing polygons, I tried importing a torso model and it's perfectly fine. ACTUALLY, it seems that those missing polygons appear on the faces of all characters I import. Edited February 26, 2009 by simkas Link to comment Share on other sites More sharing options...
itchyflakes Posted February 26, 2009 Share Posted February 26, 2009 @simkas: The reason you get those polygons is because every time you view a model it gets exported to the same output.smd without replacing anything, delete or rename your current output.smd and from now on every time you view a model go to the output folder and rename it that way you won't get a mashup of all the models. Try doing what I said in my previous post, seems like the exported smd has some info wrong for my importer to work properly. The exported smd has this: version 1 nodes 0 model_bone -1 end skeleton time 0 0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 end triangles While the info i changed looks with this: version 1 nodes 0 "SMDImport" -1 end skeleton time 0 0 -0.241456 -0.134534 0.000000 0.000000 -0.000000 0.000000 end triangles I don't know if it will help you but it helped me with the problem I had of importing empty models and it solved the error I had while importing models Link to comment Share on other sites More sharing options...
simkas Posted February 27, 2009 Share Posted February 27, 2009 @itchyflakes When I export the smd using that second tool posted (the one that's supposed to work with 3dmax), it doesn't import anything into 3dmax. If I add those lines you said with notepad and try to import into 3dmax, it gives me some error about the program encountering some problem and it closes. If I export a smd with the first tool posted at the top of this page, it imports the model, but if it's a model of someone's head, the model is missing some polygons, mostly around the eyes. I'm using 3dmax 8 with cannofodder's SMD plugin. Link to comment Share on other sites More sharing options...
JKM Posted February 27, 2009 Share Posted February 27, 2009 @simkas: The reason you get those polygons is because every time you view a model it gets exported to the same output.smd without replacing anything, delete or rename your current output.smd and from now on every time you view a model go to the output folder and rename it that way you won't get a mashup of all the models. Try doing what I said in my previous post, seems like the exported smd has some info wrong for my importer to work properly. The exported smd has this: version 1 nodes 0 model_bone -1 end skeleton time 0 0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 end triangles While the info i changed looks with this: version 1 nodes 0 "SMDImport" -1 end skeleton time 0 0 -0.241456 -0.134534 0.000000 0.000000 -0.000000 0.000000 end triangles I don't know if it will help you but it helped me with the problem I had of importing empty models and it solved the error I had while importing models For me it worked very well... I can import Models.... but i hate that the geometry is only one mesh.... Head, hairs and stuff should be seperate it... and sometimes there are two or three faces for one polygon... but great to see the models in max Link to comment Share on other sites More sharing options...
aru Posted February 28, 2009 Author Share Posted February 28, 2009 Some very nice work here guys... I'll try to see how much of this I can reintegrate back into the SparkIV codebase and also try to add bones/skeleton support. I don't know how to contact the author of this wonderful tool, so I post my contribution here hoping he could notice. PM here, or my email is also available in the readme.txt file Link to comment Share on other sites More sharing options...
jjcoolj91 Posted February 28, 2009 Share Posted February 28, 2009 Some very nice work here guys... I'll try to see how much of this I can reintegrate back into the SparkIV codebase and also try to add bones/skeleton support. I don't know how to contact the author of this wonderful tool, so I post my contribution here hoping he could notice. PM here, or my email is also available in the readme.txt file this is, THE BEST NEWS i have heard all day, i hope you can do that aru for us Link to comment Share on other sites More sharing options...
solecist Posted February 28, 2009 Share Posted February 28, 2009 agh, when will we be able to import audio? the waiting is makin me crazy! Link to comment Share on other sites More sharing options...
simkas Posted February 28, 2009 Share Posted February 28, 2009 Would it be possible to make that importer not import the whole model as one mesh? Because for example the multiplayer character models have all the different head models and all the hair/facial hair models in one part and you can't even seperate them by selecting seperate elements. Link to comment Share on other sites More sharing options...
uomoartificiale Posted February 28, 2009 Share Posted February 28, 2009 1) Well, actually I suppose that the second version I posted (http://www.gtaforums.com/index.php?showtop...entry1059008508) should produce a smd file starting with: version 1nodes0 model_bone -1endskeletontime 00 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000end followed by the list of 3d vertices/faces: trianglesLOWR_DIFF_001_A_UNI0 -0.1582031 0.1806641 -0.9736328 0.8554688 -0.3359375 -0.390625 0.4984436 -0.31080630 -0.1801758 0.1079102 -0.9594727 0.8554688 -0.3359375 -0.390625 0.4974518 -0.30653380 -0.1914063 0.08349609 -0.9633789 0.8554688 -0.3359375 -0.390625 0.4968109 -0.3051605LOWR_DIFF_001_A_UNI0 -0.159668 0.1499023 -0.04492188 -0.1796875 -0.1171875 0.9765625 0.1687317 -0.0066223140 -0.1967773 0.04052734 -0.07958984 -0.25 -0.25 0.9375 0.2462158 -0.00503540 0.006347656 0.02539063 -0.02978516 0 -0.2695313 0.9609375 0.2184601 -0.003845215LOWR_DIFF_001_A_UNI0 0.1704102 0.1811523 -0.9746094 -0.09375 -0.2304688 -0.96875 0.5062256 -0.32888790 0.2133789 0.09033203 -0.9570313 -0.09375 -0.2304688 -0.96875 0.5068054 -0.32353210 0.1923828 0.1079102 -0.9594727 -0.09375 -0.2304688 -0.96875 0.5058899 -0.3247681LOWR_DIFF_001_A_UNI0 0.06494141 0.06054688 -0.9589844 0.01171875 -0.1523438 -0.9882813 0.4968262 -0.32476810 0.08105469 0.1704102 -0.9755859 0.01171875 -0.1523438 -0.9882813 0.5003967 -0.32997130 0.08251953 0.1049805 -0.965332 0.01171875 -0.1523438 -0.9882813 0.4989777 -0.3266907[[[... more and more stuff like this...]]]end Do your exported files follow this template? I post the output of the first ped in the componentpeds.img archive, the one named: f_m_business_01.wdd (middle-age woman): http://rapidshare.com/files/203555551/output.zip please confront your output with mine. 2) In max you can select the model then go to the modifier tab (left panel); then select the edit_mesh block (a warning message will pop-up: ignore it); select "element"; then select the different parts. 3) sorry aru I was probably blinded by the deprivation of sleep. I'm writing you right now. By the way, yes I'm italian. Link to comment Share on other sites More sharing options...
simkas Posted February 28, 2009 Share Posted February 28, 2009 2) In max you can select the model then go to the modifier tab (left panel); then select the edit_mesh block (a warning message will pop-up: ignore it); select "element"; then select the different parts. I said in my post that I can't even select the seperate heads in the MP character mesh even when using the element selection. Link to comment Share on other sites More sharing options...
simkas Posted February 28, 2009 Share Posted February 28, 2009 By the way, aru, could you add in something similar to the "change levels" function in OpenIV in the next version? Crap, double post. Link to comment Share on other sites More sharing options...
mcal9909 Posted March 2, 2009 Share Posted March 2, 2009 Hmm i got a problem with spark 0.6.2, it wont load anymore! it used to work as i used to it import the fual pump icons for the fuel mod thats on here, that was a week or so ago. now when i click the icon it crashes straight away this is the only info i could copy from the error report EventType : clr20r3 P1 : sparkiv.exe P2 : 0.6.2.0 P3 : 49a24ac6P4 : mscorlib P5 : 2.0.0.0 P6 : 4889dc80 P7 : 343f P8 : 119P9 : system.io.directorynotfound any ideas? i tried redownloading it and extracting again but no joy. Link to comment Share on other sites More sharing options...
aru Posted March 3, 2009 Author Share Posted March 3, 2009 @solecist... no ETA on audio import. @simkas... should be able to seperate WDD models into separate export.. wouldn't be that hard. Changing levels is really an odd feature that I don't want to support because it assumes that space is allocated for the extra levels if increasing (and its not always true), and it wastes memory space anyway when decreasing levels because all the existing data is still there. Changing levels should mean regenerating the entire texture memory data, which is better suited to an app like G-Texture. @mcal9909.. did you delete/reinstall GTAIV recently? It looks like its trying to find some directory and failing. I'd think its trying to find your GTAIV directory from your registry and failing. Try putting a gtaiv.exe in the same directory as SparkIV. Link to comment Share on other sites More sharing options...
mcal9909 Posted March 3, 2009 Share Posted March 3, 2009 (edited) @mcal9909.. did you delete/reinstall GTAIV recently? It looks like its trying to find some directory and failing. I'd think its trying to find your GTAIV directory from your registry and failing. Try putting a gtaiv.exe in the same directory as SparkIV. Thanks dude it worked, didnt reinstall it tho my hdd did fail a few days ago and decided to change drive letter so i guess that was the problem. but all is working now found the reg entry and yeah.. was showing f: instead of d: changed it and now works without the exe in the folder Edited March 3, 2009 by mcal9909 Link to comment Share on other sites More sharing options...
DerPlaya78 Posted March 5, 2009 Share Posted March 5, 2009 I coded a basic COLLADA exporter for SparkIV. Here's the source for a modified RageLib.Models.dll http://rapidshare.com/files/205759765/RageLib.Models.7z.html The new files are in the COLLADA subdir + export button code in ModelViewController and ModelView... This is not really finished, just a proof-of-concept (and won't be, don't have much time). For anyone who's interested here is what i did: - downloaded the COLLADA schema from http://www.collada.org/2005/11/COLLADASchema - removed some stuff from xsd file until the VS included xsd.exe could produce a CS classes file - cleaned the .cs and removed probably unused classes - wrote Exporter class which takes the data from a ModelNode and its Children and creates a COLLADA object, serializes this object with XMLSerializer into dae file and exports textures I only tested vehicle files... Normal map info is not exported because COLLADA format seems to have no standard format for normal maps and the proper way would be using the same shaders as the game. (i'm just using the first texture param for material...) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now