PDA

View Full Version : Hope you don't mind!



WhatEver
04-05-2002, 04:06 PM
Nothing new to some, but it sure looks cool http://www.opengl.org/discussion_boards/ubb/biggrin.gif.

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

Freak2 Sphere Mapping and VAR demo - 1.5MB (http://www.spider3d.com/dl/freak2.zip)

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

knackered
04-06-2002, 11:43 AM
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.

Humus
04-06-2002, 12:18 PM
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.

WhatEver
04-06-2002, 12:36 PM
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.

knackered
04-06-2002, 01:38 PM
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 http://www.opengl.org/discussion_boards/ubb/smile.gif ).
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.

WhatEver
04-06-2002, 03:43 PM
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.

WhatEver
04-06-2002, 03:45 PM
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 http://www.opengl.org/discussion_boards/ubb/redface.gif.

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

Rob The Bloke
04-07-2002, 01:46 AM
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....

Rob The Bloke
04-07-2002, 01:55 AM
Originally posted by WhatEver:
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 http://www.opengl.org/discussion_boards/ubb/redface.gif.

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

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.

knackered
04-07-2002, 05:42 AM
Wow, thank you Rob! I did not know that. Maybe I'll be able to track my bug down now...

WhatEver
04-07-2002, 06:06 AM
It didn't even cross my mind that knackered wouldn't have known about debugging a dll.

Thanks for all the help!

davepermen
04-07-2002, 06:13 AM
demo looks cool. just wanted to say that http://www.opengl.org/discussion_boards/ubb/smile.gif

jwatte
04-07-2002, 06:37 AM
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.

WhatEver
04-07-2002, 12:33 PM
Thx dave!

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