|
14th March 2004, 06:39 AM | #1 |
Senior Member
Professional user
Join Date: Nov 2003
Location: Eugene OR, USA
Posts: 212
|
Please Help!
k this is my first time writing a plugin for any application and i need a little help.
i have the ac3d sdk, all the newest headers, and ac3d.lib. my problem is, that i dont know how to compile anything thats not a win32 application. so how can i write a plugin file '.p' for ac3d? im using VC++.NET im trying to write a terrain genarator plugin. i have most the code finish, but its a compiled as win32 that exports a .ac file which i can load into ac3d(still not finished writing the exporter :wink: ) im trying to get this to be a plugin....can anyone help? thanx Philip |
14th March 2004, 08:12 AM | #2 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
Re: Please Help!
The samples come with a makefile. It's quite simple.
compile with 'nmake -f <makefilename>' If you want to do it all inside VC++, you will need to make a dll and rename the .dll to .p (a .p file is a dll) Andy |
14th March 2004, 08:41 AM | #3 | |
Senior Member
Professional user
Join Date: Nov 2003
Location: Eugene OR, USA
Posts: 212
|
Re: Please Help!
Quote:
also how do i create create a .dll, sorry never messed with that type o thing before :roll: Philip |
|
15th March 2004, 06:31 AM | #4 |
Senior Member
Professional user
Join Date: Nov 2003
Location: Eugene OR, USA
Posts: 212
|
Re: Please Help!
k, ive completed my the basic terrain generator
still need to tweak it, add a few things, and fix a couple of bugs. heres some screens of terrains imported into ac3d: basic terrain, with water... testing out the uv's... two terrains 'stiched' together, then smoothed, texture = hieghtmap... all the terrains are exported as quads, no textures. mabye ill make it export as triangles later. BUGS: .if you notice on the last one, there are a couple of holes... beets me they arnt there until i triangulate the terrain in ac3d, so im thinking it might be a bug in the triangulate comand, mabye. if i dont triangulate, i end up with these nasty red sufaces, because the surface is 'bent' to much in the wrong direction. .it supports .bmp files, but it freezes when they are 256x256 or bigger i think this is because i make a vertex for every pixel of the bitmap, so 256x256 is quit a lot of vertex's. id rly like to make this into a plugin, but im still trying ot figure out how to make a .dll file. ive search for tutorials online, and came up with zero anybody know of any site that would help me? also... anyone have any ideas about what should be added in? im thinking about making a 'sphereical' terrain mode, so you could make a 'world' with the terrain map. thanx Philip |
15th March 2004, 11:59 AM | #5 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
Re: Please Help!
Very nice!
use nmake from a command prompt. Have a look at the makefile in the SDK. To make a dll from inside VC++, select it as the type when you make a new project. Andy |
16th March 2004, 04:29 AM | #6 | ||
Senior Member
Professional user
Join Date: Nov 2003
Location: Eugene OR, USA
Posts: 212
|
Re: Please Help!
wow i must have been completely blind to have missed the DLL radio button. lol
k so i can make a .dll(or .p) but now im having problems with code the code: Quote:
it makes acTest.dll wich i change to acTest.p and drag into the plugins folder. i get this message as ac3d boot: Quote:
is it because i have nothing in AC3DPluginInit()? Philip |
||
16th March 2004, 06:00 AM | #7 |
Senior Member
Professional user
Join Date: Nov 2003
Location: Eugene OR, USA
Posts: 212
|
Re: Please Help!
k ive updated the terrain generator by adding:
.save as triangles or quads .smart surface smart surface, is a nifty little option i add to remove 'jagged' edges example: SmartSurface OFF... SmartSurface ON... notice the difference .the holes problem is fixed .and i made it so you could make terrains out of larger images, like this one... 131, 072 triangulated surfaces, made from a 256x256 image i dont know exactly how big of images it handles. i realy want to make this into a plugin, so any help on plugin writing would be great. Philip |
16th March 2004, 10:44 AM | #8 |
Senior Member
Professional user
Join Date: Jul 2003
Posts: 899
|
Re: Please Help!
Here are the basic steps I've found works to write an ac3d plugin in Visual Studio (using version 6):
1. Create a DLL project 2. Include the ac3d.lib library 3. Include the ac_plugin.h file 4. In Project settings: Add "WINDOWS" (without quotes) to "Preprocessor definitions" in C/C++ tab Set "Output file name" to [projname].p in Link tab If you follow all of these steps, it *should* work. I learned to use the AC3D plugins by copying off and editing the "test.c" code that came with the plugin samples in the "dev/plugins" folder. Can you get that code to work for you? EDIT: Changed the ac3d.h file to ac_plugin.h |
17th March 2004, 01:57 AM | #9 |
Senior Member
Professional user
Join Date: Nov 2003
Location: Eugene OR, USA
Posts: 212
|
Re: Please Help!
thank you, thats exactly what i wanted to know.
well it works, ive now got to start making the plugin. Philip |
23rd March 2004, 11:47 PM | #10 |
Senior Member
Professional user
Join Date: Nov 2003
Location: Eugene OR, USA
Posts: 212
|
Re: Please Help!
k, im having trouble creating an object that i can add vertex's to, and then submit back to ac3d.
how-to anyone? Philip |
|
|