Game Development Community

...

by Redacted · in Artist Corner · 02/20/2006 (3:49 am) · 106 replies

...

About the author

Recent Threads

  • ...
  • ...
  • ...
  • ...
  • ...
  • #21
    02/22/2006 (9:39 am)
    ...
    #22
    02/22/2006 (9:53 am)
    ...
    #23
    02/22/2006 (10:48 am)
    Joseph i can send you some of what i had done for the dif exporter to make it somewhat scalable. Mail me (its in my profile) so i won't forget if you're interested.
    #24
    02/22/2006 (10:51 am)
    Wow, that's a lot of bones, :-).

    Yeah, that's always been the most painful thing about doing stuff like this in blender ... the UI. Of course, a good UI usually takes a bit of work anyway, but when you only have the minimial UI support that blender provides for the python extensions, it makes it tougher and a lot of wheels get reinvented.
    #25
    02/23/2006 (3:06 am)
    Joseph@ just sent you the file.
    #26
    02/23/2006 (4:20 pm)
    I've found a problem (and the workaround :) )
    if the
    ...
    row 1204 armOb = Blender.Object.Get(armname)
    row 1205 armDb = Blender.Armature.Get(armname)
    ...

    name of armOb and the name of armdb are different
    the exporter crashes with
    Error: Exception encountered, bailing out.
    exceptions.Exception
    Dumping output to console

    this portion of code is in addAction and in buildBaseTransforms (row 1009) in Dts.Shape_Blender.py
    The workaround is call the object of the armature and the armature with the same name

    bye
    #27
    02/23/2006 (11:30 pm)
    ...
    #28
    02/24/2006 (1:59 am)
    ...
    #29
    02/25/2006 (3:45 pm)
    Sorry the bug is not fixed:

    for armname in Blender.Armature.Get():
    get the list of names for armDb, so armname is not correct for armobj
    ....
    armOb = Blender.Object.Get(armname)
    armDb = armOb.getData()

    .....

    i've found this solution:
    substitute
    1219	for armname in Blender.Armature.Get():
    1220		if armname == "DTS-EXP-GHOST-DB" or armname == "DTS-EXP-GHOST-OB": continue
    1221		armOb = Blender.Object.Get(armname)
    1222		armDb = armOb.getData()
    1223		tempPose = armOb.getPose()
    1224		for bonename in armDb.bones.keys():
    1225			# reset the bone's transform
    1226			tempPose.bones[bonename].quat = bMath.Quaternion().identity()
    1227			tempPose.bones[bonename].size = bMath.Vector(1.0, 1.0, 1.0)
    1228			tempPose.bones[bonename].loc = bMath.Vector(0.0, 0.0, 0.0)
    1229		# update the pose.
    1230		tempPose.update()
    with:
    objects = Blender.Object.Get()
    	for armOb in objects:
    		if armOb.getType() != 'Armature': continue
    		for armname in Blender.Armature.Get():
    			if armname == "DTS-EXP-GHOST-OB":continue
    			armDb = armOb.getData()
    			tempPose = armOb.getPose()
    			for bonename in armDb.bones.keys():
    				# reset the bone's transform
    				tempPose.bones[bonename].quat = bMath.Quaternion().identity()
    				tempPose.bones[bonename].size = bMath.Vector(1.0, 1.0, 1.0)
    				tempPose.bones[bonename].loc = bMath.Vector(0.0, 0.0, 0.0)
    			# update the pose.
    			tempPose.update()


    bye
    #30
    02/25/2006 (4:07 pm)
    ...
    #31
    02/25/2006 (4:16 pm)
    ...
    #32
    02/25/2006 (5:19 pm)
    ...
    #33
    02/26/2006 (1:18 am)
    Perfect, Joseph!!
    You've made a great work with the export of IK based animations, thank you!

    bye
    #34
    02/26/2006 (10:44 am)
    Joseph,

    extremely excellent work. :)

    a god amongst men.. :)
    #35
    03/03/2006 (12:16 pm)
    ...
    #36
    03/03/2006 (12:27 pm)
    I've been out of town helping my Dad. I'll try to take a quick look at the exporter today, but my schedule is tight since many things were left undone over the last week for me.
    #37
    03/03/2006 (12:32 pm)
    Well Joseph ..

    If you could scratch off a few lines of code and have the exporter UV, Skin and Rig my creation ..that would be totally Wholesome ! www.cybereye-visioneering.com/smileys/wink.gif
    #38
    03/04/2006 (1:05 am)
    Could you modify please the row 928 in dts_blender.py as described?

    from
    guiBoneList.addControl(Common_Gui.ToggleButton(name, "Toggle Status", evtNo, guiBoneGridCallback, None))
    to
    guiBoneList.addControl(Common_Gui.ToggleButton(name, "Toggle Status of " + name, evtNo, guiBoneGridCallback, None))

    so we can see, in the tooltip, the entire name of a bone even if is cutted in the buttons of the armature tab

    thank you!
    #39
    03/04/2006 (8:13 am)
    ...
    #40
    03/04/2006 (1:04 pm)
    I don't see any further problems with the exporter than I've already mentioned in this thread or the other thread.

    I did notice thought that blender is using a lot of memory though after running the exporter 6 or 7 times. At this point its pushing nealy 1.5G of memory. Exiting and restarting puts me at 33M resident and about 60M virtual. This is under linux as reported by top.

    Starting the exporter via Scripts->Export->Torque, brings me to 85M virtual. The first run pushes virtual memory usage to 290M. A second run pushes virtual memory usage to 486M. Resident memory usage is running 80 to 90 percent of virtual. Blender's concept of memory usage as displayed in the menu bar is staying fixed at just over 5M. It looks like something in the exporter or inside blender is holding on to lots of memory between runs.

    Exiting the exporter via ESCKEY and restarting it via the Scripts->Export->Torque keeps virtual memory about the same at 487M. This almost makes it look like it could be a blender problem. Either way, if this isn't resolved, users need to know that they'll need to periodically restart blender to clean up memory usage.

    This testing was done with one of my render models as I was attempting to look at the issues I've mentioned before with it. It has a bit over 4k verts, a complex armature and I had 15 or so actions, some rather long, in that blend file. Performing the same test with my ugly penguin model (307 verts, small simple armature and 4 small actions) shows the same problem, but a much smaller increase of approx. 2M in virtual memory per run.

    I wouldn't say this is a show stopper, and like I said, it might not even be a bug in the exporter code. It is something users should be aware of though if it isn't resolved soon.