Pacemaker - Free 3d Skeletal Animation Tool

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Def5
Posts: 21
Joined: Thu Nov 27, 2008 7:50 pm

Pacemaker - Free 3d Skeletal Animation Tool

Post by Def5 »

Link for Pacemaker. Enjoy! :D
http://www.goddysey.com/
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Post by sudi »

wow cool
a lot of great stuff is comming out free these days
unfortunatly i don't understand CharacterFX
hopefully this is better.

Edit: Works but is running really slow.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

Both are usable and good. I have used both (even the b3d and x animated export of cfx) but Blender wins the two of them by KO, these days...
Finally making games again!
http://www.konekogames.com
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

Hey vermeer, you seems to really got excited with Blender lately :wink:
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

Is Blender's fault ;)
(covering decently for indies several areas which it did not so much before..I mean, comparing with commercial tools)


but I'd define 'lately' with like no less than a pair of years....

and actually...been dealing with its char anim since 2002. Time when I started helping Ben in testing of it's x exporter, and some occassional bugging Niko for an x importer... (or was before that...? ) Dunno. My fist modeler was 3ds for dos back in 91 I think... to get really excited witha tool is hard, as used many... ;)
Finally making games again!
http://www.konekogames.com
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

also because made the two last big projects in it(modeling being done aaaalways in Wings3d), and happily enough, could stop using my usual 3d painters for helping in 2d texturing, as I always do.

That and the unbeatable price...
Finally making games again!
http://www.konekogames.com
roelor
Posts: 240
Joined: Wed Aug 13, 2008 8:06 am

Post by roelor »

Really nice. A bit slow though that doesn't matter here. got a fast enough pc.
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

vermeer wrote:also because made the two last big projects in it(modeling being done aaaalways in Wings3d)
What format do you use to load Wings meshes in to Blender?
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

well, usually OBJ, sometimes LWO.

But the matter that keeps me sad is that I gotta rebuild hard edges, which are so easy to set in Wings...

I am crying for some importer that builds hard edges inside blender exactly as exported by wings or any other tool, cause, as crazy as it can sound, such a basic feature like respecting vertex normals on import, is not there in blender in any format. Imo one of the biggest low downs.

Of course, if you modelling levels and objects, there's a way of modeling where you can just work with autosmooth angle, then you just add split edges modifier in Blender, then set the needed angle. But for human characters I do need manually set hard edges. That means adding split edges modifier, but press "manually set as sharp" option of the modifier, and edit mode, select every edge, hit ctrl+e, then "mark as sharp".If it still would have a direct key..tho configurable keys will avoid it, hopefully. Recent thing for Blender also (in wings is since eons).

Even in the best case, I do prefer setting them in wings. It's selection system is the most powerful and fast I've seen in comerical and free tools ever. Besides, setting is needed while modeling to know how to optimize for games. So this prob is duplicating a work step! Crazy..as is a basic feature present in tools of more than 10 years old...

But I fear is due to...even split edge is recent...Blender been focused long time as movie rendering and hi polyocunt, til not long when the aimed both fields... So, seems it simply is not how internals work, it understands all smooth or all flat, and the split edge seems more like a hack, indeed, I fear by the name it is actually splitting edges, not manipulating smoothing normals without breaking mesh, like other 3d tools...

I really like blender for what allows me to do for free, not that I do not know the many lowdows, which I happen to know as know quite already the tool, and been working rpfoessional for long time with comercial tools.

Anyway, it can be more or less compensated, the prob, with lots more time and stuff, like many other probs, so I don't complain, how could I, all this for free... I may not understand why it receives no attention, but have no rights to complain ;)

Inded, it's allowing me close to full projects from start to end, except modeling, for a personal preference (modeling is powerful in blender..I just find it slower...)...really happy, indeed...

And to export, well, b3d, md5(my favourite blender exporter format ), x, cover a bunch of game engines. But I also use blender for renderings.

