Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Pages: [1] 2  All

Author Topic: Blender->3DS (WME geometry file) exporter  (Read 39965 times)

0 Members and 1 Guest are viewing this topic.

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Blender->3DS (WME geometry file) exporter
« on: December 22, 2004, 04:28:05 PM »

Hiya,

since WME 1.3 is released, we were searching for a possibility to export those 3ds geometry files from Blender. Unfortunately all python scripts I discovered were buggy or did not export cams and lights. So nihil, Mnemonic and myself were hanging around in the #wme IRC channel to find a solution. And *ta-daaa* here it is!

Combining all our Python knowledge (0 + 0 + 0 = 0), we extended one of those old Python exporters. Please note that the resulting 3ds files are in a VERY old format and 3dsmax doesn't even load some lights into their correct position. But ok, the goal was to get rid of the commercial 3dsmax anyway - and it works fine with WME.

No more words, there are too many exceptions to explain, just test it yourself.

The python script can be found here:

http://wme.jerrot.de/export-3ds-0.82.zip

Please test, ask, report...  :D

UPDATE (28-12-2006): trosa wrote an excellent tutorial in the WME-Wiki how to export hidden geometry from Blender to WME. For that purpose he modified the exporter to allow exporting single objects instead of just ALL of them in your scene. Find out more about it as well as the modified exporter (0.90) here:

http://wiki.dead-code.org/wakka.php?wakka=BlenderHiddenGeometryExport
« Last Edit: December 28, 2006, 12:15:29 AM by Jerrot »
Logged
Mooh!

Nihil

  • Supporter
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 528
  • Fear me! I'm evil!
    • View Profile
    • Order of Dagon
Re: Blender->3DS (WME geometry file) exporter
« Reply #1 on: December 22, 2004, 04:29:45 PM »

Quote
Please test, ask, report...

... and don't forget to praise Jerrot afterwards, he deserves it ;-)

Martin

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 29
    • View Profile
Re: Blender->3DS (WME geometry file) exporter
« Reply #2 on: December 22, 2004, 10:19:11 PM »

I can't test it now, but the sheer effort deserves congratulations::rock  ::thumbup

Nihil

  • Supporter
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 528
  • Fear me! I'm evil!
    • View Profile
    • Order of Dagon
Re: Blender->3DS (WME geometry file) exporter
« Reply #3 on: December 22, 2004, 10:43:02 PM »

If you try it, one thing is important: You have to scale down the actors when you work with scenes exported from Blender - at least when you use Trinity and the teapot for testing. Scaling them down to 3 or 4 seems to be a good value. Otherwise they are insanely big compared to the scene ;-) (the scaling is done in the .act3d-file)

Orange Brat

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 112
    • View Profile
    • Orange Brat Shenanigans™
Re: Blender->3DS (WME geometry file) exporter
« Reply #4 on: December 22, 2004, 11:41:46 PM »

The Blender UI is a bit of a mess, but I'll have to give it another looking over now that this plugin works with WME. I'm in need of an all in one editor, so maybe this will be the one. I own Caligari Gamespace but that is one unstable mess, although it's getting better. It has a Milkshape export that works, but I have no idea if its 3DS exports lights/cameras.
Logged
The Disenfranchised™ - coming later

Nihil

  • Supporter
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 528
  • Fear me! I'm evil!
    • View Profile
    • Order of Dagon
Re: Blender->3DS (WME geometry file) exporter
« Reply #5 on: December 22, 2004, 11:54:03 PM »

I had the exact same feeling about the UI when I started with Blender, but meanwhile, after I got used to it, it has turned out to be very logical and time saving once I learned the most important hot keys. It takes a while to get used to it as it's completely different than every other UI I have used before, but it's definately worth a try. At least because of it's unbeatable price ;-)

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re: Blender->3DS (WME geometry file) exporter
« Reply #6 on: December 23, 2004, 04:29:17 PM »

