I took the modified .x file exporter script version from our user "necro_", played a little bit with it. First I got an error message (occured with new blender versions), solved. Another thing was the specular color issue (model shined very bright), I solved it, too.
You'll get my modified version from: http://www.computerkind.com/files/Direc ... rterMod.py
I think I'll continue to mod this script in the future, stay tuned.
Blender .x export problem solved (script inside)
hi simply
i have tried your script, but got an error
i follow the steps writed on the export dialogue:
1.create model
2.uv texture
3.make armature
4.object->armature make parent + the same loc,rot,size
5.create name group, set effect vertex
6.export
but...it show the error
did i make some mistake on somewhere?
please help ~~~ thanks!
here is my blend file and test program
http://myweb.hinet.net/home1/wukcsoft/irrlicht/pack.zip
i have tried your script, but got an error
i follow the steps writed on the export dialogue:
1.create model
2.uv texture
3.make armature
4.object->armature make parent + the same loc,rot,size
5.create name group, set effect vertex
6.export
but...it show the error
did i make some mistake on somewhere?
please help ~~~ thanks!
here is my blend file and test program
http://myweb.hinet.net/home1/wukcsoft/irrlicht/pack.zip
Uh, I did not test the script with armatures.
I have no time to review my script in the next days, so try the one from rakar, perhaps it works: http://blenderartists.org/forum/showthread.php?t=73602
I have no time to review my script in the next days, so try the one from rakar, perhaps it works: http://blenderartists.org/forum/showthread.php?t=73602
it works !!
thanks a lot !!
but it is necessary to hack .x file:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?p=95977
anyway, it works well.
thanks a lot !!
but it is necessary to hack .x file:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?p=95977
anyway, it works well.
It's better to "hack" the python script than to hack every .x file after every export.
Open "xFileExporter242.py" with the editor of your choice, go to line 1045. Replace the four lines 1045 to 1048 with the following code:
It should work!
Open "xFileExporter242.py" with the editor of your choice, go to line 1045. Replace the four lines 1045 to 1048 with the following code:
Code: Select all
self.file.write(" 1.0; 1.0; 1.0; 1.0;;\n")
self.file.write(" 0.0;\n")
self.file.write(" 0.0; 0.0; 0.0;;\n")
self.file.write(" 0.0; 0.0; 0.0;;\n")
oh~ it works too!
thanks again~
There are 2 place need to change except what you say.
(Commented are original code)
Line 1018~1020
Line 1034~1038
Line 1045~1048
I didn't try to read code because i think it might use some functions in blender that i don't understand.
It amazed me that plugin looks like shell script, handle everything by programmer.
Writing plugin must be a hard work...
The code not incorrect, seems to contain some informtion.
I think irrlicht might process .x file itself instead of using Direct X built-in function.
So the rules to read .x file are different from the rules that Microsoft defined.
thanks again~
There are 2 place need to change except what you say.
(Commented are original code)
Line 1018~1020
Code: Select all
# self.file.write(" %d;;\n" % (tex.index(face.image.name) + count))
# else :
# self.file.write(" %d;;\n" % (mater))
self.file.write(" %d;\n" % (tex.index(face.image.name) + count))
else :
self.file.write(" %d;\n" % (mater))
Code: Select all
#self.file.write(" %f; %f; %f;" % (mat.R, mat.G, mat.B))
#self.file.write("%s;;\n" % (mat.alpha))
#self.file.write(" %f;\n" % (mat.spec))
#self.file.write(" %f; %f; %f;;\n" % (mat.specR, mat.specG, mat.specB))
#self.file.write(" 0.0; 0.0; 0.0;;\n")
self.file.write(" 0.800000;0.800000;0.800000;1.000000;;\n")
self.file.write(" 0.000000;\n")
self.file.write(" 0.000000;0.000000;0.000000;;\n")
self.file.write(" 0.000000;0.000000;0.000000;;\n")
Code: Select all
#self.file.write(" 1.0; 1.0; 1.0; 1.0;;\n")
#self.file.write(" 1.0;\n")
#self.file.write(" 1.0; 1.0; 1.0;;\n")
#self.file.write(" 0.0; 0.0; 0.0;;\n")
self.file.write(" 0.800000;0.800000;0.800000;1.000000;;\n")
self.file.write(" 0.000000;\n")
self.file.write(" 0.000000;0.000000;0.000000;;\n")
self.file.write(" 0.000000;0.000000;0.000000;;\n")
It amazed me that plugin looks like shell script, handle everything by programmer.
Writing plugin must be a hard work...
The code not incorrect, seems to contain some informtion.
I think irrlicht might process .x file itself instead of using Direct X built-in function.
So the rules to read .x file are different from the rules that Microsoft defined.