All in all, really happy with both 3d tools, sincerelly. That's why you hear from me so much blender praise. But am critical as well. With wings, well, I cannot criticize perfection ;)

And what amazes me of blender latel is what is has grown to be. I am aware of most on going improves in many areas, the moment is really interesting of its evolution... there's amazing smoke and fire volumetrics fx on the way right now in a solid pace, hair rendering and animation, working pysics and softbodies, cloth simulation, (a colletion of this things I already tested) , new rendering system, new configurable UI and overal new blender (2.5), lots of improves for 3d painting (but am worried on performance of the new painting...2.48a has yet the old, and well, i prefer to paint with performance...) , lots of IK and constraints improves.... But that's a field I'd like more improves...constraints system, rigging and weighting system. I still see advantages in that field in for example, Max system...

Another big thing I miss is real GI rendering. Still, for lightmaps, AO rendering and some cool lighting, you don't really miss a thing...I mean GI for high end rendering, not really for games ;)

Uvmapping they say it is great, but I use a comercial uv wrapping only tool that has clearly better functionality and features...it's good but could be better...

In 3d painting, there's some weirdiness in what is how a color paints depending on if it's dark o light... the 1pixel brush is not really feathered...etc...

But those are polishing details over what I already consider a complete full-project tool. And free. That's what the joy is for ;)
Finally making games again!
http://www.konekogames.com
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

I rember wings import being part of old blender's, this script still works!

https://svn.blender.org/svnroot/bf-blen ... _import.py

I tested it with some hard edges (you still have to set smooth in blender though, and hard edges will have split vertices) which really sucks if further manipulations will be done in blender. I modified it for you so it imports the hard edges and marks them as sharp (just use edgesplit modi with split by sharp not angle), no split vertices 8), hope i didnt break the script in a hidden way, it works for a cube with marked sharp edges in wings.

Code: Select all

#!BPY

"""
Name: 'Wings3D (.wings)...'
Blender: 232
Group: 'Import'
Tooltip: 'Import Wings3D File Format (.wings)'
"""

__author__ = "Anthony D'Agostino (Scorpius)"
__url__ = ("blender", "elysiun",
"Author's homepage, http://www.redrival.com/scorpius",
"Wings 3D, http://www.wings3d.com")
__version__ = "Update on version from IOSuite 0.5"

__bpydoc__ = """\
This script imports Wings3D files to Blender.

Wings3D is an open source polygon modeler written in Erlang, a
language similar to Lisp. The .wings file format is a binary
representation of erlang terms (lists, tuples, atoms, etc.) and is
compressed with zlib.

Usage:<br>
  Execute this script from the "File->Import" menu and choose a Wings file
to open.

Supported:<br>
	Meshes only. Not guaranteed to work in all situations.

Missing:<br>
  Materials, UV Coordinates, and Vertex Color info will be ignored.

Known issues:<br>
	Triangulation of convex polygons works fine, and uses a very simple
fanning algorithm. Convex polygons (i.e., shaped like the letter "U")
require a different algorithm, and will be triagulated incorrectly.

Notes:<br>
	Last tested with Wings 3D 0.98.25 & Blender 2.35a.<br>
	This version has improvements made by Adam Saltsman (AdamAtomic) and Toastie.
"""

# $Id$
#
# +---------------------------------------------------------+
# | Copyright (c) 2002 Anthony D'Agostino                   |
# | http://www.redrival.com/scorpius                        |
# | scorpius@netzero.com                                    |
# | Feb 19, 2002                                            |

# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
# ***** END GPL LICENCE BLOCK *****


import Blender, meshtools
from Blender import Scene, Mesh, Window, sys
import bpy 
import struct, time, sys, os, zlib, cStringIO
	
# ==============================================
# === Read The 'Header' Common To All Chunks ===
# ==============================================
def read_chunkheader(data):
	data.read(2) #version, tag = struct.unpack(">BB", data.read(2))
	misc, namelen = struct.unpack(">BH", data.read(3))
	name = data.read(namelen)
	return name

