Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / DirectX Exporter for Blender 2.49/2.5

Author
Message
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 13th Sep 2012 17:04
New World Order: That's pretty bizarre. I'm not sure why Enhanced Animations would crash on a model exported with Keyframes Only vs Full Animation. At the very least, I think you don't need to worry about impacting performance. The size of the animation should just take up extra RAM, so the CPU shouldn't be doing any extra work because of it.

Kess: Yes, the exporter exports polygons exactly as they are in Blender. So, if an engine that you're writing an importer for requires only triangles, you'll probably have to handle this case yourself. You could also triangulate the mesh in Blender before you export. Enter edit mode, select everything and then hit CTRL + T.

Scary Little Rabbit
15
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Chelyabinsk, Russian Federation.
Posted: 28th Nov 2012 19:19
Kira Vakaan, it is looks like exporter not saves animation which created via Shape Keys. I use Blender 2.64.

error #0101:
- english language conflicts with a brains of this rabbit.
free fonts for your AGKs!
Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 29th Nov 2012 05:50
I don't believe that the .x format supports shape keys/morphing. You will need to use bone based key frames.

eborr
14
Years of Service
User Offline
Joined: 5th Jun 2010
Location:
Posted: 16th Dec 2012 14:05
Hello thank you for the add on - not sure I am a relative nube to Blender, I can followed the advice, clicked user preference and ticked the appropriate tick box to select the add-in.

The add-in doesn't appear on the either the import or the export menu.

If I follow the same process with and the addin for processing unity meshes - that appears to work ok, at least it appears in the menu.

Opening the console doesn't appear to give me any errors except when I exit the program - when the word error flashes into the console. I cannot locate any trace of a log file I am using version 2.63.0. I appreciate this may be down to my lack of experience with Blender, but I anyone has any ideas as to 1 - why it does not show up in the import menu as an option, or 2 where can I find the error log
Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 17th Dec 2012 06:25
Quote: "why it does not show up in the import menu as an option,"


Well it's an exporter only, doesn't handle imports, so it definitely won't show up there. Should be under export menu though as directx 9 I think

For 2, There is a files section under user preferences where you should be able to specify the directory to use for file outputs

eborr
14
Years of Service
User Offline
Joined: 5th Jun 2010
Location:
Posted: 17th Dec 2012 15:45
thanks for the response, but the add in doesn't appear in the export menu either -

any ideas anyone ?
JeremiahJK
11
Years of Service
User Offline
Joined: 29th Jan 2013
Location:
Posted: 6th Feb 2013 21:06
When I load my model into DirectX Viewer is is WAY stretched.
The armature's and the model's origin points are both centered at 0, 0, 0, and the model doesn't have any modifiers except for the armature modifier.
What am I doing wrong?

Attachments

Login to view attachments
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 6th Feb 2013 22:45
I've only used up to 2.49 so this might not help if the interface has changed:

