NEW: Irrlicht optimized Blender DirectX8Exporter

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

:)

Well, blender has a script directory. I think you can even configure the location when installing blender. There you can put all kinds of scripts.

I did not replace it, because it wasn't there before. ;) I just placed the script there and it's available in the Export menu. I wrote also another script that appears in Object mode in Mesh->Scripts->... for example. Thats how scripts also work in blender (besides using the script editor).

My scripts directory is here:

C:\Documents and Settings\Username\Application Data\Blender Foundation\Blender\.blender\scripts

Maybe its similar with you. If you don'd find it just mak a file search for *.py and you'll get it!

The GUI looks like this:

Image

Image

Btw thanks alot for testing and stuff! I'm glad it works that good! Your video is... uhm... nice... :) it's showing 3 times the same movement...
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

sorry , jox

Though I had answered this post...seems I did only in my mind :)

Thanks a lot fo ryour explanation, i have saved thi spage. i already could make x files , I mean complex ones with fake joint pinning and ik solvers, work well with the exporters and I must say you did a nice job :)

I saved this page for reference, as I simply did not know how to setup scripts that way in Blender, I just executed them in th eeditor :) I am a blender newbie after all :D
Finally making games again!
http://www.konekogames.com
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

Made another update of the DirtectXExporter mod. ( http://www.mindfloaters.de/blender/ )

Most significant addition this time: "Swap Y and Z axis" option! But also many other things:

Code: Select all

# Version 1.2 - October 5rd 2004
#   - Added a 'swap Y/Z axis' option which is active by default.
#     Now the conversion from Blender (right handed, z axis top/bottom)
#     to DirectX (left handed, z axis front/back) coordinate system
#     is complete and appropriate.
#   - Now all selected mesh objects get exported (selected objects of other
#     types will be ignored). Parented aramatures are detected and exported
#     with their objects (possibly including animations).
#   - Added a progess bar to the 'recalc vertex normals' and
#     'export animation' functions (because they can take some time).
#   - The script will fire a beep sound if the export took longer then
#     0.8 seconds (configurable) :)
#   - Fixed the indentation (tab spacing). The blocks of the exported .x file
#     are now properly formatted according to their hirarchy.
#   - Now a nice result message box with useful information is written to the
#     console after exporting.
#   - Added some warning popups where appropriate.
#   - Fixed MeshMaterialList export structure (one semi-colon too much
#     would get exported).
#   - Finally fixed export of the XSkinMeshHeader. In worst case
#     DirectX Mesh Viewer would crash if mesh had less SkinWeight
#     items than nBones in the XSkinMeshHeader.
#     Reimplemented calculation of all three values:
#     'nBones', 'nMaxSkinWeightsPerVertex' and 'nMaxSkinWeightsPerFace'.
#   - Added a comment with the Blender version and script version to the
#     exported file.
#   - Fixed bug with the 'Flip Z axis' switch (would internally sometimes
#     not be set correctly).
#   - Re-layouted the gui and gave all buttons tool tips (mouseover help).
#   - Added a 'Reset default' button to the gui
#   - The script now remembers the last filename and offers it in the submenu
#     and the in gui for direct saving to (overwriting) the last file.
#     (note: the gui part is disabled in this release because of a problem)
Here's a screeny of the new gui:

Image

And the confirmation message in the console:

Image
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

sorry I missed this one yesterday...

Excelent, Jox!

:)

Saving the file, this page, and reading the improves...

I use XSI now, but kindda is much better to have the free tool available and every time more and more functional...

could do the stuff needed now with it as well...

great work.
Finally making games again!
http://www.konekogames.com
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

a load of improves, there!

some affect directly to some Ultimate Unwrap problems ;)

euh...so, the GUI doesn't show all the setting now? I mean, i read that las line of the sumary you wrote in your page....
Finally making games again!
http://www.konekogames.com
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

