Go Back   AC3D Forums > Resources > AC3D Plugins and Other Resources
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 20th April 2005, 04:26 AM   #1
Dennis
Senior Member
Professional user
 
Dennis's Avatar
 
Join Date: Jul 2003
Posts: 899
Default 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
Dennis is offline   Reply With Quote
Old 5th April 2006, 05:08 AM   #2
Spinner
Senior Member
Professional user
 
Join Date: May 2005
Posts: 147
Default

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
Spinner is offline   Reply With Quote
Old 5th April 2006, 12:49 PM   #3
Dennis
Senior Member
Professional user
 
Dennis's Avatar
 
Join Date: Jul 2003
Posts: 899
Default

Quote:
Originally Posted by Spinner
I notice the directions for this install direct us to place the .tcl and .p into /scripts.
Seems you've found a typo here ops:

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
Dennis is offline   Reply With Quote
Old 14th April 2006, 09:32 PM   #4
chono00
Junior Member
Junior member
 
Join Date: Apr 2006
Posts: 4
Default

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.
chono00 is offline   Reply With Quote
Old 14th April 2006, 11:10 PM   #5
Dennis
Senior Member
Professional user
 
Dennis's Avatar
 
Join Date: Jul 2003
Posts: 899
Default

This should work properly. Can you post an example? The contents of the .mtl file should suffice.

Dennis
Dennis is offline   Reply With Quote
Old 15th April 2006, 08:31 AM   #6
chono00
Junior Member
Junior member
 
Join Date: Apr 2006
Posts: 4
Default

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)
chono00 is offline   Reply With Quote
Old 15th April 2006, 08:52 AM   #7
chono00
Junior Member
Junior member
 
Join Date: Apr 2006
Posts: 4
Default

Quote:
Also I think AC3D groups option is not working.
The plugin writes AC3D groups info, but AC3D does not parse it.
chono00 is offline   Reply With Quote
Old 15th April 2006, 11:40 AM   #8
Dennis
Senior Member
Professional user
 
Dennis's Avatar
 
Join Date: Jul 2003
Posts: 899
Default

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
Dennis is offline   Reply With Quote
Old 15th April 2006, 11:57 AM   #9
Dennis
Senior Member
Professional user
 
Dennis's Avatar
 
Join Date: Jul 2003
Posts: 899
Default

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...
Dennis is offline   Reply With Quote
Old 15th April 2006, 11:35 PM   #10
chono00
Junior Member
Junior member
 
Join Date: Apr 2006
Posts: 4
Default

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).
chono00 is offline   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



All times are GMT -4. The time now is 03:42 AM.


AC3D Forum
(C) Inivis Limited 2020