Welcome to
Mod The Sims
Online: 1973
News:
Have an account? Sign in:
pass:
If you don't have an account, why not sign up now? It's free!
Other sites: SimsWiki
Closed Thread  Replies: 67 (Who?), Viewed: 35658 times.
Search this Thread
Old 28th Oct 2010, 10:37 PM DefaultTeststing Completed: Blender 2.5 TS3 Tools #1
cmomoney
Original Poster

˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN

Join Date: Dec 2008
Posts: 1,825
Thanks: 103489 in 83 Posts
28 Achievements


Blender 2.5 TS3 Tools

Testing has been completed and the tools can be found in the Downloads section: http://www.modthesims.info/download.php?t=433882 I would like to thank all the testers who participated. Your help was valuable.

This script includes a set of tools for creating objects for TS3. Originally two scripts (import and export), I've merged them into one script and added several features:
  • Import/export - import/export MLOD and MODL files(.s3asc)
  • EZ Bake - bake multiplier images with just a few clicks
  • Image Loader - apply images to objects and get and idea how they will look in-game(including alphas)
  • Fix Seams - fix unsightly seams created when splitting vertices/edges(aligns vertex normals)
  • Make Glass - automagically give a group a glass material with one click(Blender viewing only)
  • Hide Bones - hide/show the bones in an object with one click

I would appreciate any help in testing and comments/suggestions.

Installation:

1. Download and extract the "io_TS3_tools.py" and put it where you can find it.
2. Start Blender and go to File->User Preferences(or press CTRL+ALT+U).
3. Click the "Add-Ons" button at the top of the User Preferences window.
4. Click the "Import/Export" button on the left, then click the "Install Add-On" button at the bottom.
5. Navigate to where you extracted the file and select the "io_TS3_tools.py" and click "Install Add-On". TS3 Tools is added to the the list.
6. Click the check box to the right of the TS3 Tools in the list. The importer/exporter is added to the File->Import menu, and the TS3 Tools and TS3 Image Loader panels are added to the Properties Editor under Scene.
7. Close the User Preferences window, and hit CTRL+U to save as default(if you want TS3 Tools to be there next time you start Blender).

Importing/Exporting:

Importing:
1. Select the MLOD/MODL in s3pe, right click on it, and select "export". Rename the the file to name.lod(for MLODs) or name.model(for MODLs). Renaming is really only necessary for files with long names, because Blender has a limit. Save the file in it's own folder.
2. Open the MLOD/MODL file with the S3 Object Tool and decompile it.
3. Start Blender, and in the Properties editor under Scene, click the Import button in the TS3 Tools panel or go to File->Import->Sims 3 MLOD/MODL. Navigate to the your folder and select the name_filebase.s3asc file.

To assign a new mesh to a group:

1. Right-click on the new mesh, the hold SHIFT and right-click on the mesh you want to replace.
2. Press TAB to o into Edit mode, Select all the vertices, and hit DELETE(X). Select "All" in the pop-up.
3. Press TAB to go back to Object mode, and press CTRL+J to join the new mesh to the group.

To assign vertices to the joints:
1. Right-click on the mesh and press TAB to go into Edit mode.
2. Select the vertices you want to add to a joint. In the Properties editor, select the "Object Data" panel(button with triangle/w dots at the corners).
3.In the "Object Data" panel under 'Vertex Groups', select the joint you want to assign to, and click assign.

Note: Make sure to triangulate all meshes before exporting. Select all vertices in Edit mode and press CTRL+T.

Exporting:
1. In the Properties editor under Scene, click the Export button in the TS3 Tools panel or go to File->Export->Sims 3 MLOD/MODL. Navigate to the folder you imported from, select the name_filebase.s3asc file, and press "Export MLOD/MODL".
2. Recompile the MLOD/MODL with the S3 Object Tool.
3. In s3pe, open the package. If you didn't rename the file when you exported it from s3pe, right-click and select 'Import'. If you did rename the file, right click on the MLOD/MODL and select 'Replace'.


EZ Bake:

note: You must have a UV/Image editor window open in your scene. Also, Material mode must be set to GLSL and Shading method to Textured to view the results on the mesh. See this tutorial.

1. Select the groups you want to bake.
2. In the TS3 Tools panel in the EZ Bake section, select the size of the image, and the baking method you want to use.
3. Click the Bake button. Press ALT+Z to change to Textured shading and see results on the mesh.
4. In the UV/Image editor, go to Image->Save As to save you image. Default format is .png. you will have to open your image in an graphics program to save it as a .dds. Also The image is a little too bright by TS3 standards, so you'll need to darken it as well(contrast, levels, etc.)

Image Loader

note: Material mode must be set to GLSL and Shading method to Textured to view the results on the mesh. See this tutorial.

1. Select the group you want to add an image to in the Image Loader panel. Click Open under whatever image you're trying to load(multiplier, mask, or overlay).
2. Navigate to the image and click Open.
3. If another group uses the same image, select that group in the Image Loader, click the button with the picture on it(Browse ID data), and find the image in the list. Press ALT+Z to change to Textured shading and see results on the mesh. If some groups appear invisible, it is because no images are loaded for them.
4. To remove an image from a group, simply click the X next to that image.