vermeer wrote:some affect directly to some Ultimate Unwrap problems ;)
great! but only some? still problems left? :)
vermeer wrote:euh...so, the GUI doesn't show all the setting now? I mean, i read that las line of the sumary you wrote in your page....
You mean the help text next to each button? I made it tool tips. If you hold the mouse over the buttons and wait, you'll see the text pop up!
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

"great! but only some? still problems left?"

I meant from reading the list , I hadn't tested yet.

No I have, and...well, after some problems derived from my blender newbieness, I got to work the script in graphical UI, is just i needed t otouch the button in User Preferences in blender, a button in path for scripts, the hot tip says, re-evaluate scripts, or something, as it was not taking it. As I did that, suddenly the script appeared.

Previously testing only with alt+p, couldn't make it work exporting the animation, even putting in defaults animation=1 .I suppose as defaults is not what it executes...

well, the GUI is much more friendly and quick, and you made it really comfortable, same name to export and path, configure, the preogress bar, etc...

Now I can report that: setting the thing to flip handedness , it works in ultimate unwrap.I only need to make a weld model there, but happens with most formats that Ultimate imports. And is touch of a button.

exported from Ultimate unwrap coretcly, tested that exported anim into deep exploration demo. It works all perfect now. (i wish i had made a better sample test XDDD instead of closest to bones weights)

Now any Ultimate user can export the file and fix it a bit more in ultimate unwrap, or even uv map it there, fix mapping, etc. besides of course exporting to all thegame formats supported by Ultimate, like Blitz3d, x, etc.

so now it works in all viewers: deep exploration, mview, ultimate unwrap.

It's not just a basic armature, it has empties for joint pinning, and I am selecting all bones in armature, and moving all the body to make jumps in distance, not only "in place".

Any animation can be done now. Knowing Blender, of course ;)
Well, I could do already, and I'm a newbie ;)

very good work.


No, no probs now in any software. :)

Now is the hard decission for me....if I get into an anim project I'll have to choose bewteen animating with character fx, blender or xsi ;) ....

it's great. Some years ago there was plainly no chance of exporting bones and weights... Now I have 3 ways! An dthe greatest thing is blender is free for everyone, so everyone with good patience can do it (no patience needed for ur exporter, but yes for Blender ;) )

All this power for free is a lot. Now I can say for sure it is a great companion for Irrlicht :)


It exports to vrml 1, 2, dxf, stl, ac3d,cal3d, dx7,dx8, lwo,nendo, ts cob, obj, *.wngs wings3d....

One can't say it has no formats...
Anyway, the ones working better for me now are OBJ ideasman plugin, and Jox x plugin :)
Finally making games again!
http://www.konekogames.com
Electron
Posts: 874
Joined: Sun Mar 14, 2004 12:05 am
Location: Massachusetts USA

Post by Electron »

This isn't specifically about the modified version of the exporter, but in either version how does one set the number of frames to export? Is it the same as the Start and End in hte anim part of the render buttons? or is it set seperately?
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.

Crucible of Stars
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

it is set there, at start/end buttons of anim settings in render buttons.

But...for some reason, some viewers tend to change the timing of the animation.There are a pair of setting i don't control quite yet well. Happens also with Character Fx , where if you set 216 in scale time, it loads as u saw in cfx.

With deep exploration demo, and some others, happens so. Touching those jox made settings, you can tweak to the wished speed.
Finally making games again!
http://www.konekogames.com
nitroman

Post by nitroman »

I tested it and it looks good. :D

however, I tried to export a model. Because I don't exactly know how to use blender, I imported a model I've made with wings3d into blender using the obj format.
In blender, my model looks good (exactly the same as wings) but after exportation to x, I lost my texture.
Maybe it is because during the importation of my model into blender the material properties were not set correctly... I don't know (I pretty a newbe to blender)

If you want I can post screenshots...
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