# ==============================
# === Read The Material Mode ===
# ==============================
def read_mode(data):
	data.read(5)			# BL
	read_chunkheader(data)	# "mode"
	misc, namelen = struct.unpack(">BH", data.read(3))
	data.read(namelen)
	data.read(1)			# 6A

# =======================
# === Read Hard Edges ===
# =======================
def read_hardedges(data):
	hardedge_table = {} # hard edges table
	tag = data.read(1)
	if tag == '\x6A':
		return hardedge_table # There are no hard edges
	elif tag == '\x6B':
		numhardedges, = struct.unpack(">H", data.read(2))
		#print "numhardedges:", numhardedges
		for i in range(numhardedges):
			hardedge_table[i] = struct.unpack(">B", data.read(1))[0]
	elif tag == '\x6C':
		numhardedges, = struct.unpack(">L", data.read(4))
		#print "numhardedges:", numhardedges
		for i in range(numhardedges):
			misc = data.read(1)
			if misc == '\x61':    # next value is stored as a byte
				hardedge_table[i] = struct.unpack(">B", data.read(1))[0]
			elif misc == '\x62':  # next value is stored as a long
				hardedge_table[i] = struct.unpack(">L", data.read(4))[0]
		data.read(1) # 6A
	else:
		print tag
	return hardedge_table

# ==================
# === Read Edges ===
# ==================
def read_edges(data):
	misc, numedges = struct.unpack(">BL", data.read(5))
	edge_table = {}  # the winged-edge table
	for i in range(numedges):
		if not i%100 and meshtools.show_progress: Blender.Window.DrawProgressBar(float(i)/numedges, "Reading Edges")
		misc, etype = struct.unpack(">BL", data.read(5))
		if etype == 2:				# Vertex Colors
			data.read(10)			# or read_chunkheader(data)  # "color"
			data.read(5)			# BL
			r1,g1,b1,r2,g2,b2 = struct.unpack(">dddddd", data.read(48))
			#print "%3d %3d %3d | %3d %3d %3d" % (r1*255,g1*255,b1*255,r2*255,g2*255,b2*255),
			#print "%f %f %f | %f %f %f" % (r1, g1, b1, r2, g2, b2)
		data.read(9) # or read_chunkheader(data)  # "edge"
		edge = []			# the eight entries for this edge
		for e in range(8):	# Sv Ev | Lf Rf | Lp Ls | Rp Rs
			misc = data.read(1)
			if misc == '\x61':    # next value is stored as a byte
				entry, = struct.unpack(">B", data.read(1))
				edge.append(entry)
			elif misc == '\x62':  # next value is stored as a long
				entry, = struct.unpack(">L", data.read(4))
				edge.append(entry)
		edge_table[i] = edge
		data.read(1) # 6A
	data.read(1) # 6A
	return edge_table

# ==================
# === Read Faces ===
# ==================
def read_faces(data):
	mat_table = {} #list of faces and material names
	misc, numfaces = struct.unpack(">BL", data.read(5))
	for i in range(numfaces):
		if not i%100 and meshtools.show_progress: Blender.Window.DrawProgressBar(float(i)/numfaces, "Reading Faces")
		if data.read(1) == '\x6C':  # a material follows
			data.read(4)
			read_chunkheader(data)
			misc, namelen = struct.unpack(">BH", data.read(3))
			mat_table[i] = data.read(namelen)
			data.read(1) # 6A?
	data.read(1) # 6A
	return mat_table

# ==================
# === Read Verts ===
# ==================
def read_verts(data):
	misc, numverts = struct.unpack(">BL", data.read(5))
	verts = []	# a list of verts
	for i in range(numverts):
		if not i%100 and meshtools.show_progress: Blender.Window.DrawProgressBar(float(i)/numverts, "Reading Verts")
		data.read(10)
		x, y, z = struct.unpack(">ddd", data.read(24))  # double precision
		verts.append((x, -z, y))
		data.read(1) # 6A
	data.read(1) # 6A
	return verts