If you try it, one thing is important: You have to scale down the actors when you work with scenes exported from Blender - at least when you use Trinity and the teapot for testing. Scaling them down to 3 or 4 seems to be a good value. Otherwise they are insanely big compared to the scene ;-) (the scaling is done in the .act3d-file)

Yes, that's why - in my first attempts - I always landed INSIDE the tea pot.  ::)
Logged
Mooh!

Orange Brat

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 112
    • View Profile
    • Orange Brat Shenanigans™
Re: Blender->3DS (WME geometry file) exporter
« Reply #7 on: December 23, 2004, 09:34:45 PM »

Is there a certain scale that should be used when coming from Blender? I tried exporting the default scene that loads when you start Blender and when I import that into the 3D demo, I don't see it when the "display scene geometry" box is checked. Do the blocks have to be named as described in the manual for Sceneedit to display them?
« Last Edit: December 23, 2004, 09:48:39 PM by Orange Brat »
Logged
The Disenfranchised™ - coming later

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re: Blender->3DS (WME geometry file) exporter
« Reply #8 on: December 23, 2004, 09:48:12 PM »

Is there a certain scale that should be used when coming from Blender? I tried exporting the default scene that loads when you start Blender and when I import that into the 3D demo, I don't see it when the "display scene geometry" box is checked.

No, that's not a scaling problem, I tested it with that standard cube, too. But probably you didn't rename it from "Cube" to something you want it to be, e.g. if you want the cube to be a "blocking area", you have to rename it to something like "blk_cube" according to the WME docs.

(Of course you should also add some walking plane (e.g. "walk_floor") and a light to lighten your actor to make it working, but for a quick test it works fine.)
Logged
Mooh!

Orange Brat

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 112
    • View Profile
    • Orange Brat Shenanigans™
Re: Blender->3DS (WME geometry file) exporter
« Reply #9 on: December 23, 2004, 09:55:07 PM »

Thanks..I just discovered that and had edited my post. I'm slowly getting the prerequisites down. ;)
Logged
The Disenfranchised™ - coming later

Orange Brat

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 112
    • View Profile
    • Orange Brat Shenanigans™
Re: Blender->3DS (WME geometry file) exporter
« Reply #10 on: December 23, 2004, 11:15:28 PM »

I've found a situation that seems to always result in Blender crashing when exporting with the plugin.

Open Blender and rename the default cube to "blk_Cube". I don't think the Cube part matters..it's the blk part that is important. Export WME/Studio and then click to the Export to 3DS button. Every single time it'll crash. This will also happen if I do what I just described and then add another mesh(like a cone) and then export the 2 objects out.  However, if I start Blender and instead rename the default cube to "walk_Cube" it won't crash. If I then rename it from "walk_Cube" to "blk_Cube" it also won't crash. Likewise, if I start Blender and delete the default cube and then add another mesh and rename it to "blk_???" it won't crash.

So, for whatever reason, renaming the default cube to "blk_?????" and exporting results in a consistent crash...at least on my machine.
Logged
The Disenfranchised™ - coming later

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re: Blender->3DS (WME geometry file) exporter
« Reply #11 on: December 24, 2004, 03:14:52 AM »

I've found a situation that seems to always result in Blender crashing when exporting with the plugin.

Hmmm, hmmm... yes, you're right. :(
It's funny, I never tested to move the script to the scripts folder yet, my first thought was "what Export Button ?!" :) (I always loaded it into Blender's text editor and started it there, but it's the same result.)

Anyway - that's IMHO not the problem, neither is it the renaming itself, although you nicely tracked it down to something I could reconstruct, thanks for that. Another funny test: run a windows shell window and start Blender from there. In this case it does not crash for me. (But it crashed when I closed the Blender window, argh!)

I can't say too much about it yet, I had thousands of crashes while testing already and it only went a little better since I went back to Python 2.3 ! If we were in older DOS times I would try to increase the stack memory for Blender, which could explain it reacts differently when running it from a shell, but... I'm clueless up to now. ???

I'll try to have a deeper look into after christmas, but I've got the bad feeling that there are still heavy memory leaks in Blender's Python integration... or I just don't know how to handle these things yet.

