20th April 2005, 04:26 AM | #1 |
Senior Member
Professional user
Join Date: Jul 2003
Posts: 899
|
PLUGIN: Enhanced OBJ exporter available
I've developed a new OBJ exporter for AC3D. All the features of the existing AC3D export, but adds groups, lines, textures, and optional copying of textures to the OBJ output directory.
Windows-only, but source is included if you can (or know someone who can) compile it for other platforms. Find it here: http://supercoldmilk.com/ac3dplug/objenh.html See all of my plugins at http://supercoldmilk.com/ac3dplug/index.html Enjoy |
5th April 2006, 05:08 AM | #2 |
Senior Member
Professional user
Join Date: May 2005
Posts: 147
|
Dennis,
Setting up in a new computer I've downloaded all your plugins again and re-installed. I notice the directions for this install direct us to place the .tcl and .p into /scripts. Your others usually indicate /plugins as the location for these (ie Wave) and /scripts for .tcl only (ie Crease). Is there a reason for this diference? Dont really understand the functional dif between placement in those two folders. btw, Doing this has reinforced my realisation of how much your efforts have improved my hobby. Thanks again, mate.
__________________
Spinner Blessed are the cracks, For they let in the light |
5th April 2006, 12:49 PM | #3 | |
Senior Member
Professional user
Join Date: Jul 2003
Posts: 899
|
Quote:
I've corrected this and reposted the page. To answer the question about scripts versus plugins: Scripts are anything written entirely in Tcl/Tk (these are the .tcl files). Basically, this is text-based code that ac3d can use on any platform. You could open one of these files in a text editor, and there's your source code for the script. Plugins require a compiled program (the .p file), and normally perform operations outside the scope of what's possible in ac3d + tcl. Plugins are specific to platforms (Windows/Mac/Linux), so it's nice to use scripts where we can to alleviate having to compile a different version for each platform. AC3D treats the .tcl files for plugins a bit differently than it treats the .tcl files for scripts, so that's why they're in separate directories. Good to hear you're getting use out of these plugins - always glad to help out! Dennis |
|
14th April 2006, 09:32 PM | #4 |
Junior Member
Junior member
Join Date: Apr 2006
Posts: 4
|
Nice!!! but it does not work properly, Im trying to export a file that uses textures and simple color materials (AC3D materials) and it does not export the color materials to the mtl file and uses the texture insted.
|
14th April 2006, 11:10 PM | #5 |
Senior Member
Professional user
Join Date: Jul 2003
Posts: 899
|
This should work properly. Can you post an example? The contents of the .mtl file should suffice.
Dennis |
15th April 2006, 08:31 AM | #6 |
Junior Member
Junior member
Join Date: Apr 2006
Posts: 4
|
This is the file Im trying to export:
[/url]http://members.lycos.co.uk/chono00/m998-enh.zip The file contains the obj and mtl files I get and a screenshot of the generated file. Also I think AC3D groups option is not working. By the way where can I get ac_plugin.h to compile your plug in? -------------------------------------- The original AC3D OBJ exporter also has some bugs. Sometimes, I think when you use textures, it starts the texture coordinate count at 2 not 1, so the first vt is never used and the last f line has a wrong vt (vt_lines + 1) |
15th April 2006, 08:52 AM | #7 | |
Junior Member
Junior member
Join Date: Apr 2006
Posts: 4
|
Quote:
|
|
15th April 2006, 11:40 AM | #8 |
Senior Member
Professional user
Join Date: Jul 2003
Posts: 899
|
I see the material you're talking about --- at the bottom of the vehicle and the turret, correct? I'm not sure why the AC3D loader isn't recognizing these assignments. I loaded the OBJ model into trueSpace, and all materials show up fine.
So this seems to be a problem with the OBJ loader, not the exporter. Let me know if you find anything that may be related to the exporter, and I'll be glad to have a look at it. Oh, and send a private message to Andy to get the ac_plugin.h header - it's part of the AC3D SDK. Dennis |
15th April 2006, 11:57 AM | #9 |
Senior Member
Professional user
Join Date: Jul 2003
Posts: 899
|
Probably worth mentioning, and anyone feel free to correct me here, but I think the main purpose of the importers/exporters in AC3D are to get the geometry loaded/saved --- materials are tricky, because not all applications treat them the same.
A good example of this is the OBJ format and applying textures. OBJ allows multiple textures per object, but AC3D only allows one texture per object --- this makes importing objects with textures problematic, as a choice had to be made between splitting up the object into multiple objects to support different textures (thus losing shared vertex advantages), and loading only one texture (the loader author went with the latter, probably a good choice as the geometry is often more important than the surfacing when loading into a modeler). This is likely causing the materials not to load properly per-surface as well... |
15th April 2006, 11:35 PM | #10 |
Junior Member
Junior member
Join Date: Apr 2006
Posts: 4
|
Thanks Dennis!!! Your work and cooperation really helped me!!!
I think the problem is in (as you said) the OBJ importer. Seems like the AC3D OBJ importer and exporter modules are very simple (missing a lot of features). |
|
|