Try loading the exporter as a text file in Blender. Then with the cursor in the same window as the text file, press CTRL+P or maybe ALT+P (I can't remember which) to run the python script.

Enjoy your day.
Nicholas Lee
11
Years of Service
User Offline
Joined: 28th May 2013
Location:
Posted: 28th May 2013 03:43
I am using Windows XP and Direct-X 9.0c

I have installed Blender 2.6.7a, and installed the DirectX8ExporterMod-1.3.2 python script.

Taking blender's new-file 'cube' object I have tried to export it as a .X file.

I then try to load the resulting .X file into Microsoft's "DirectX Viewer" program.

This results in the message "Failed to load model - File:C:\cube.x"

(I have attached the cube.x file for analysis)

Please, what am I doing wrong?

Attachments

Login to view attachments
Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 29th May 2013 22:46
Quote: "DirectX8ExporterMod-1.3.2 python script"


this doesnt look like the correct script, and you shouldnt need to install anything, it is a packaged addon.

go to user preferences, addons tab, scroll down to the line Import-Export: DirectX Model Format (.x) and checkmark the box on the right. expand the details should show script file io_export_directx_x.py by author chris foster (kira vakaan)

it will then be listed under export menu as DirectX (.x)

Shazam!
Nicholas Lee
11
Years of Service
User Offline
Joined: 28th May 2013
Location:
Posted: 30th May 2013 01:25
Sorry about the confusion over my trying to install "DirectX8ExporterMod-1.3.2", as I think that was a red-herring.

See the attached image of the user preferences I see.

Yes still, the .X files it generates give "Failed to load model - File:C:\cube.x" with Microsoft's "DirectX Viewer" program.

Attachments

Login to view attachments
Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 30th May 2013 06:08
ah ok, ill take a look at the .x file when i get a chance

Shazam!
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 30th May 2013 06:37 Edited at: 30th May 2013 06:41
Hi there, wow, it's been a while for me. Hope everyone is well!

The DirectX8ExporterMod-1.3.2 is an ancient script written for Blender 2.37. Also, I rewrote the exporter from scratch recently and now it contains two files, __init__.py (which you can see listed in the user preferences) and export_x.py.

As for the loading issue, this is caused by a rather unfortunate coincidence... Basically, I noticed that the exporter was writing semicolons where it should have been writing commas, and so I quickly committed a change to make it write more commas.. but then it wrote more commas than it should have, causing files not to load. I fixed the comma issue, but right before I did, the package maintainer for Blender 2.67 must have grabbed the bugged version of the script to ship with the release. Sorry about that!

You can download a working version of the script using the (newly updated) link in the original post. Just replace the two files you have on your computer. Hope that helps!
dnvnstill
11
Years of Service
User Offline
Joined: 30th May 2013
Location:
Posted: 30th May 2013 14:53
Chris,

Thank you for continuing the work on the exporter and keeping it current. You spared me a lot of time of having to do it myself. Nice work on the Christmas scene.
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 30th May 2013 17:48
I'm glad it's still useful to people!

Are you talking about this one? If so, thanks! Are you part of the LuxRender community?
Nicholas Lee
11
Years of Service
User Offline
Joined: 28th May 2013
Location:
Posted: 30th May 2013 21:16
To Kira Vakaan,
Yes! That fixed the Direct X exporter.

Thank you for your speedy response.

Regards,
Nicholas Lee
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 1st Sep 2013 14:51
Hello Kira, I just wondered if you would know if it is the DirectX format that limits up to one child limb for each limb; it doesn't seem possible to export more than one child per limb. I just want your knowledgeable feedback.

Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 3rd Sep 2013 08:33
Hi Chris,

There shouldn't be any limit on that imposed by the format -- the DirectX format allows for arbitrary frame (bone) hierarchies and so the exporter really just copies the armature hierarchy straight from Blender (each bone writes all of it's own children, who write their own children, and so on). Is there a particular case you're having an issue with?
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 3rd Sep 2013 12:05 Edited at: 3rd Sep 2013 12:29
Perhaps I am mistaken then, it could be an issue with the Matrix1 limb parent command not recognizing the relationship. I am not familiar with the Direct X format, but it looks like the children are nested. I use your plugin everyday, (which I will remember, is it Chris Foster or Kira Vakaan).

So my engine must be fooling me into think my car wheels are not the children of the car mesh. Or DarkBASIC does not parse the X files properly.

Direct X File:


Code:

Attached is a package containing the blend file and X file.

Attachments

Login to view attachments
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 3rd Sep 2013 15:41
Chris Tate,
This sounds like the bug that we posted here.

http://forum.thegamecreators.com/?m=forum_view&t=163815&b=15

The bug is with loading .dbo and .x files.
The example we showed in the bug reports seems to show that it was
fixed but, it was not completely fixed.

Luckily we made a free dll with the command "SD Repair Hierarchy".
Call it right after load object and your good to go.
The dll has a few other missing limb commands.
SD Set Limb Ambience
SD Set Limb Diffuse
SD Set Limb Emissive
SD Set Limb Specular
SD Get Limb Ambience
SD Get Limb Diffuse
SD Get Limb Emissive
SD Get Limb Specular
SD Set Limb Vertex Color

Click on the banner below to go right to the page to download.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 4th Sep 2013 15:54
OK, so it is a bug. Thanks for the information. I will download and try out your plugin; looks cool.

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 12th Sep 2013 03:28
Hello,

Is there a way to track an object to another object, and record the rotations of the object that is doing the tracking, for export as an animation?

Enjoy your day.
Helical
11
Years of Service
User Offline
Joined: 14th Sep 2013
Location:
Posted: 14th Sep 2013 18:39
Hello,

I'm having problems with .x exported objects keeping image information and UV coordinate modifications. When I export the .x and load it in to DB, it is untextured. I can work around that by loading and texturing it within DB, however my modifications to the UV coordinates do not take. I'm texturing a face and it looks perfect in Blender but translations, rotations and scaling of UV coordinates are not being used once I'm in DB.