Edit:
Blender 2.36 is out. Installed it, copied the script, ran it. Worked. Maybe you could also have a try with 2.36, some python bugs (the fixed crash bug on "meshes with edges" and some other bug in the "Mathutils.Euler" could be quite responsible for this) were fixed as well. But it still could be some coincidence, sometimes 2.35 didn't crash now neither.
« Last Edit: December 24, 2004, 03:22:02 AM by Jerrot »
Logged
Mooh!

Orange Brat

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 112
    • View Profile
    • Orange Brat Shenanigans™
Re: Blender->3DS (WME geometry file) exporter
« Reply #12 on: December 24, 2004, 05:13:59 AM »

Looks like whatever it was was squashed with 2.36. One down.....
« Last Edit: December 24, 2004, 12:16:53 PM by Orange Brat »
Logged
The Disenfranchised™ - coming later

Orange Brat

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 112
    • View Profile
    • Orange Brat Shenanigans™
Re: Blender->3DS (WME geometry file) exporter
« Reply #13 on: December 24, 2004, 11:58:28 AM »

Another bug....if there's no camera in the 3DS file, SceneEdit will crash when you add the model and click on its visibility.

Here's a couple quick test models I did. I exported as DXF from Caligari Gamespace, imported into Blender(no lights or cameras, though), added a camera, and then exported that using the plugin. SceneEdit would load it but there was no geometry displayed, but it did load the camera. Everything is labeled correctly too:  http://www.geocities.com/hainesrs/test.zip

I've confirmed that Gamespace's 3DS export won't handle cameras or lights. Also, Blender's COB import stinks...probably a format version conflict.

Gamespace has a Python Manager, so I wonder if you guys could create a gS compliant version of the Blender one? I own gS, so I could be a tester. I don't know if an exporter can be pulled off with it or if a tsx plugin would be required, though. I'll have to ask a programmer friend of mine who works with it. If so, it might be easier to get someone who has worked with both gS and Python a lot to do it. I have the Python Blender file, so I can provide that for them.
« Last Edit: December 24, 2004, 12:25:29 PM by Orange Brat »
Logged
The Disenfranchised™ - coming later

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re: Blender->3DS (WME geometry file) exporter
« Reply #14 on: December 24, 2004, 02:49:20 PM »

Another bug....if there's no camera in the 3DS file, SceneEdit will crash when you add the model and click on its visibility.

Uhm, wait, this is no bug of the Blender exporter anymore.  ::hijack
The crash is known though, it might display some error message in a future version. Without cam, the geometry file is useless though anyway.

Quote
Here's a couple quick test models I did. I exported as DXF from Caligari Gamespace, imported into Blender(no lights or cameras, though), added a camera, and then exported that using the plugin. SceneEdit would load it but there was no geometry displayed, but it did load the camera. Everything is labeled correctly too:  http://www.geocities.com/hainesrs/test.zip

How do you know, it loaded the cam then ? I doubt it loaded anything, whatever it exported - this is no 3ds file.

Quote
Gamespace has a Python Manager, so I wonder if you guys could create a gS compliant version of the Blender one?

*hem*... weeeell... you can feel free to use the existing code if there is no good 3ds export for it, but I/we wrote the Blender export because we want to use it and thought it might be a nice idea to publish it for everyone, but I don't like the idea to become the 3ds export script writer for any existing software now. :) And I've got no idea of "Gamespace" anyway.

Quote
If so, it might be easier to get someone who has worked with both gS and Python a lot to do it. I have the Python Blender file, so I can provide that for them.

Better idea. ;) I wouldn't use the Blender export script as a template though, it might be easier to expand some existing export script for meshes and add the cam and light chunks, there are several 3ds format descriptions available in the net. (What means - my code surely is messy, but I don't want to mind! ;) !)

Please move any further discussion about modelers to the Software section, thanks.
Oh and - merry christmas! :)
Logged
Mooh!
Pages: [1] 2  All
 

Page created in 0.052 seconds with 20 queries.