Hope you don't mind!

Nothing new to some, but it sure looks cool .

The model was exported from LightWave3D directly into my Spider3D file format.

Freak2 Sphere Mapping and VAR demo - 1.5MB

It’s recomended that you have a GeForce for best performance…but it should run if you don’t have one…with the exception of the Voodoo cards.

Copy and paste to see a screenshot: http://www.spider3d.com/img/freak.jpg

Have you tried writing a geometry exporter for 3dsmax? I’d be interested in seeing the source code if you have, because my exporter seems to be treading on max’s toes in various ways, causing it to be most unreliable.

Originally posted by WhatEver:
It’s recomended that you have a GeForce for best performance…but it should run if you don’t have one…with the exception of the Voodoo cards.

Doesn’t work on Radeon 8500. Pops up an error box saying something like “Couldn’t initialize VAR” and exits.

Humus, I guess I missed that bit of code. I’ll make sure it runs on all cards weather you have VAR or not later on some time.

knackered, I don’t have MAX so I haven’t tried to make an exporter yet. I would LOVE to support MAX, but I have no money for it.

I take it that MAX plugins aren’t well documented either. LW docs are pretty thin…and most of it you have to figure out yourself.

No, there’s reasonable documentation on the subject, but it still crashes max every so often!
Sorry you can’t afford max, I only wish I could email it to you! (but maybe the authors would object ).
Have you tried that cut down free version of max? It’s apparently available on their website…and I think there’s a free version of maya too.

There’s a free Maya?

gMAX is free. Is it possible to write plugins for it? Hmmmmm…I might just look into that once I’m squared away with the s3d export plugin for LW.

Are you making sure you delete any memory you’ve allocated in your plugin?

Another problem could be this; I had forgotten two things. UV coords are 2 elements not 3. I forgot to reinit an i variable back to 0 during other passes. Those bugs are hard to find .

[This message has been edited by WhatEver (edited 04-06-2002).]

Originally posted by WhatEver:
There’s a free Maya?

Yes, It’s S**t! Slaps big copyright notices on everything, very annoying. They have disabled file IO from mel, the use of plugins and any other means of getting data out.

I have managed to export stuff from it though, but in a very around the houses method using the limited size of the output window of the script editor (75 lines by 200 chars), a very clever mel script and a lot of ctrl+C, ctrl+V usage. I am however lucky enough to have a fully legit version so I don’t need to worry…

In terms of MAX exporters, check out a few projects on sourceforge that have some handy source code for exporting stuff…

Originally posted by WhatEver:
[b]Are you making sure you delete any memory you’ve allocated in your plugin?

Another problem could be this; I had forgotten two things. UV coords are 2 elements not 3. I forgot to reinit an i variable back to 0 during other passes. Those bugs are hard to find .

[This message has been edited by WhatEver (edited 04-06-2002).][/b]

Sorry if you already know this, but I’m kinda wandering if you know how to debug a plugin?

In case you don’t, In the project settings for your plugin, go to the debug tab. In the “Executable for Debug Session” field, put the path to Max (or LW or Maya).

Change the catagory to “Additional Dlls”. In the big boxy bit, place the path to your dll that you want to debug (sometimes they try to invent new extensions like *.mll for maya but they will work anyway).

You should now be able to step into your plugin.

Wow, thank you Rob! I did not know that. Maybe I’ll be able to track my bug down now…

It didn’t even cross my mind that knackered wouldn’t have known about debugging a dll.

Thanks for all the help!

demo looks cool. just wanted to say that

It’s really easy to revert to “plain old” vertex arrays if you don’t have the VAR extension. There’s two ways:

  1. if you don’t have the extension, just don’t call the functions, and call malloc()/free() instead of wglAllocMemory().

  2. write static do-nothing versions of the extension functions and set your extension function pointers to point to them when the extension is not supported. Then you don’t need to test anything at runtime.

Remember that AllocateMemory may return NULL even when the extension is supported, on PCI cards or systems with small AGP apertures, so you should fall back to malloc() anyway when allocating your VAR memory chunk.

Thx dave!

Good idea jwatte! I’m pretty knew to function pointers so it rarely crosses my mind how I can use them effectivly.