Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Pages: 1 2 [All]

Author Topic: Blender->3DS (WME geometry file) exporter  (Read 34249 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!

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Blender->3DS (WME geometry file) exporter
« Reply #15 on: December 24, 2004, 03:17:14 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.
Point taken :P
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Orange Brat

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

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

Sorry for suggesting it was a bug of your exporter. I meant for SceneEdit. I had discovered this by accident when I forgot to include a camera.  This has been fixed with the Xmas patch, so it's no longer an issue.

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

I knew it loaded because the camera dropdown box in SceneEdit said "Camera" in it right before it crashed, so it loaded something. That file included in the ZIP may not be a 3DS file, but it came from the Blender exporter.

Anyway, thanks for providing us with the exporter. Blender's not so bad once you sit down with a few quickstarts. ;)
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 #17 on: December 29, 2004, 04:09:00 AM »

Sorry for suggesting it was a bug of your exporter.

Naah, I'm kidding, I just wanted to block a modeler/Blender discussion in this thread. ;)

Quote
Anyway, thanks for providing us with the exporter. Blender's not so bad once you sit down with a few quickstarts. ;)

I'm actually a friend of Windows GUIs as well and Blender was a shock. But trust me - it rocks after you got used to it and made 2-3 tutorials. It just... different. :)
Logged
Mooh!

trosa

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 27
    • View Profile
Re: Blender->3DS (WME geometry file) exporter
« Reply #18 on: November 30, 2006, 10:23:24 PM »

Hi All (& Jerrot, thanks for your export script),

  I'am trying to using your exporter, but result 3DS has too small coordinates. Is it possible to add ZOOM FACTOR to exported scene? So, I will draw using normal blender coordinates and exporting script zoom all coordinates for ex. 100x, so WME will be happy. Or is there another trick? Becouse if I use Trinity 3D actor from demo, is tooooo large.

Thanks!
Logged

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 #19 on: December 01, 2006, 10:53:39 AM »

Hi trosa,

I'am trying to using your exporter, but result 3DS has too small coordinates. Is it possible to add ZOOM FACTOR to exported scene?

Well yes, that's a known problem about Blender's coordinates. But the original exporter is not my work, so I'm afraid I would rather mess it up when trying to scale each coordinate, I'll have a look into it later, maybe it's easy. (Naah, it's Python... ;))

My workaround was simply to scale the actor(s) by editing the .actor3d file and setting the parameter "SCALE" to a fitting value for the scene, so you don't have to scale the Blender scene itself. So if I shouldn't be able to "hack" that exporter script, this might be a way to go at least.
« Last Edit: December 01, 2006, 10:56:05 AM by Jerrot »
Logged
Mooh!

trosa

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 27
    • View Profile
Re: Blender->3DS (WME geometry file) exporter
« Reply #20 on: December 03, 2006, 09:58:15 PM »

My workaround was simply to scale the actor(s) by editing the .actor3d file and setting the parameter "SCALE" to a fitting value for the scene, so you don't have to scale the Blender scene itself. So if I shouldn't be able to "hack" that exporter script, this might be a way to go at least.

I've found similar workaround - setting Scale runtime, but this is better "trick".

Thx for your reply! ::rock
Logged

Serious.Ray

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 25
    • View Profile
Re: Blender->3DS (WME geometry file) exporter
« Reply #21 on: January 11, 2011, 01:11:58 AM »

Hey people,

sorry for digging out such an old thread but it's perfectly fitting.
I searched the WME wiki but couldn't find any Blender 2.5 plugin that would enable me to export the camera aswell. Hopefully you can help me out. Maybe someone could modify the Blender 2.5 3DS exporter in order to export cameras?
Logged

Serious.Ray

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 25
    • View Profile
Re: Blender->3DS (WME geometry file) exporter
« Reply #22 on: January 13, 2011, 08:36:32 AM »

Sorry for double posting but I have an idea. Alternatively to exporting the camera with 3DS you could also add support for camera data you can export with Blender :D! That might be easier to achieve.
Logged

Gratch

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 3
    • View Profile
Re: Blender->3DS (WME geometry file) exporter
« Reply #23 on: March 13, 2011, 03:45:46 AM »

Maybe someone could modify the Blender 2.5 3DS exporter in order to export cameras?

I've had the same problem too. Fortunately (or not depending on how this goes for my sanity) I'm a coder. I'm working on modifying the 2.56a 3DS export script to handle lights and cameras. ATM it's not crashing after running my lights export add on so win. Also with how similar the exporters for 2.56 and 2.49b are I think I can make the changes backwards compatible.

Before people jump for joy I'll need two things. 3DS testers and WME testers (besides myself). WME being able to use the files == good enough. Full 3DS compatibility == bonus.

I'll post when I have the script ready for testing.

P.S. does anyone know how to properly add yourself onto a GPL License Block's copyright section?
Logged

Serious.Ray

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 25
    • View Profile
Re: Blender->3DS (WME geometry file) exporter
« Reply #24 on: March 13, 2011, 08:59:26 PM »

I'd be really happy to be a tester! :D
Logged

Gratch

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 3
    • View Profile
Re: Blender->3DS (WME geometry file) exporter
« Reply #25 on: March 14, 2011, 11:18:26 PM »

I'd be really happy to be a tester! :D

Well bad news first. I've failed to make a Blender 2.56 script. Good news I got the 2.49b one going, and as a bonus the .blend files are backwards compatible. So you can use 2.56 to make everything and 2.49b to export the 3ds geometry. I'm just testing my first test scene and if the results look good I'll post the script code on the wiki for others to get and test with.
Logged

Gratch

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 3
    • View Profile
Re: Blender->3DS (WME geometry file) exporter
« Reply #26 on: July 11, 2011, 11:34:45 AM »

Okay I've driven myself nuts trying to get an exporter to work for 3ds files. However I have found a solution. Autodesk offers a free fbx converter plugin which can also convert fbx to 3ds. I've tested it out with the 2.5d Model Viewer posted on here (sorry I can't remember the username right now). It works good with the version from 2006. The most recent versions create 3ds files that lock up WME. So a usable pipeline would be Blender->.FBX->fbxconverter->.3DS .

Good luck with your sanity people.

Gratch

p.s. it may also have helped if I'd completely read up on making 2.5d scenes before starting this endeavour....
Logged

camelo003

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 1
    • View Profile
Re: Blender->3DS (WME geometry file) exporter
« Reply #27 on: March 01, 2012, 03:36:57 AM »

I folow the "export .fbx from Blender >> convert to .3ds wiht FBX Autodesk Converter 2011" pipeline, but when I try to add the .3ds file in 3D properties my 3D scene editor crashes.

Someone had the same problem? There is a detailed definition of what the .3DS file should contain?
Logged

ahedov

  • Lurker
  • *
  • Karma: 2
  • Offline Offline
  • Posts: 29
    • View Profile
Re: Blender->3DS (WME geometry file) exporter
« Reply #28 on: March 01, 2012, 06:27:26 AM »

I still think that using older version of Blender is much more easier than this suggested pipeline. Go get Blender 2.49 and just run the script from Jerrot. And even if the coordinates in Blender are odd you can always choose a different scale in WME. No prob for me, easy as hell and it works.
Logged
Pages: 1 2 [All]
 

Page created in 0.1 seconds with 23 queries.