Fix Seams:

note: If you use Fix Seams, you cannot go into Edit mode with the group you used it on, or Blender will recalculate the vertex normals and undo the fix. You can use Edit mode on other groups as long as you haven't used Fix Seams on them. Fix Seams Should probably be one of the last things you do before exporting. Also, the result may not be visible, and the only way to verify that it worked is to go into Edit mode and turn on the vertex normals. But then Blender will undo the fix once you go back to Object mode, so you'll have to do Fix Seams again. :P

1. While in Edit mode, select the only the vertices of the seam(it may be easier to select the edges in edge select mode). Do the same for all groups that have seams you want to fix.
2. While in Object mode, select all the groups that have seams to fix and click the Fix Seams button. If there were no problems, 'Alignment complete' will printed in the Console.

Show/Hide Bones:

Simply click the button to hide all bones in the object, and click again to show them.

Make Glass:

Select the group(s) you want to make glass and click Make Glass. Press ALT+Z to change to Textured shading and see results on the mesh.
note: This does not make your object glass in-game. It's is merely a representation for viewing in
Blender.

Issues:
Complex objects such as beds, cars, etc., will not represent the bones correctly.
Importing more than one MLOD/MODL can cause problems. To start a new project, you should restart Blender.
Screenshots
Click image for larger version

Name:  panels.jpg
Views: 0
Size:  30.8 KB  

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Last edited by cmomoney : 15th Feb 2011 at 9:35 PM.
Old 2nd Nov 2010, 4:12 PM #2
cmomoney
Original Poster

˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN

Join Date: Dec 2008
Posts: 1,825
Thanks: 103489 in 83 Posts
28 Achievements


Updated: fixed inverted x axis for bones on import.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Old 5th Nov 2010, 8:31 PM #3
cmomoney
Original Poster

˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN

Join Date: Dec 2008
Posts: 1,825
Thanks: 103489 in 83 Posts
28 Achievements


Updated:
- fixed to work with Blender 2.55 release
- eliminated use of text file for data storage
- rewrite for faster processing

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Old 5th Nov 2010, 9:27 PM #4
leefish
Sesquipedalian Pisciform



Join Date: Jul 2008
Posts: 6,570
Thanks: 107197 in 124 Posts
39 Achievements

View My Journal


Looking very cool CMo Thanks for this

More downloads by Leesester, BoilingOil and others at Leefish.nl | My Stuff at Leefish.nl | LeeFish RSS | Sims4 News Blog | TumblinLeefish
Old 23rd Nov 2010, 7:16 PM #5
cmomoney
Original Poster

˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN

Join Date: Dec 2008
Posts: 1,825
Thanks: 103489 in 83 Posts
28 Achievements


Huge update! I merged to two scripts into one and added many features. See first post.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Old 24th Nov 2010, 12:38 AM #6
orangemittens
Alchemist

Join Date: Mar 2005
Posts: 2,934
Thanks: 15173 in 28 Posts
14 Achievements


You *know* how happy this makes me Cmo Thank you for sharing it

ps: especially the EZ Bake
Old 24th Nov 2010, 2:28 AM #7
orangemittens
Alchemist

Join Date: Mar 2005
Posts: 2,934
Thanks: 15173 in 28 Posts
14 Achievements


sorry for the double post...but I'm wondering how many joints Blender supports. Is it more than 128?
Old 25th Nov 2010, 4:04 AM #8
cmomoney
Original Poster

˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN

Join Date: Dec 2008
Posts: 1,825
Thanks: 103489 in 83 Posts
28 Achievements


I don't know of any limit. You can easily add 1000+ joints to Blender without it crying foul.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Old 25th Nov 2010, 6:49 PM #9
orangemittens
Alchemist

Join Date: Mar 2005
Posts: 2,934
Thanks: 15173 in 28 Posts
14 Achievements


Ty (xtra so it lets me post)
Old 7th Dec 2010, 7:18 AM #10
Flowerpower42
Test Subject

Join Date: Aug 2005
Posts: 15


Thank you very much for this cmomoney, i waited so long for this.
Old 12th Dec 2010, 8:23 AM #11
Dizor
Test Subject

Join Date: Feb 2009
Posts: 33


Looks very intresting, but I still want to jump into creating CAS stuff. Still, I might download and fiddle with it a bit
Old 30th Dec 2010, 3:48 AM #12
Suncat
Lab Assistant

Join Date: Aug 2008
Posts: 119
Thanks: 755 in 3 Posts
3 Achievements


The installation worked fine. (Still not ready to actually try it yet.)

You might want to edit the installation instructions--a couple of points still refer to two files.
Old 30th Dec 2010, 4:38 PM #13
cmomoney
Original Poster

˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN

Join Date: Dec 2008
Posts: 1,825
Thanks: 103489 in 83 Posts
28 Achievements


Thanks for the report and the heads up on the instructions.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Old 2nd Jan 2011, 2:22 AM #14
simoro
Test Subject