# =======================
# === Make Face Table ===
# =======================
def make_face_table(edge_table): # For Wings
	face_table = {}
	for i in range(len(edge_table)):
		Lf = edge_table[i][2]
		Rf = edge_table[i][3]
		if Lf >= 0:
			face_table[Lf] = i
		if Rf >= 0:
			face_table[Rf] = i
	return face_table

# =======================
# === Make Vert Table ===
# =======================
def make_vert_table(edge_table): # For Wings
	vert_table = {}
	for i in range(len(edge_table)):
		Sv = edge_table[i][0]
		Ev = edge_table[i][1]
		vert_table[Sv] = i
		vert_table[Ev] = i
	return vert_table

# ==================
# === Make Faces ===
# ==================
def make_faces(edge_table): # For Wings
	face_table = make_face_table(edge_table)
	faces=[]
	for i in range(len(face_table)):
		face_verts = []
		current_edge = face_table[i]
		while(1):
			if i == edge_table[current_edge][3]:
				next_edge = edge_table[current_edge][7] # Right successor edge
				next_vert = edge_table[current_edge][0]
			elif i == edge_table[current_edge][2]:
				next_edge = edge_table[current_edge][5] # Left successor edge
				next_vert = edge_table[current_edge][1]
			else:
				break
			face_verts.append(next_vert)
			current_edge = next_edge
			if current_edge == face_table[i]: break
		if len(face_verts) > 0:
			face_verts.reverse()
			faces.append(face_verts)
	return faces

# =======================
# === Dump Wings File ===
# =======================
def dump_wings(filename):
	import pprint
	start = time.clock()
	file = open(filename, "rb")
	header = file.read(15)
	fsize, = struct.unpack(">L",  file.read(4))   # file_size - 19
	misc,  = struct.unpack(">H",  file.read(2))
	dsize, = struct.unpack(">L",  file.read(4))   # uncompressed data size
	data   = file.read(fsize-6)
	file.close()
	data = zlib.decompress(data)
	if dsize != len(data): print "ERROR: uncompressed size does not match."
	data = cStringIO.StringIO(data)	
	print "header:", header
	print read_chunkheader(data)  # === wings chunk ===
	data.read(4) # misc bytes
	misc, numobjs, = struct.unpack(">BL", data.read(5))
	print "filename:", filename
	print "numobjs :", numobjs
	for obj in range(numobjs):
		print read_chunkheader(data) # === object chunk ===
		misc, namelen = struct.unpack(">BH", data.read(3))
		objname = data.read(namelen)
		print read_chunkheader(data) # === winged chunk ===
		edge_table = read_edges(data)
		mat_table = read_faces(data)
		numfaces = len(mat_table)
		verts = read_verts(data)
		hardedge_table = read_hardedges(data)

		face_table = {}  # contains an incident edge
		vert_table = {}  # contains an incident edge
		for i in range(len(edge_table)):
			face_table[edge_table[i][2]] = i  # generate face_table
			face_table[edge_table[i][3]] = i
			vert_table[edge_table[i][0]] = i  # generate vert_table
			vert_table[edge_table[i][1]] = i

		print "objname :", objname
		print "numedges:", len(edge_table)
		print "numfaces:", numfaces
		print "numverts:", len(verts)
		print
		print "Ä"*79
		print "edge_table:"
		#pprint.pprint(edge_table)
		#for i in range(len(edge_table)): print "%2d" % (i), edge_table[i]
		print
		print "face_table:"
		#pprint.pprint(face_table)
		#for i in range(len(face_table)): print "%2d %2d" % (i, face_table[i])
		print
		print "vert_table:"
		#pprint.pprint(vert_table)
		#for i in range(len(vert_table)): print "%2d %2d" % (i, vert_table[i])
	file.close()
	end = time.clock()
	print '\a\r',
	sys.stderr.write("\nDone in %.2f %s\a\r" % (end-start, "seconds"))