I'm checking "export materials" and "export UV coordinates" when I export it.
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 14th Sep 2013 18:53
Latch, sorry for the delay! I don't know if you've solved your problem, but for all things constraints, I usually jump to the Bake Action operator. You can find it through the spacebar search. Once in there, be sure to select Object from the Bake Data options. Should do the trick.

Helical, the exporter writes textures references such that the texture files need to be in the same directory as the exported file. Perhaps in the future, I'll add a texture directory prefix option. But for now, it should work to have both the model file and the texture file in the same directory. The exporter will also write the UV coordinates exactly as they are in Blender. Keep in mind, though, that the DirectX format does not support UV coordinate animations, and so if you are using modifiers to alter the coordinates, those changes will not be reflected in the file. Let me know if you need more help.
Helical
11
Years of Service
User Offline
Joined: 14th Sep 2013
Location:
Posted: 14th Sep 2013 23:13
Hi Kira,

Thanks for the fast reply! I am exporting the model to the same directory that contains the image I loaded in. I am quite new to Blender so I may be doing something very basic wrong. Here is my workflow:

1) Create seam
2) Open a new window and switch it to UV mapping mode
3) Unwrap the seam
4) Load in image from same directory I will export to
5) Modify the UV points
6) Export the .x to the folder that contained my texture, checking the "export UV coordinates" and "export materials" boxes

Within blender the model is changing to what I want but when I load it in DB I have no texture. If I manually texture it in DB it takes the image based on my initial seam creation but ignores all the modifications I've made to the UV coordinates.

As I said I'm new to Blender. Maybe I'm just missing a button I need to click within blender after I've modified the UVs and before I export?

Thanks for any help you can provide!
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 17th Sep 2013 00:10
Hm, my first thought is that the material you setup in Blender might not be using the texture, and thus no reference to the texture is being made in the .x file. Is there an Image texture applied to the material that maps your texture to the object's UV coordinates?
Humots
11
Years of Service
User Offline
Joined: 16th Nov 2013
Location:
Posted: 16th Nov 2013 16:46
I am trying to export to the .X format.

I have some experience with Python, and I understand that the export is carried out by .py scripts in the addon directory io_scene_x.

The _init_.py script defines the .X export entry in the User Preferences addon menu, and also imports the other script in the io_scene_x directory to perform the export.

The Blender .X export process can be modified simply by changing the scripts in the io_scene_x directory.

I am running Blender 2.67. When I try to export to .X format, I get a .X file but it cannot be loaded by a Direct X application such as DirectX viewer. I understand this is a common problem.

I believe you have a script, io_export_directx_x.py, that will perform a .X export. I have downloaded that script, but it seems that the _init_.py script must be modified to use the new script, and I haven't been able to do that successfully.

Am I correct that io_export_directx_x.py is the script to use? Is there a _init_.py script modified to use it?

Thanks for any help you can provide.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 9th Dec 2013 22:34 Edited at: 9th Dec 2013 22:35
Hi there.
I had refuse to start with Blender because of its interface...for me, and for most people, it looks like a mess when we don't know the program. If we don't give up in the first half an hour, we will realize, that Blender is a powerfull 3D program indeed. I have been playing with the Blender Game engine for a week, and it is easy to manage with just using logic bricks...something different is to understand the python lenguage. lol

I start Blender with the purpose of use it for riging models and as lightmapper,and now I began to like the way it works, and I feel as comfortable as with other 3D programs much more expensive.

I found my first problem, when I try to export models with animation as part of the bones where collapsed into object. I searched every where in internet, and in several Blender Forums, and even I download some miraculous scripts, that didn't work at all.

My model nearly works with the exporter that comes packed with Blender 2.49, unless half of the bones...

What could be happening ??
I think, I found a solution, atleast for my purposes. The problems comes in the way we rig our object...for exmaple:

We normally start our objec with the waist bone and continue to the head,then we add arms...

But the problem comes now when we add more bones for legs. I realized that normally we add legs from the bottom of waist bone and that is how it must be, if we are going to rig our object to work into blender games, but the exporter make a mess.

If we rig the legs starting in the top of waist bone, it looks to work ok. I have to do more tests, but that would be good if someone check my method...using the exporter that comes with 2.49




Cheers.

I'm not a grumpy grandpa

Attachments

Login to view attachments
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 9th Dec 2013 22:36
File for testing attached

I'm not a grumpy grandpa

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-23 10:41:29
Your offset time is: 2024-11-23 10:41:29