Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

Blender MDL export Goto page Previous 1, 2, 3

| Inside3d Forums Forum Index -> Modeling

View previous topic :: View next topic
Author | Message
--- | ---
ShoTro Joined: 18 Mar 2008 Posts: 61 Location: Virginia, USA |

Posted: Tue Apr 01, 2008 3:24 pm Post subject: |

Might be a stupid question, but is there any import for Quake MDL format models in Blender 3d? Update: Nevermind, did a DXF export from qMe and then imported into blender just fine. A single frame is all I needed. Does anyone know if the script ignores bones and just collects the mesh data? (Sorry at work, can't test anything too critical right now)
And does anyone have a link to the Quake1 color palette? Just the palette. Preferably in a format gimp can use.

Back to top |

leileilol Joined: 15 Oct 2004 Posts: 1321 |

Posted: Tue Apr 01, 2008 3:50 pm Post subject: |

ShoTro wrote:
Might be a stupid question, but is there any import for Quake MDL format models in Blender 3d?

You could convert a MDL to MD2 or MD3 then import that
_________________

Back to top |

ShoTro Joined: 18 Mar 2008 Posts: 61 Location: Virginia, USA |

Posted: Tue Apr 01, 2008 4:13 pm Post subject: |

leileilol wrote:

ShoTro wrote:
Might be a stupid question, but is there any import for Quake MDL format models in Blender 3d?

You could convert a MDL to MD2 or MD3 then import that

But how? The issue is I can't seem to find any practical export from MDL. I thought Milkshape would have a way to open MDL so I could export as MD2, but it doesn't.
That is the issue, how do I actually import MDL into anything other then qMe or Meddle (sp?) to export as something Blender can use? Currently my export options are simply DFX or CAD on a frame by frame basis.

Back to top |

leileilol Joined: 15 Oct 2004 Posts: 1321 |

Posted: Tue Apr 01, 2008 5:05 pm Post subject: |

unfortunately I have to use this crappy program to convert to and fro mdl , because of this program's naggy existence it doesn't seem to encourage mdl tool development. i'm sick of working with what crappy tools there are _________________

Back to top |

Dr. Shadowborg Inside3D Staff Joined: 16 Oct 2004 Posts: 726 |

Posted: Tue Apr 01, 2008 5:09 pm Post subject: |

ShoTro wrote:
And does anyone have a link to the Quake1 color palette? Just the palette. Preferably in a format gimp can use.

Here's the one I use with paint shop pro, dunno if gimp can handle .pal files or not:
http://tlb.quakedev.com/files/unsupported/q1.pal
_________________
"Roboto suggests Plasma Bazooka."

Back to top |

ShoTro Joined: 18 Mar 2008 Posts: 61 Location: Virginia, USA |

Posted: Tue Apr 01, 2008 5:25 pm Post subject: |

Hey thanks Dr. Shadowborg and Leileilol. For the palette there was a converter out there so I got it working pretty fast. I am trying to figure out how the best way to import would be, frame by frame seems to work fine for what I am doing since I am looking at the characters geometry and scale Vs my models, and would like to modify existing creatures into new ones.
I have been working with the exporter, took a bit of tweeking to get it to work, but can now see what all I can do with it... even if it is exporting frames then recompiling them using qMe or something, just that blender is SO much easier to work with.
Also, you can use a skeleton with the models, just requires that you "make real" the pose you currently are on. Meaning, you need to have a base model then pose each frame, then make the pose real to the verts. I need to work on this a bit more, maybe there is a way to animate then convert each locked frame for the verts.
Not sure why, but I keep getting a warning that I am exceeding the number of verts on the original (minus a few verts) zombie model. Not sure what is going on.
Update 1: Actually did a "by hand" conversion of the palettes. Took like two seconds, I will post a link as soon as I get home. The converter was changing some values.
Update 2: Apparently when exporting a frame in qMe to DXF format it creates about 10 copies of the verts... doing a remove doubles on the verts in Blender3D fixes the problem with the verts, but not the 10 frames of animation with the export script. Might be the DFX format, need to test that. Or is that the default script doing that? What format is the script in?
Update 3: Quark does an excellent job of exporting to Quake 2 format so that Blender can read the files. Not sure why I am getting memory address errors in qMe when viewing it after export (fixed it), but viewing in most other applications seem to work fine.
Using Paint.net and a PCX Plug-in (http://paintdotnet.forumer.com/viewtopic.php?t=2493) to convert the Quake 2 skin into a PNG for use in blender. Works perfectly.
The result: ready to reanimate/edit/skin quake1 models.
Update 4: Gimp Palette (drop into the palette directory in the Gimp/share folder)

Back to top |

ShoTro Joined: 18 Mar 2008 Posts: 61 Location: Virginia, USA |

Posted: Wed Apr 02, 2008 8:06 pm Post subject: |

Ok, sorry about the double post, but the in terms of using blender for animations I have noticed that Shape Keys are used and not the IPO driver. So I am guessing right now, but it seems like you CAN model in blender and use a skeleton based animation, then assign Shape Keys per frame for the model. This will augment the mesh per frame to fit as it is when the skeleton is set as a modifier (make real). You need to assign a Shape Key while in Edit Mode after posing the model.
I am having a couple issues right now with this but it seems like the process of modeling for Quake one as a whole seems like it might be easier then anticipated.
Importing and exporting seems to be very easy, once you get the hang of it using Quark along with the export script, and doing all the work in Blender3D definitely speeds the modeling and skinning processes up a lot.
_________________
Shoot everything that moves. When it stops moving shoot it again just for good measure.

Back to top |

ShoTro Joined: 18 Mar 2008 Posts: 61 Location: Virginia, USA |

Posted: Mon Apr 07, 2008 5:17 pm Post subject: |

Yeah, me again. Why is it when I import from MD3 format I get the error: "Vertex UV not supported- use Sticky UV"? Also I found a script that converts Armature animations into Shape Keys.

Code:
#To Add the currently deformed mesh as new Shape key. #Disable interactive display of subsurf modifier before running this script. import Blender Blender.Window.EditMode(0) ob = Blender.Scene.getCurrent().objects.active
mesh = ob.getData(mesh=1)
defmesh = Blender.Mesh.New()
defmesh.getFromObject(ob.name)
if not mesh.key:
mesh.insertKey()
for i in range(len(defmesh.verts)):
mesh.verts[i].co.x = defmesh.verts[i].co.x
mesh.verts[i].co.y = defmesh.verts[i].co.y
mesh.verts[i].co.z = defmesh.verts[i].co.z
mesh.insertKey()
defmesh.verts = None

I apparently don't understand Shape Keys well enough to understand this in terms of converting the entire IPO driver into a series of shape keys, but this is a good start. I am assuming you want to grab the initial mesh for each frame of the IPO driver then apply this code to the object. I have NO python or blender scripting experience so I am piecing this together very slowly.
Not sure if that helps at all if you want to write an exporter that can export from a skeletal animation in blender. Credit goes to tolobán and the thread I got the information from is here
Update:
I got some updated code for what I presented above.

Code:
#Make shape keys from a mesh every frame. #Disable interactive display of subsurf modifier before running this script. # (Yes I know, Python should do it) import Blender startframe = Blender.Get('staframe')
endframe = Blender.Get('endframe')
# Set window in object mode
Blender.Window.EditMode(0)
ob = Blender.Scene.getCurrent().objects.active
mesh = ob.getData(mesh=1)
#Create Basis key if it doesn't exist yet
if not mesh.key:
mesh.insertKey()
#Create container in which to copy deformed data
defmesh = Blender.Mesh.New()
# Loop all frames
for frame in range(startframe, endframe + 1):
print "Processing frame", frame
Blender.Set('curframe', frame)
#Get deformed data
defmesh.getFromObject(ob.name)
for i in range(len(defmesh.verts)):
mesh.verts[i].co.x = defmesh.verts[i].co.x
mesh.verts[i].co.y = defmesh.verts[i].co.y
mesh.verts[i].co.z = defmesh.verts[i].co.z
mesh.insertKey()
# Set shapekey name to frame number
mesh.key.blocks[-1].name = "%05i" % frame
#Free memory
defmesh.verts = None

You need to delete the armature after you are done in order to get the correct animation out of the skeleton. It works really well, combined with the MDL export things are getting really simple to just keep the whole modeling process within blender3D itself.
_________________
Shoot everything that moves. When it stops moving shoot it again just for good measure.

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> Modeling | All times are GMT Goto page Previous 1, 2, 3
Page 3 of 3

Jump to:

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 vote in polls in this forum

Powered by phpBB © 2004 phpBB Group