# =========================
# === Read Wings Format ===
# =========================
def read(filename):

	start = time.clock()
	file = open(filename, "rb")
	header = file.read(15)
	fsize, = struct.unpack(">L",  file.read(4))   # file_size - 19
	misc,  = struct.unpack(">H",  file.read(2))
	dsize, = struct.unpack(">L",  file.read(4))   # uncompressed data size
	data   = file.read(fsize-6)
	#print file.tell(), "bytes"
	file.close()
	Blender.Window.DrawProgressBar(1.0, "Decompressing Data")
	data = zlib.decompress(data)
	data = cStringIO.StringIO(data)
	read_chunkheader(data) # wings chunk
	data.read(4)		   # misc bytes
	misc, numobjs = struct.unpack(">BL", data.read(5))
	message = "Successfully imported " + os.path.basename(filename) + '\n\n'
	message += "%s %8s %8s %8s\n" % ("Object".ljust(15), "faces", "edges", "verts")
	message += "%s %8s %8s %8s\n" % ("ÄÄÄÄÄÄ".ljust(15), "ÄÄÄÄÄ", "ÄÄÄÄÄ", "ÄÄÄÄÄ")

	for obj in range(numobjs):
		read_chunkheader(data) # object chunk
		misc, namelen = struct.unpack(">BH", data.read(3))
		objname = data.read(namelen)
		read_chunkheader(data) # winged chunk
		edge_table = read_edges(data)
		mat_table = read_faces(data)
		numfaces = len(mat_table)
		verts = read_verts(data)
		hardedge_table = read_hardedges(data)

	

		
			
	
		read_mode(data)
		faces = make_faces(edge_table)
		message += "%s %8s %8s %8s\n" % (objname.ljust(15), len(faces), len(edge_table), len(verts))
		meshtools.create_mesh(verts, faces, objname)
		sce = bpy.data.scenes.active
		ob_act = sce.objects.active
		
		
		me = ob_act.getData(mesh=1) # old NMesh api is default
		
		for j in range(len(hardedge_table)):
			hardedge = hardedge_table[j]
			oldedge = edge_table[hardedge]
			me.edges[hardedge].flag=Mesh.EdgeFlags.SHARP
		
		

	material = data.read()
	#for i in material[0:6]: print "%02X" % ord(i),
	#print
	Blender.Window.DrawProgressBar(1.0, "Done")    # clear progressbar
	data.close()
	end = time.clock()
	seconds = "\nDone in %.2f %s" % (end-start, "seconds")
	message += seconds
	meshtools.print_boxed(message)

def fs_callback(filename):
	read(filename)

Blender.Window.FileSelector(fs_callback, "Import Wings3D")
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

woah, omaremad!!!

Absolutely amazing!!

Am at family's house now...will test asap with a character model once back at home today!!

Thanks a zillion!!
Finally making games again!
http://www.konekogames.com
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

Thanks :D

I tested some simple shapes in wings and i discovered that you must triangulate/quadrangulate your mesh in wings because the ngons confuse the loader and they arent suppourted in blender anyway.
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

still, at family home... ;)

That which you say is absolutely no issue: Blender has no ngons support (bmesh is in the works but...still far from ended, let alone included to trunk) , and anyway, the exports we usually depend on in 95% of cases due to formats and packages, aboslutely require quadify if not even required a triangulate! great thing...heck, blender team should incorporate these kind of things in oficial releases...!

Will tell you more later :)
Finally making games again!
http://www.konekogames.com
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

---edited by myself, opening a new thread, and please, excuse me, in my euphoria did not realized was totally off topic.. --
Finally making games again!
http://www.konekogames.com
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

Wings3D is "cute" if some software can be called like that :) I would only wish it had more extensive subdivision control ...some control lines and such.

I also export to UV mapping software for texturing and then animation software for animating. Thats why I have newer reopened Blender after first time I found its GUI and workflow totally unintuitive.
Post Reply