Crystal Space
Welcome, Guest. Please login or register.
December 25, 2014, 05:26:38 pm

Login with username, password and session length
Search:     Advanced search
9032 Posts in 2046 Topics by 9315 Members
Latest Member: Heniogjopek
* Home Help Search Login Register
  Show Posts
Pages: [1] 2
1  Crystal Space Development / Game Content Creation / Re: blender2crystal kicking out plugins on: October 21, 2005, 05:34:39 am
This is a bug with the current version of blender.  There's a chance it might be fixed int he current CVS, but I don't think it is yet.

I filed a patch against this months ago and it was finally responded to a week or two ago.

The bug report is here: http://projects.blender.org/tracker/?func=detail&atid=125&aid=2817&group_id=9

The patch is in the bug report and the file attatched it.  If you're not building from source, there's really now way around it other than going back to earlier versions (I'm not sure how far back you need to go) of blender or waiting for a new release candidate build once my patch or a similar change is appplied to the official CVS.

The patch is encountered when you have more than a certain small number of directories and/or sub-directories in your blender scripts directory.
2  Crystal Space Development / Game Content Creation / Re: UV mapping problem from Blender on: October 21, 2005, 05:26:37 am
I had to flip all my TGAs vertically, with the gimp, for stuff to work with the cal3d viewer.  It worked everywhere but there.

Some software expects the initial pixel in the TGA file to be the upper left and some the lower left.  The real problem is they aren't reading all the information from the TGA file.

The cal3d viewer is one such app that ignores this information and since it only supports a few or only TGA for image file formats, you're basically stuck having two versions of the texture image if you're going to use it.
3  Crystal Space Development / Game Content Creation / Re: Small problem exporting cal3d model from blender on: August 14, 2005, 10:44:34 pm
It sounds like you're using the version of the exported that comes with blender.  I didn't have much luck with that. I've had the most luck with the blender2cal3d_2.py file that comes with recent versions of cal3d.

You can check my post in http://community.crystalspace3d.org/forum/index.php/topic,283.0.html for a link to get it as well as my patch or just browse the CVS for cal3d at sf.net and grab the file if you want a pristine copy.
4  Crystal Space Development / Game Content Creation / Re: An important question about cal3d? on: August 02, 2005, 02:54:06 am
No, sorry, I have no skirts on my models.
5  Crystal Space Development / Game Content Creation / Patch for blender2cal3d_2.py to export submeshes as separatemeshes. on: August 01, 2005, 06:22:05 pm
The file below can be applied via patch to fix a bug in blender2cal3d_2.py and add an enhancement or for those unable to apply patches, I've also included my version of blender2cal3d_2.py.  I've supplied this same patch to the cal3d project at SF also, but figured I'd make it available here too so it might be more visible to those who need it.

The bug fixed has to do with exporting mutiple times per run of this script.  Since this script has a GUI, its possible to invoke it, then export from it several times before finally terminating it.  However, the CVS and released versions of this script don't properly clear the BONES dictionary making exports beyond the first export empty skeletons.  This was easily fixed by calling BONES.clear() in the export function.

The enhancement added was a new option for exporting, the SSM toggle button.  The blender2cal3d_2.py script makes a separate submesh for each texture used in the blender model.  Normally the exporter exports one cal3d mesh per blender mesh.  If the blender mesh includes multiple textures, all the submeshes are exported into that one cal3d mesh.

With the new SSM toggle button enabled, the cal3d submeshes are exported as their own meshes, i.e. into their own .[xc]mf file, allowing one to apply separate materials per submesh easily in a CS world or .cal3d Sprcal3d file. Maybe there's another way to do this in CS, however answers didn't seem forth coming and this solution was easily attainable.

For example, lets say we have a model called Freddy in blender.  This model has 4 textures applied to it.  Exporting with the original script or in the new script with the SSM toggle button disabled will export one cal3d mesh to a file called Freddy.[xc]mf that contains 4 submeshes.  It is not possible as far as I know at the time to apply the 4 separate textures to Freddy in CS.

Exporting with the new script and enabling the SSM toggle button, will cause 4 meshes to get exported: Freddy1.[xc]mf, Freddy2.[xc]mf, Freddy3.[xc]mf and Freddy4.[xc]mf.  Each of these meshes will contain one submesh, the submeshes originally exported in the Freddy.[xc]mf file.  You can then easily apply separate textures/meaterials to these meshes in your CS world or Sprcal3d .cal3d file.

I've attached two files.  The first, blender2cal3d_2.diff-u.txt, is a patch file.  You can apply the patch by cd'ing to the directory containing your current blender2cal3d_2.py file and typing:
Code:
patch < /path/to/the/file/blender2cal3d_2.diff-u.txt

The second file, blender2cal3d_2.py.txt, is my current working version.  If you've made no changes to your blender2cal3d_2.py file, applying the patch to your copy or downloading this should give you the same result so there is no need to download more than one of these files.  Because of restrictions in uploaded file types, you will need to rename this file to blender2cal3d_2.py, i.e. drop the .txt extension when you download or rename after.

Whichever file you get, you should then make sure the final result is avilable to blender so you can find the script in your blender menus.  Under most unix variants, this means putting the file into ~/.blender/scripts .  Under windows ?  I don't know, however there are docs describing this as well as other solutions.  In any event, once you've got the possibly updated script in place, you should restart blender to allow it to find and/or reload the new script.

If you've successfully installed the script, you should be able to find it via: File->Export->Cal3D Exporter 2 V1.0
6  Crystal Space Development / Game Content Creation / Re: An important question about cal3d? on: August 01, 2005, 04:14:02 am
Quote
Can you test it for me in your module using cs?

Do you mean my modified blender2cal3d_2.py ?  I'm not sure that that'd help much as the changes I made to it were only to accomodate my exact convention of naming bones.  Also, the scripts I wrote to clean up actions and such are based on those conventions also.  For example, the script I use to clean up my actions is as follows:

Code:
#!BPY
 
"""
Name: 'Clean Actions for Torque DTS Export'
Blender: 235
Group: 'Animation'
Tooltip: 'Deletes Null/IK bone channels for baked actions.'
"""
 
import string
from string import *
 
import Blender
from Blender import Armature
from Blender.Armature import NLA
 
print
print '==============cleanForDts.py-start====================='
print
 
actions = NLA.GetActions ()
 
for key in actions.keys ():
        if key [0] == 'b' and (find (uppercase, key [1]) >= 0 or key[1] == '_'):
                action = actions [key]
                channels = action.getAllChannelIpos ()
                print
                print 'Action:', key
 
                # Remove control, IK and Null channels.
                #
                print 'Cleaning action of control, IK and null channels:'
                for chan in channels.keys ():
                        if chan [:3] == "IK_":
                                print '\tremoving ', chan, '<<<<<< IK_'
                                action.removeChannel (chan)
                        elif chan == "FacialCtrlBase":
                                print '\tremoving ', chan, '<<<<<< FacialCtrlBase'
                                action.removeChannel (chan)
                        elif find (chan, 'Null') >= 0:
                                print '\tremoving ', chan, '<<<<<< Null'
                                action.removeChannel (chan)
                        elif find (chan, 'Lock') >= 0:
                                print '\tremoving ', chan, '<<<<<< Null'
                                action.removeChannel (chan)
                        elif chan [0] == 'C' and find (uppercase, chan [1]) >= 0:
                                print '\tremoving ', chan, '<<<<<< Control'
                                action.removeChannel (chan)

I hacked the blender source code to name baked actions such as "Walk" becomes "bWalk" instead of the normal "Walk.BAKED" as it was affecting other things once upon a time.  So, what the script above does is find all actions starting with a 'b' followed by an uppercase letter or an '_' (underscore) and then delete the channels associated with my IK, control or otherwise constraint only related bones.

I'd be happy to take a quick look at the .blend and/or attempt to run the model in CS as long as there aren't any intellectual property issues with it, i.e. copyright, tradesecrets, etc.  I just won't become responsible for insuring the protection of someone else's IP in a situation like this.

If you decide to do this, let me know, either via another post or a PM, how you want to make the model available to me.  I am running on linux and only have blender available to me for modeling though.

I'm using a pretty recent version of CS 0.99 with a few week old cal3d.  Depending on your environment, it may or may not mean anything if it works for me and not for you.  If its possible, I'd really encourage you to make sure you're using current or reasonably current version of CS and cal3d.  If you're using blender, you should be using a recent version of blender as well as the blender2cal3d_2.py script in the recent cal3d releases.
7  Crystal Space Development / Game Content Creation / Re: An important question about cal3d? on: July 30, 2005, 11:01:43 pm
It sounds to me like you're using the cloth simulation feature of cal3d.  If you are, that may or may not be supported by CS and is likely to depend on the version of CS you're using and/or how it was built.  I was considering testing this out, but haven't gotten around to it yet.

If you are using the cal3d cloth simulation, one thing you should be aware of is that it will cost you some CPU cycles.  Since CPU is such a valueable resource when it comes to games, I'd consider simply hand animating your skirt.  Whether or not this is important depends a lot on your project.
8  Crystal Space Development / Game Content Creation / Re: Multiple Materials on a SprCal3D mesh on: July 30, 2005, 10:56:27 pm
My models work fine in cal3d_miniviewer, everything moves as it should.  The little testing I've done in CS so far looks ok too, but I haven't tested in CS extensively yet.  At the moment, I'm just fighting the material problem as far as I can see yet.

Have you used the miniviewers from cal3d to test your models ?  Are you getting the same results in CS as in the miniviewers ?

The particular set of models I'm working with right now were originally built for rendering animations in blender, so they have way too many bones at nearly 200.  Also, they are largely animated with IKs and have lots of extra bones to support various constraints.  It took quite a bit of futzing around in blender, writing scripts to clean unneeded IPO channels from baked actions, small modifications to the cal3d exporter script to ignore some of the bones only used for constraints or IKs, etc.  But these models are available to me right now and learning the ins and outs of complex models like this will allow me to create or manage the creation of real models later.

I didn't seem to have as much luck with the standard cal3d exporter script released with blender.  The script I'm using now is part of the current cal3d CVS (maybe part of 0.10) and is called blender2cal3d_2.py.  Note the _2 in the filename.  It seems to work better and has a little bit of a GUI.  If you're using this version, make sure you restart it each time you export though as there's a bug in it that makes your skeletons invalid if you Export more than once per run.  I posted the fix to the cal3d forums at sf, but its unlikely to have made it into CVS by now.

I did initially have problems with my first model's legs not moving under some circumstances, however these went away when I finally had clean skeletons exported, i.e. I'd removed all the extraneous IK and other constraint related bones and corresponding IPO/Action channels.

Since I'm also playing with the torque game engine, I've been fighting these animation problems quite a bit.  Some of the things I've learned are:
  • Apply your scales and rotations to everything you're exporting, i.e. CTRL-AKEY on each object/mesh/armature.
  • Recalc your bone rotations in blender on your armature bones, i.e. in edit mode on an armature, select all your bones (AKEY) and the press CTRL-NKEY.  Beware this is very likely to cause you to reanimate any bones whose rotations were changed.
  • Game engine animation systems, or at least their blender exporters, don't like child bones that begin other than at their parent's end.  For example, it doesn't work very well to parent a bone for a bicep directly to the spine bone(s) leaving a big gap between where the bicep bone starts and the top of the spine bone its parented to.  Add a shoulder bone going from the spine to the bicep bone, even if you never animate it.
  • If you put a key frame in for one bone, its best to put them in for all bones that are animated with an action.  Example:  You pose a model in a sitting position and only animate the head to look around.  Technically since most of the animated bones are being left in their originally posed position, you wouldn't need key frames for them beyond the first, however whenever you put a key frame in for the head and neck to animate the looking around, you should also put a key frame in for the other bones involved in posiing your model in the original state position.
  • If you're trying to animate with IKs you'll need to make sure you bake your actions in blender and then only export the baked actions as the IK actions aren't supported by most, if any, game engines now.
  • If you do go the IK-with-baking route in blender, you have to clean the baked actions up as well as control what bones are exported.  Bascially, don't export bones that don't move anything on the mesh or provide missing structure to the skeleton, i.e. the above mentioned shoulder bones.  Also, don't export the baked actions without cleaning them up manually or with a script.  You should remove extraneous and/or unwanted animation channels in these actions and reduce the number of key frames (baking puts a key frame in for each frame).
  • Be aware of naming conventions of the exporters.  Some of the exporters, like blender2cal3d_2.py, ignore bones, meshes and actions that start with an "_" (underscore).  Also, it assigns special meaning to actions that start with a @ sign.
  • Start with something simple, like the guy in http://community.crystalspace3d.org/tiki-read_article.php?articleId=16 and then play around with it until you understand what your changes cause to happen in cal3d and CS.
  • Once you figure out the solution to a problem, document it so you are able to refer to it later or pass it on to others on your team.
  • Hmm, a hundred other little things I'm forgetting at the moment because I haven't been following the last step yet, smiley.

What you're trying to do isn't a simple or trivial task, at least in the beginning, its going to take some time to come to terms with it.
9  Crystal Space Development / Game Content Creation / [SOLVED] Multiple Materials on a SprCal3D mesh on: July 30, 2005, 01:27:35 am
Edit: While I didn't solve this the way I desired, I was able to modify the blender2cal3d_2.py code to export submeshes as separate meshes.  See my post in this forum that includes my patch file.

According to the "Creating Art for CS" page, SprCal3D should support "several materials" per mesh.

I know that you want to have as few textures/materials per mesh in the game due to performance reasons, but at the moment I'm trying to reuse several old blender models for some prototyping and those models have several UV mapped textures.

I can export a model fine from blender and view it with the cal3d_miniviewer tools and get the expected results.  Now I'm trying to get these models into CS and can't figure out how to assign more than one texture to a SprCal3D mesh.

In my model.cmf file, each separate blender material, i.e. each separately UV mapped texture, is its own cal3d submesh.  Each of these submeshes has its own UV mapping and cal3d material associated with it.  When I load this into CS, I can't determine how to associate more than one texture per mesh on my SprCal3D mesh.

I have something similar to the following in my world file:

Code:
      <material file="cal3d/textures/body.png"  name="body"  />
      <mesh material="body" name="model" file="cal3d/model.cmf"/>

This will get my model in, however the body.png texture is mapped to the head as well as the body.  I need to also define a "head" and other materials and then associate them with the proper materials as cal3d and blender see/saw them.

I've looked through some of the sprcal3d code for support for mutiple materials per mesh and didn't notice it.  Also, most examples of SprCal3D models I've found for CS are actually composed of several cal3d meshes (.cmf files).  So, at this point I've concluded that while a SprCal3D model can use more than one material, those materials can only be assigned to separate cal3d meshes.

Am I missing something ?  Is the statement that SprCal3D supports "several materials" per mesh wrong or misleading in the "Creating Art for CS" page ?  Or is there some syntax to the world file I'm not familar with, say a way of defining a material with multiple textures in it ?
10  Crystal Space Development / Game Content Creation / Re: Problems with cal3D configuration file on: July 23, 2005, 04:08:05 am
Everyone of these that I've looked at are just text/xml-like files, i.e. human readable.  They simply specify the basic lighting for the material (ambient, diffuse, specular and shininess) and optionally a texture.  There might be more features, but those are what I've observed.
11  Crystal Space Development / Game Content Creation / Re: How to create landscapes? on: July 21, 2005, 04:05:44 am
There are several ways to do this in blender.  There's a section in the manual under Advanced Modeling called Noise.  I'd put a link in here for you, but I'm getting connection refused from blender.org and blender3d.org right now.  If you have a local copy of this or Blender 2.3 Guide book, you can find it there.

In a nutshell, take a plane, size it to the size you want it and then subdivide it to the resolution you want.  Add a material and assign a texture to it.  This texture is basically a heightmap.  A normal blender cloud texture can give nice results.

Go back into edit mode, select all the vertices and switch to the Editing (F9) buttons.  Adjust the NLimit slider to get the results you want and click the Noise button as many times as you need to get the results you want.

Alternatively, I found a python script called A.N.T. Landscape you can get by copying it from the elysiun.com forums at http://www.elysiun.com/forum/viewtopic.php?t=35882

Be careful to preseve the indentation as python is sensitive to that.  I've played with the ANT Landscape tool a bit and gotten pretty good results quickly.
12  Crystal Space Development / Game Content Creation / Re: Quark Vs Blender on: July 14, 2005, 10:52:30 pm
From a user point of view, their user interfaces both take most people a bit of time to come to terms with.  With blender, it took me a few days using it to become comfortable with the way the user interface worked and it took a long time to figure out what the hot keys were as at the time they weren't documented very well.  This was several years ago.  With current versions of blender and the current documentation available, it wouldn't tke me as much time.

I've never gotten used to Quark.  I can get by with it for my needs, but I never have really gotten comfortable with its user interface and terminology.  To be honest, I don't have nearly as much time into Quark as I don't have as much use for it.

Most importantly, you need to understand the different reasons these two tools exist.  Blender is a 3D modeling program and you are normally editing models based on vertices and polygons.  Blender has skeletal and other  animation systems which you can use to export animations to CS.  There are some nice UV mapping/unwrapping tools available in blender to UV map complex geometry.  Blender runs well natively under many operating systems such as Linux, Mac OSX, most unixes and windows.

Quark is a "map" editing program, it isn't really meant to create things made of vertices and polygons.  These "maps" are composed of what are normally called brushes and, if the game engine using them supports it, can provide some significant optimizations for collision detection, visibility tests, etc.  As far as I've seen, CS doesn't support these features of maps directly, but I'm a CS newbie, so I could be wrong.  There is support for texture mapping in Quark, but its limited to working well with the "brush" system.  Quark has no, or very limited, support for animations.  Quark only runs natively under windows, although I understand this will eventually change.

If you were making maps/levels for Quake or Half-Life, I'd say use Quark as it was designed to make those maps with all their special limitations/features that those game engines support to make them efficient for those engines to use.  Blender doesn't do this very well as its not its intented purpose.  However, if you're making something based on vertices and polygons, blender works much better at that as that was what it was built to do.  My current understanding of CS leads me to believe that it works natively with objects contructed of vertices and polygons.  Thus the way blender works with the data is closer to the way CS works with it and anything made in Quark needs to be converted to this representation since "maps" and "brushes" aren't represented this way.
13  Crystal Space Development / Support / Re: Recent CS CVS, -framework, ./configure and linux on: July 12, 2005, 06:24:29 am
Nothing to see here ... Everyone move along ... Smiley

Ok, looks better now.  Actually, 0.98 wasn't recognizing python, either because of the -framework issue or because of an issue with my python-devel installation.  I had fixed a python-devel problem on my system sometime yesterday and yesterday was when I had built 0.98, not sure about the relative times though.

It appears that the CVS snapshot I got is now building with cal3d and python and more than likely with the other stuff.  I can go into more detail if anyone thinks it'd help them, but for the most part it looks like I was mixing and matching version of cal3d and CS too many ways yesterday, Smiley.
14  Crystal Space Development / Support / Re: Recent CS CVS, -framework, ./configure and linux on: July 12, 2005, 05:42:40 am
0.98_004 is building fine for me and I'm playing around with it now.  Its the current/recent CVS that won't configure properly, in my case the
cs-2005-07-10.021901.tar.bz2 snapshot I grabbed.

I wanted to try out something recent from CVS and that is when I ran into the problems with the -framework compile options being invoked by ./configure. I apologize for not making that clear.

Also, for clarity, I'm doing this under SuSE 9.2 with SuSE's builds of gcc (3.3.4) and python (2.3.4) and my own build of cal3d (CVS current to 0.98_004 release for 0.98_004 and current cal3d CVS for CS 0.99CVS).
15  Crystal Space Development / General Crystal Space Discussion / Re: Is it legal? on: July 12, 2005, 05:12:44 am
If I were you, I'd read the license agreement closely and if you have questions, check with a lawyer.

Having been working some with the torque game engine the last year or so, this question has come up in their forums many times.  Valve has told garagegames several times that they were going to ammend the license agreement to cover torque, but unless they've done it recently, it hasn't happened yet.  The general concensus there is "don't use it until the license says you can."

If you're doing something private, its unlikely Valve would find out, whether or not your use conforms with the terms of the license agreement.  However, if you're going to be releasing something to the public, commercial or otherwise, it would be worth your while to be sure.  It just isn't worth the time and hassle involved should Valve decide to make an example of you, especially when other tools are available to do the same task.
Pages: [1] 2
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 9.213 seconds with 16 queries.