Horde3D

Next-Generation Graphics Engine
It is currently 21.09.2018, 16:35

All times are UTC + 1 hour




Post new topic Reply to topic  [ 45 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: Blender Exporter
PostPosted: 15.09.2008, 07:42 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
already done by me! Thanks phoenix for posting it


Top
 Profile  
Reply with quote  
 Post subject: Re: Blender Exporter
PostPosted: 01.08.2009, 22:38 
Offline

Joined: 12.07.2009, 15:57
Posts: 10
i got this error while i tried exporting:

Code:
rene@rene-desktop:~/Entwicklung/Horde3D/simpleTest/test$ blender                                     
Compiled with Python version 2.6.2.                                                                 
Checking for installed Python... got it!                                                             
Exporting /home/rene/content/dummy.scene.xml ...                                                     
Converting Model...                                                                                 
Warning: Can't import non-mesh and non-armature object: Lamp!                                       
Warning: Can't import non-mesh and non-armature object: Camera!                                     
  Added Mesh with 4458 Vertices...                                                                   
  Processing animations...                                                                           
  Calculating Joint dependencies...                                                                 
  Calculating Mesh dependencies...
  Added 10 Joint-Animation(s)...
Done.
Writing geometry...
blender-bin:281: DeprecationWarning: integer argument expected, got float
  �(�L-D
        �.�D��19��.�D�
Traceback (most recent call last):
  File "/home/rene/.blender/scripts/blender/Horde3DExport.py", line 203, in bevent
    success = Export(file, shader, texSub, texPath, matPath, animPath)
  File "/home/rene/.blender/scripts/blender/Horde3DExport.py", line 281, in Export
    if converter.saveModel( fileName ) == False:
  File "/home/rene/.blender/scripts/blender/Horde3DExport.py", line 1051, in saveModel
    geoFile.write( struct.pack('h', tangent.x*32767) )
ValueError: cannot convert float NaN to integer


This seems somehow strange to me cause i havent made any changes to the model since it exported successfully... I switched to kubuntu 9.04 now. I exported successfully on kubuntu 8.10 and opensuse 11


Top
 Profile  
Reply with quote  
 Post subject: Re: Blender Exporter
PostPosted: 02.08.2009, 10:35 
Offline

Joined: 05.03.2007, 19:38
Posts: 167
Location: Romania
i've just hit the same problem on seven with 2.49a. do not know if it worked before as i've just added the blender exporter to my pipeline

_________________
Paul


Top
 Profile  
Reply with quote  
 Post subject: Re: Blender Exporter
PostPosted: 02.08.2009, 15:45 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
I just downloaded the 2.49 version and had the same problem. It seems like the tangent data is 0,0,0 but didn't found the reason for that. The same script runs fine with blender 2.48, so it seems like something has changed in blender.

Does anyone know a better devlopement environment for creating blender scripts than editing the python script with an editor and running it in blender?


Top
 Profile  
Reply with quote  
 Post subject: Re: Blender Exporter
PostPosted: 13.09.2009, 15:34 
Offline

Joined: 12.07.2009, 15:57
Posts: 10
any progress here?


Top
 Profile  
Reply with quote  
 Post subject: Re: Blender Exporter
PostPosted: 13.09.2009, 16:22 
Offline

Joined: 05.03.2007, 19:38
Posts: 167
Location: Romania
it is fixed and working. download the latest from the community svn.
changes in the 2.6 python series broke the code, but it has successfully been patched. there is a forum topic about it.

_________________
Paul


Top
 Profile  
Reply with quote  
 Post subject: Re: Blender Exporter
PostPosted: 13.09.2009, 21:48 
Offline

Joined: 21.08.2008, 11:44
Posts: 354
Just tested the exporter with blender 2.49b and everything was ok


Top
 Profile  
Reply with quote  
PostPosted: 28.09.2009, 20:15 
Offline

Joined: 28.09.2009, 19:34
Posts: 3
Good job on this exporter, exactly what I needed :D

I took the liberty to add 2 small things and I think some people can use them too.
- First of all did the exporter crash when I tried it with my version of blender (2.49b). This is because tangent and bitangent information tends to be NaN on some blender versions. I created a little function that checks every normal, tanget, bitangent and sets it to 0.0 if it is a NaN value. If your Blender version supplies proper (bi)tangent information the function won't do anything.
Warning: if your shader uses these (bi)tangents you'll get very weird results (if it works at all) but is't better than not exporting at all.
- This is somewhat more interesting: I added a function to only export animation. When you want different .anim files for the same model this is the solution. All options selected (file name and anim path) are just applied (so you need to change the export file name for every animation).
Warning: with this option selected there is no file existence checking so if you enter a filename that already exists the file will be overwritten without a warning.

ps: maby there already is a (beter) solution for the first problem. Please tell me because I will plug the anim only function into that version of the exporter than.

Hope you'll like it.


Attachments:
File comment: The exporter!
Horde3DExport.zip [11.85 KiB]
Downloaded 243 times


Last edited by Volker on 28.09.2009, 21:49, edited 1 time in total.
Merged with blender exporter thread as requested
Top
 Profile  
Reply with quote  
 Post subject: Re: Blender Exporter
PostPosted: 28.09.2009, 22:04 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
First thanks on working on the exporter!

There were some fixes integrated into the exporter by funto. And I thought the (bi)tangent problem was fixed already too, but not sure which solution would be better. I only have done a quick diff between your and the CB version. One thing I noticed was the change of the __AdditionalJointMat to self.__AdditionalJointMat. I have to admit, that I didn't dig into the exporter details, but if I remember correctly, Felix told me some month (or is it already years?) ago, that this was done on purpose. Are you sure that self.__AdditionalJointMat is correct?

Best regards,
Volker


Top
 Profile  
Reply with quote  
 Post subject: Re: Blender Exporter
PostPosted: 29.09.2009, 16:10 
Offline

Joined: 28.09.2009, 19:34
Posts: 3
I haven't touched __AdditionalJointMat, atleast I don't think so.
I think that I've worked in an other version of the exporter than the one you have compared mine with (I hope that is a grammatical right sentence).


Top
 Profile  
Reply with quote  
 Post subject: Re: Blender Exporter
PostPosted: 30.09.2009, 06:33 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
That's may be right, because I guess the version you were working with, was an older one.


Top
 Profile  
Reply with quote  
 Post subject: Re: Blender Exporter
PostPosted: 30.09.2009, 15:23 
Offline

Joined: 10.07.2009, 21:16
Posts: 42
Yep, effectively I already fixed the problem for the NaN values, but it is just a "if" statement which writes zeros instead of NaNs.
I did not dig so much in the exporter, and I don't know which solution is best...they seem to be much the same in fact ^^

The problem is not with Blender's version but with Python's version. I made an explanation in this thread.

And thank you for the animation-only feature, it may be useful :) In fact, as for the moment, I got problems with the exporter, as described here, with the skinning and the position of the skeleton. Did you get the same kind of problem with your models ?


Top
 Profile  
Reply with quote  
 Post subject: Re: Blender Exporter
PostPosted: 01.10.2009, 16:23 
Offline

Joined: 28.09.2009, 19:34
Posts: 3
Quote:
they seem to be much the same in fact ^^

I believe they are the same. ^^
Quote:
it may be useful In fact

That's what I thought :P .
Quote:
Did you get the same kind of problem with your models ?

I haven't experienced any trouble yet. I need to do some more testing before I can say it all works properly.


Top
 Profile  
Reply with quote  
 Post subject: Re: Blender Exporter
PostPosted: 01.10.2009, 19:39 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Funto wrote:
Yep, effectively I already fixed the problem for the NaN values, but it is just a "if" statement which writes zeros instead of NaNs.

It would be good if the exporter would output a warning if a mesh has no tex coords because the mesh will look completely broken when normal mapping is enabled.


Top
 Profile  
Reply with quote  
 Post subject: Re: Blender Exporter
PostPosted: 02.10.2009, 03:46 
Offline

Joined: 10.07.2009, 21:16
Posts: 42
Hmm, a warning means something went wrong : a mesh could have no tex coords and it can be what is wanted by the user...(for example, that's the case with the Tux model I use :)).

flammable >> If you want, I uploaded this model which does not work properly, here : http://etud.insa-toulouse.fr/~lfuentes/tux_modif.blend.

The skeleton is not in the right location, and the feet have got problems with skinning (they are ok when disabling skinning)...


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 45 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group