Nitro, search for the latest version of Ideasman OBJ script, import and export, at blender.org forums. In these forums, the thread is at "Interface and tools" forum section. (to help u narrow the search in the search dialog in those forums)

well, direct link (extract from that 3 pages thread) :
Importer now imports inline 'usemap' keywords to assign UV textures, MTL export has changed a bit.
Bugfix where only the last object had materials applied to it was fixed.
http://members.iinet.net.au/~cpbarton/obj_import.py

Exporter now exports MTL files, as well as UV image textures.
http://members.iinet.net.au/~cpbarton/obj_export.py

Its now possible to export a large scene with materials and UV mapping/images
And import it- keeping all the properties supported by obj.

Please dont use the old OBJ I/O, these have some important Bugfixes.
Also, Latest page thread link, where the last posted script at today november 2th 2004 was posted. More info about it, though the OBJ is problems free, imho. Also, in case he update it there.
http://blender.org/modules.php?op=modlo ... aa3418d3f4

Specifically, the last, perfectly working version of those 2 scritps (one to import OBJ, one to export in that format also, grab both , u'll need em sooner or later) is in the very last page (unless it had grown but been checking and haven't grown I think) of that thread, I think it's in the sixth post...

Also, there's an specific workflow u need to restablish the material...I think if u exported well from wings as OBJ in Export dialog, the *.mtl must be exported (I dunno as I allways open in Ultimate Unwrap and do uvs there...) , if obj and mtl are in same folder, I think latest obj import from Ideasman was grabbing well the material and texture. Anyway, u need if not to create a material, asign a new texture, browse folder to set the texture bitmap file, (tga, etc) , and in map imput tab, set "UV" , if I remember well, as if not, UVs wont be taken. Is very usual for newbie people to screw UVs , so u'd need to create a new blender scene and import again...u check if UVs are ok in UV window in blender.(is another mode, like 3d window, etc)

For the material and uv stuff, like allways with blender...if u haven't use many 3d packages, u may need then a quite frequent look at the manual, to the specific section u need :

http://blender.org/modules.php?op=modlo ... file=index

(specially updated (though never to many last bits) are the comunity doc projects, first 2 links there)

Gonna add this also to the faq sticky.
Finally making games again!
http://www.konekogames.com
Trident

Post by Trident »

Script is absolutely great, thanks jox! However there is a small problem with it: if the model has vertices not belonging to any face script dumps an exception without explaining what exsactly happened. (and it may produce wrong .x file if there's no UV on such model.) I'm not that good at Blender scripting yet, so my fix for the problem is somewhat messy and incomplete... Here it is:

all

Code: Select all

				vertex = mesh.verts[new_verts[idx]]
are replaced with

Code: Select all

		        try:
				vertex = mesh.verts[new_verts[idx]]
			except:
				vertex = mesh.verts[idx]
				print "no-faces vertex co= %s" % vertex.co
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

@Trident: It's a bit late but thanks for your report! I have finally worked on the exporter again since a while. I have tracked the problem down and fixed it in another way. Using exception handling in normal program flow is not such good style. I had removed a couple of those already from the original version.

If you're curious, I have replaced all (3) occurances of

Code: Select all

for idx in range(len_new_verts):
with

Code: Select all

for idx in new_verts.keys():
This ignores all vertices that doesn't belong to any face.

Version 1.3 of the exporter is now available here (including 2 other fixes):

http://development.mindfloaters.de/Downloads.12.0.html
It is like it is. And because it is like it is, things are like they are.
Scarabol
Posts: 167
Joined: Sat Jan 03, 2009 5:26 pm
Location: Aachen, Germany

Post by Scarabol »

Are there any news about this topic?

Any Bugs, Updates or further projects?

MfG
Scarabol
DtD
Posts: 264
Joined: Mon Aug 11, 2008 7:05 am
Location: Kansas
Contact:

Post by DtD »

It is from 2005, 5 years old...probably completely dead.

However http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=27073 might interest you.
Post Reply