Join Date: Mar 2010
Posts: 39
Thanks: 562 in 20 Posts
5 Achievements


Don't know if this post is still running, but I downloaded blender 2.56, and installing the add-on works fine, but when I try the import with either method, I get an error message (see attached picture). Basically, no file browser window pops up, and blender complains about not having access to a resource. I would have gotten 2.54 or 2.55, but it looks like they only offer the new hotness.
Screenshots
Click image for larger version

Name:  blenderImportError.jpg
Views: 0
Size:  19.9 KB  
Old 2nd Jan 2011, 11:15 AM #15
orangemittens
Alchemist

Join Date: Mar 2005
Posts: 2,934
Thanks: 15173 in 28 Posts
14 Achievements


You can get 2.54 beta from the Blender release archive:

http://www.blender.org/download/get...older-versions/
Old 2nd Jan 2011, 2:04 PM #16
simoro
Test Subject

Join Date: Mar 2010
Posts: 39
Thanks: 562 in 20 Posts
5 Achievements


Shiny, 2.55 worked no problem. (^_^) Thanks.
Old 2nd Jan 2011, 2:26 PM #17
cmomoney
Original Poster

˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN

Join Date: Dec 2008
Posts: 1,825
Thanks: 103489 in 83 Posts
28 Achievements


2.56 changed the API a tad bit. I've already fixed my script for it, but I want to do more testing before I upload it. If you want the 2.56 version I can send it to you.

eta: the 2.56 version has a problem exporting modified uv maps. Gotta figure it out before I release it.

eta: Nevermind...I'm and idiot and and it works. Still testing...

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Last edited by cmomoney : 3rd Jan 2011 at 7:04 AM.
Old 4th Jan 2011, 6:00 PM #18
matimalia
Test Subject

Join Date: Jul 2009
Posts: 5


hello,
until now, i've got the blender and de TS3 Tools, but !!!
I don't find the windows of ADD ONS with the pannel of install, unable to find it, ten times i returns but no results, can i have a screenshot for each step of procιdure please.
thank you very much and happy new year for alls.
Old 4th Jan 2011, 6:23 PM #19
cmomoney
Original Poster

˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN

Join Date: Dec 2008
Posts: 1,825
Thanks: 103489 in 83 Posts
28 Achievements


You have to go to the File menu and select User Preferences(or press CTRL+ALT+U). The User Preferences window looks like this:



The Install Add-On button is at the bottom-left.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Old 8th Jan 2011, 5:00 PM #20
simoro
Test Subject

Join Date: Mar 2010
Posts: 39
Thanks: 562 in 20 Posts
5 Achievements


With 2.54 and 2.55, the models import fine, but exporting doesn't seem to be doing anything. I am not getting any errors, and it says the export was successful, but no change to the file. Even tried exporting it to a different file name, and the file is never created. All I am doing is scaling the object on the z-axis to make it taller to test some effects in the game.
Old 8th Jan 2011, 7:21 PM #21
cmomoney
Original Poster

˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN

Join Date: Dec 2008
Posts: 1,825
Thanks: 103489 in 83 Posts
28 Achievements


How did you know it was unchanged, by comparing the files or testing in-game? It won't create a new file, it overwrites the originals.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Old 9th Jan 2011, 2:07 AM #22
simoro
Test Subject

Join Date: Mar 2010
Posts: 39
Thanks: 562 in 20 Posts
5 Achievements


Oro, I kind of figured out what was going on. All I was doing was scaling the whole object along the Z axis. If I actually go into edit mode and move vertex points around, and export, it saves those changes no problem. It does not seem to register changes made by the just the scaler in either object mode or edit mode. Kind of weird.
Old 9th Jan 2011, 5:40 AM #23
cmomoney
Original Poster

˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN

Join Date: Dec 2008
Posts: 1,825
Thanks: 103489 in 83 Posts
28 Achievements


Changes made in Object mode aren't reflected because you're not actually changing the mesh. The object is just a container for the mesh. In Edit mode, you're changing vertex locations in the mesh, and that's what gets exported. Moving the object around in Object mode doesn't export because you're not changing the position of the mesh in relation to the origin. Any changes made to the mesh(including scaling) in Edit mode get exported, for example, I made the tissue box into a tissue not-a-box:


Anyway, I appreciate you testing this and reporting for me.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Old 9th Jan 2011, 8:01 PM #24
kathaludlee
Test Subject

Join Date: Jan 2011
Posts: 7


Hey there,

is there any other way to get the add-on installed? Every time I try to open the user preferences dialog, blender just crashes. Is it possible to just copy the script into the right folder and get blender recognize the file somehow else?

Greetings
Old 9th Jan 2011, 8:21 PM #25
cmomoney
Original Poster

˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN

Join Date: Dec 2008
Posts: 1,825
Thanks: 103489 in 83 Posts
28 Achievements


Try changing the Editor type to the User Preferences, instead of starting the new window. It's the button usually in the corner of every header/footer with a pic and up/down arrows on it.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Closed Thread


Section jump:


Powered by MariaDB Some icons by http://dryicons.com.