CAL3D to Ogre converter v0.8.2
-
- Goblin
- Posts: 254
- Joined: Tue Feb 13, 2007 5:33 am
CAL3D to Ogre converter v0.8.2
Grab it from ogreaddons/cal3d2ogre.
Features:
* converts geometry, skeletons, animations and materials from binary and XML CAL3D files (cmf, csf, caf, crf, xmf, xsf, xaf, xrf)
* parses CAL3D config files (cfg)
* outputs binary or XML files
* keeps UV mapping
* converts normals
* option to keep +Z axis as up (default behavior swaps Y and Z axes, so +Y is up)
* manual scaling factor for the resulting mesh
* selectable triangle winding for output
* converts LODs
TODO:
* process spring data. I'd really love to hear ideas on this, because I have none
* write better documentation
* a bit of code cleaning
Suggestions and contributions are welcome, of course.
Disclaimer: no Linux/Mac makefiles. I think the code compiles as is on both, but haven't tested. Only a VS8 solution is included. The source borrows from OgreXMLConverter and includes files from it. Future releases might not. My code is released under the ZLib license.
Usage: just run the program from the command line followed by the file names of the mesh, the skeleton, and animations. To produce binary output files, add the -b switch before the file names. For additional help, run the program without arguments.
Refer to the included readme file for additional information.
Features:
* converts geometry, skeletons, animations and materials from binary and XML CAL3D files (cmf, csf, caf, crf, xmf, xsf, xaf, xrf)
* parses CAL3D config files (cfg)
* outputs binary or XML files
* keeps UV mapping
* converts normals
* option to keep +Z axis as up (default behavior swaps Y and Z axes, so +Y is up)
* manual scaling factor for the resulting mesh
* selectable triangle winding for output
* converts LODs
TODO:
* process spring data. I'd really love to hear ideas on this, because I have none
* write better documentation
* a bit of code cleaning
Suggestions and contributions are welcome, of course.
Disclaimer: no Linux/Mac makefiles. I think the code compiles as is on both, but haven't tested. Only a VS8 solution is included. The source borrows from OgreXMLConverter and includes files from it. Future releases might not. My code is released under the ZLib license.
Usage: just run the program from the command line followed by the file names of the mesh, the skeleton, and animations. To produce binary output files, add the -b switch before the file names. For additional help, run the program without arguments.
Refer to the included readme file for additional information.
Last edited by Lord LoriK on Sun Feb 24, 2008 5:14 pm, edited 3 times in total.
-
- Goblin
- Posts: 254
- Joined: Tue Feb 13, 2007 5:33 am
-
- Goblin
- Posts: 254
- Joined: Tue Feb 13, 2007 5:33 am
That's what I'm trying to find out, sinbad. I won't bother you to add my stuff to ogreaddons just to clutter the server with something nobody uses, but as Azatoth implied, many users could benefit from this when looking for models to use in their projects. After all, that was my motivation to write this in the first place...
-
- Gnoblar
- Posts: 5
- Joined: Fri Feb 29, 2008 5:20 am
This tool is exactly what I need! I can't wait to try it! I need to convert to ogre format for use in the Blink3D platform. I have geometry, material, skeleton and animation files all in cal3d format (xmf, xrf, xsf, and xaf respectively).
The only problem is getting the tool. I'm not quite sure I understand how to get the program.
It seems I need to get into some kind of repository (please forgive me for my ignorance!) using cygwin. I tried this, because for some reason I have cygwin on my computer but never used it. I typed in the commands as dictated by the ogre wiki, and alas I was faced with a "do not understand this command".
Your help would be very very appreciated.
-Whystler
The only problem is getting the tool. I'm not quite sure I understand how to get the program.
It seems I need to get into some kind of repository (please forgive me for my ignorance!) using cygwin. I tried this, because for some reason I have cygwin on my computer but never used it. I typed in the commands as dictated by the ogre wiki, and alas I was faced with a "do not understand this command".
Your help would be very very appreciated.
-Whystler
-
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
-
- Gnoblar
- Posts: 5
- Joined: Fri Feb 29, 2008 5:20 am
-
- Goblin
- Posts: 254
- Joined: Tue Feb 13, 2007 5:33 am
I could make one available if you *really* need it, but remember: Windows only, compiled with VC++ 2005 SP1 (you would need to get the needed libraries) and with Ogre::Real typedef'd to double, not float. (so I would have to send you the version of ogremain.dll that I'm using) I'll do it tomorow because it 1:58 am here and I *need* some sleep badly.Whystler wrote:By people who know where my experience is and isn't , I've been told to ask for a binary version of this tool. Is there one?
Thanks for the TortoiseCVS link. I'll check it out.
-Whystler
Edit: here it is. Remeber no much testing has gone into this, so if you find a bug, report it in this thread.
http://rapidshare.de/files/38715320/cal ... 2.zip.html
-
- Gnoblar
- Posts: 7
- Joined: Tue Jun 08, 2004 2:10 am
- Location: Seattle Washington
the latest build seemed to work okay. Problems with paladin having inverted faces when the conversion occurred. The inverted faces were seen in lexiviewer. However when the skeleton was converted it worked out fine. I used cygwin and plopped the build (exe and dll) in to urs/local/bin so that cygwin could find the files. Other way you can create a bin dir in you home directory and plop all the files there. Then you have to append to your $PATH variable.
It would be nice to have the converter read the cfg file and convert everything in that cfg file by traversing through it and convert them for you.
Hope this feedback helps
It would be nice to have the converter read the cfg file and convert everything in that cfg file by traversing through it and convert them for you.
Hope this feedback helps
-
- Goblin
- Posts: 254
- Joined: Tue Feb 13, 2007 5:33 am
Glad to hear that!xrenmilay wrote:the latest build seemed to work okay.
xrenmilay wrote:Problems with paladin having inverted faces when the conversion occurred. The inverted faces were seen in lexiviewer.
That's what "invert triangle winding" fixes, precisely. Did you try that?
It does. If you provide the name of the cfg file, it converts all the files in it. Or at least it should. I rushed to make a cleaner distribution before uploading it to the CVS, so I might have slipped in a new bug, but AFAIK, it worked fine.xrenmilay wrote:It would be nice to have the converter read the cfg file and convert everything in that cfg file by traversing through it and convert them for you.
Thanks, it's good to know somebody actually used this... If you test these two things, let me know the results. Good luck!xrenmilay wrote:Hope this feedback helps
-
- Gnoblar
- Posts: 4
- Joined: Thu Jul 17, 2008 4:47 am
Linux Make files for an artist?
Hey Guys
I have a heap of animation files from an abandoned game that are in cal3d format
I would like to convert them to OGRE so i can play in python with them
Im not familar enough with Makefile to be able to get this to compile on linux.
I guess I can try harder or you can throw me a bone
Sam
I have a heap of animation files from an abandoned game that are in cal3d format
I would like to convert them to OGRE so i can play in python with them
Im not familar enough with Makefile to be able to get this to compile on linux.
I guess I can try harder or you can throw me a bone
Sam
-
- Goblin
- Posts: 254
- Joined: Tue Feb 13, 2007 5:33 am
Re: Linux Make files for an artist?
I'm sorry, but I have no Linux working environment for development, and nobody contributed a makefile yet. In fact, I don't even know if this compiles in Linux. (it should, but who knows)samhodge wrote:Hey Guys
I have a heap of animation files from an abandoned game that are in cal3d format
I would like to convert them to OGRE so i can play in python with them
Im not familar enough with Makefile to be able to get this to compile on linux.
I guess I can try harder or you can throw me a bone
Sam
All I can do is wish you luck, but please, if you manage to compile it, send me the instructions or the makefile. I'll add it ASAP.
-
- Gnoblar
- Posts: 4
- Joined: Thu Jul 17, 2008 4:47 am
It compiles
OGRE_PATH = /usr/include/OGRE/
CAL3D2OGRE_PATH = /media/ogre/cal3d2ogre
TINYXML_USE_STL := NO
tinyxmlparser.o: tinyxmlparser.cpp
g++ -I${CAL3D2OGRE_PATH}/include -I${OGRE_PATH} -c -DTIXML_USE_STL -o tinyxmlparser.o tinyxmlparser.cpp
tinyxmlerror.o: tinyxmlerror.cpp
g++ -I${CAL3D2OGRE_PATH}/include -I${OGRE_PATH} -c -DTIXML_USE_STL -o tinyxmlerror.o tinyxmlerror.cpp
tinyxml.o: tinyxml.cpp
g++ -I${CAL3D2OGRE_PATH}/include -I${OGRE_PATH} -c -DTIXML_USE_STL -o tinyxml.o tinyxml.cpp
tinystr.o: tinystr.cpp
g++ -I${CAL3D2OGRE_PATH}/include -I${OGRE_PATH} -c -DTIXML_USE_STL -o tinystr.o tinystr.cpp
OgreXMLSkeletonSerializer.o: OgreXMLSkeletonSerializer.cpp
g++ -I${CAL3D2OGRE_PATH}/include -I${OGRE_PATH} -c -DTIXML_USE_STL -o OgreXMLSkeletonSerializer.o OgreXMLSkeletonSerializer.cpp
OgreXMLMeshSerializer.o: OgreXMLMeshSerializer.cpp
g++ -I${CAL3D2OGRE_PATH}/include -I${OGRE_PATH} -c -DTIXML_USE_STL -o OgreXMLMeshSerializer.o OgreXMLMeshSerializer.cpp
CAL3DParser.o: CAL3DParser.cpp
g++ -I${CAL3D2OGRE_PATH}/include -I${OGRE_PATH} -c -DTIXML_USE_STL -o CAL3DParser.o CAL3DParser.cpp
main.o: main.cpp
g++ -I${OGRE_PATH} -I${CAL3D2OGRE_PATH}/include -c -DTIXML_USE_STL -o main.o main.cpp
all: main.o CAL3DParser.o OgreXMLMeshSerializer.o OgreXMLSkeletonSerializer.o tinystr.o tinyxml.o tinyxmlerror.o tinyxmlparser.o
g++ -I${CAL3D2OGRE_PATH}/include -I${OGRE_PATH} -DTIXML_USE_STL -L/usr/lib -lOgreMain -lboost_thread -lboost_thread-mt -o cal3d2ogre main.o CAL3DParser.o OgreXMLMeshSeriali
zer.o OgreXMLSkeletonSerializer.o tinystr.o tinyxml.o tinyxmlerror.o tinyxmlparser.o
clean:
rm *.o
CAL3D2OGRE_PATH = /media/ogre/cal3d2ogre
TINYXML_USE_STL := NO
tinyxmlparser.o: tinyxmlparser.cpp
g++ -I${CAL3D2OGRE_PATH}/include -I${OGRE_PATH} -c -DTIXML_USE_STL -o tinyxmlparser.o tinyxmlparser.cpp
tinyxmlerror.o: tinyxmlerror.cpp
g++ -I${CAL3D2OGRE_PATH}/include -I${OGRE_PATH} -c -DTIXML_USE_STL -o tinyxmlerror.o tinyxmlerror.cpp
tinyxml.o: tinyxml.cpp
g++ -I${CAL3D2OGRE_PATH}/include -I${OGRE_PATH} -c -DTIXML_USE_STL -o tinyxml.o tinyxml.cpp
tinystr.o: tinystr.cpp
g++ -I${CAL3D2OGRE_PATH}/include -I${OGRE_PATH} -c -DTIXML_USE_STL -o tinystr.o tinystr.cpp
OgreXMLSkeletonSerializer.o: OgreXMLSkeletonSerializer.cpp
g++ -I${CAL3D2OGRE_PATH}/include -I${OGRE_PATH} -c -DTIXML_USE_STL -o OgreXMLSkeletonSerializer.o OgreXMLSkeletonSerializer.cpp
OgreXMLMeshSerializer.o: OgreXMLMeshSerializer.cpp
g++ -I${CAL3D2OGRE_PATH}/include -I${OGRE_PATH} -c -DTIXML_USE_STL -o OgreXMLMeshSerializer.o OgreXMLMeshSerializer.cpp
CAL3DParser.o: CAL3DParser.cpp
g++ -I${CAL3D2OGRE_PATH}/include -I${OGRE_PATH} -c -DTIXML_USE_STL -o CAL3DParser.o CAL3DParser.cpp
main.o: main.cpp
g++ -I${OGRE_PATH} -I${CAL3D2OGRE_PATH}/include -c -DTIXML_USE_STL -o main.o main.cpp
all: main.o CAL3DParser.o OgreXMLMeshSerializer.o OgreXMLSkeletonSerializer.o tinystr.o tinyxml.o tinyxmlerror.o tinyxmlparser.o
g++ -I${CAL3D2OGRE_PATH}/include -I${OGRE_PATH} -DTIXML_USE_STL -L/usr/lib -lOgreMain -lboost_thread -lboost_thread-mt -o cal3d2ogre main.o CAL3DParser.o OgreXMLMeshSeriali
zer.o OgreXMLSkeletonSerializer.o tinystr.o tinyxml.o tinyxmlerror.o tinyxmlparser.o
clean:
rm *.o
-
- Gnoblar
- Posts: 4
- Joined: Thu Jul 17, 2008 4:47 am
pasted above is the makefile
but when I try to give it a cal3d .cfg file it segfaults, so maybe it still needs a little more work
it seems to be heavily linked against boost
it seems to be heavily linked against boost
-
- Gnoblar
- Posts: 4
- Joined: Thu Jul 17, 2008 4:47 am
how embarassing
after I RTFM about how autotools is meant to work its all quite simple
adding the following files
$(cal3d2ogre)/bootstrap
$(cal3d2ogre)/configure.ac
$(cal3d2ogre)/include/Makefile.am
$(cal3d2ogre)/src/Makefile.am
Then in the root dir type
adding the following files
$(cal3d2ogre)/bootstrap
Code: Select all
#!/bin/sh
rm -rf autom4te.cache
libtoolize --force --copy && \
aclocal && \
autoheader && \
automake --add-missing --force-missing --copy --foreign && \
autoconf
$(cal3d2ogre)/configure.ac
Code: Select all
AC_INIT(configure.ac)
AM_INIT_AUTOMAKE(cal3d2ogre, 0.82)
AM_CONFIG_HEADER(config.h)
AC_LANG_CPLUSPLUS
AC_PROG_CXX
AM_PROG_LIBTOOL
PKG_CHECK_MODULES(OGRE, [OGRE >= 1.2])
AC_SUBST(OGRE_CFLAGS)
AC_SUBST(OGRE_LIBS)
AC_CONFIG_FILES(Makefile src/Makefile include/Makefile)
AC_OUTPUT
Code: Select all
noinst_HEADERS=CAL3DParser.h OgreXMLMeshSerializer.h OgreXMLPrerequisites.h OgreXMLSkeletonSerializer.h tinystr.h tinyxml.h
$(cal3d2ogre)/src/Makefile.am
Code: Select all
bin_PROGRAMS= cal3d2ogre
cal3d2ogre_CPPFLAGS=-I$(top_srcdir)/include -DTIXML_USE_STL
cal3d2ogre_SOURCES= CAL3DParser.cpp OgreXMLMeshSerializer.cpp OgreXMLSkeletonSerializer.cpp tinystr.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp main.cpp
cal3d2ogre_CXXFLAGS=$(OGRE_CFLAGS)
cal3d2ogre_LDADD= $(OGRE_LIBS)
Then in the root dir type
Code: Select all
chmod +x bootstrap
./bootstrap
./configure
make
cd src
cal3d2ogre
-
- Goblin
- Posts: 254
- Joined: Tue Feb 13, 2007 5:33 am
-
- Goblin
- Posts: 254
- Joined: Tue Feb 13, 2007 5:33 am
-
- Gnoblar
- Posts: 10
- Joined: Tue Feb 18, 2014 3:56 pm
- Location: Montreal
Re: CAL3D to Ogre converter v0.8.2
Is there a link for download?
-
- Beholder
- Posts: 1512
- Joined: Fri Feb 22, 2013 4:44 am
- Location: Deep behind enemy lines
- x 139
Re: CAL3D to Ogre converter v0.8.2
It's still there in the addons repo, though I haven't used it and can't say if it works with newer versions of Ogre:
https://svn.code.sf.net/p/ogreaddons/code/trunk
https://svn.code.sf.net/p/ogreaddons/code/trunk
-
- Gnoblar
- Posts: 10
- Joined: Tue Feb 18, 2014 3:56 pm
- Location: Montreal
Re: CAL3D to Ogre converter v0.8.2
Thank you very much
-
- Gnoblar
- Posts: 10
- Joined: Tue Feb 18, 2014 3:56 pm
- Location: Montreal
Re: CAL3D to Ogre converter v0.8.2
Hello, Sorry for posting again but im having problems with CAL3D to Ogre converter v0.8.2 I don't know how to where to begin to setting it up as i new to the C++ world. Not even sure if it still works but its the only thing so far that says it can convert Mesh files which ive been looking for. Is it a script? Would anyone happen to have a working copy or could possible share with setting it up? Thanks
-
- Gnoblar
- Posts: 2
- Joined: Sun Mar 04, 2018 7:57 pm
Re: CAL3D to Ogre converter v0.8.2
Sorry for reviving this dead post. We're in deep trouble.
We have deep trouble with cal3D. We need to find a way to import it into Unity. The best possibility we found until now is cal3D2ogre. The idea would be to import it into Ogre, export it into a format which either Unity can already read or for example blender and then to Unity. The problem is, the addon doesn't seem to be in the addon repo anymore. I really hope someone can help us, thanks for reading and kind regards!
We have deep trouble with cal3D. We need to find a way to import it into Unity. The best possibility we found until now is cal3D2ogre. The idea would be to import it into Ogre, export it into a format which either Unity can already read or for example blender and then to Unity. The problem is, the addon doesn't seem to be in the addon repo anymore. I really hope someone can help us, thanks for reading and kind regards!