Register for your free account! | Forgot your password?

You last visited: Today at 01:37

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



C3 Model

Discussion on C3 Model within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2012
Posts: 51
Received Thanks: 30
C3 Model

As I see there is some interest in this subject, I will post here the code I programmed some time ago. I'm still learning, but when I wrote this code I was more noob, so don't expect very good code. Anyway, maybe somebody could find interesting info inside.
If anybody wants further explanations, please do not hesitate to ask.
Oh, and I would love to join a team if you will work on this.

I studied C3 files, and found all composed by different types of parts:

I have found the following combination of parts:

C3 Files have the following structure:
16 bytes C3File = "MAXFILE C3 00001"
1 or more parts:
Variable bytes C3Part

Every C3Part have a defined structure depending on C3PartType.

To read a C3 file:
Read the C3File magic (16 bytes)
Read Every part

To read a C3Part:
Read C3PartType (4 bytes)
Read C3PartLength (UInt32). This lenght does not include the already read 8 bytes.
Read or skip this part.
Continue to next part, if any...

When I wrote code to handle this files, I was still in first stages of my programming learning, but I think you will find some useful info.
Attached Files
File Type: zip C3Model.zip (19.5 KB, 158 views)
urgabel is offline  
Thanks
9 Users
Old 05/22/2013, 23:49   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
Appreciate this. I'll have to take a look through it later.

Just took a quick look at the code. Ooh lord this will be fun to convert lol... Hopefully my old model viewer will be easy enough to convert. XNA + runtime generated models is a pain. Someday I'll have to learn more about writing content pipeline **** so things actually work properly with it :P
pro4never is offline  
Old 05/23/2013, 00:03   #3
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,882
Someone actually interested in learning! Welcome aboard.
InfamousNoone is offline  
Thanks
4 Users
Old 05/23/2013, 01:40   #4
 
Ultimation's Avatar
 
elite*gold: 0
Join Date: Mar 2005
Posts: 1,425
Received Thanks: 1,565
Check for more information.
Ultimation is offline  
Thanks
1 User
Old 05/23/2013, 20:23   #5
 
elite*gold: 0
Join Date: Sep 2012
Posts: 51
Received Thanks: 30
I was reviewing my own code and noticed Particle.cs was not done (almost empty). I cannot find my notes about Particle, but I did a small research and here is the result. It has been written in notepad++, so maybe there are some mistakes. At the moment, it only support the main PTCL format, not yet the PTCX or PTC3.

EDIT: Deciphered PTCX format. Now investigating PTC3 format. I will update this when done.


Particles PTCL parts are composed by:
-------------------------------
Name (text lenght + 4 bytes)
TextureName (text length + 4 bytes)
Row (4 bytes)
ParticlesCount (4 bytes)
FramesCount (4 bytes)
Frames (Variable size, as follow)
PTCL Frame:
---------------
count (4 bytes)
pos (count * 3 * 4 bytes)
age (count * 4 bytes)
size (count * 4 bytes)
matrix (4 * 4 * 4 bytes)


Particles PTCX parts are composed by:
-------------------------------
Name (text lenght + 4 bytes)
TextureName (text length + 4 bytes)
Row (4 bytes)
ParticlesCount (4 bytes)
FramesCount (4 bytes)
Frames (Variable size, as follow)
PTCX Frame:
---------------
count (4 bytes)
iB (count * 2 bytes)
pos (count * 3 * 4 bytes)
age (count * 4 bytes)
size (count * 4 bytes)
matrix (4 * 4 * 4 bytes)


Particles PTC3 parts are composed by:
-------------------------------
Name (text lenght + 4 bytes)
TextureName (text length + 4 bytes)
Row (4 bytes)
UndefinedYet (50 bytes)
ParticlesCount (4 bytes)
FramesCount (4 bytes)
Frames (Variable size, as follow)
PTC3 Frame (same as PTCX):
---------------
count (4 bytes)
iB (count * 2 bytes)
pos (count * 3 * 4 bytes)
age (count * 4 bytes)
size (count * 4 bytes)
matrix (4 * 4 * 4 bytes)


For UndefinedYet I can guess some of the value types:
1 short (2 bytes)
5 floats * 4 bytes = 20 bytes
1 unknown (0) * 4 bytes = 4 bytes
1 color (FFFFFFFF) * 4 bytes = 4 bytes
5 floats * 4 bytes = 20 bytes
Attached Files
File Type: zip Particle.cs.zip (1.6 KB, 29 views)
urgabel is offline  
Thanks
1 User
Old 05/26/2013, 22:20   #6
 
2slam's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 586
Received Thanks: 335
1 min please , what should that helpful for? could i create a garment with a c3 model? is that has a relation with designing? could i create a motion in my c3 or what ?
2slam is offline  
Old 05/26/2013, 22:50   #7


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,434
Received Thanks: 1,147
Quote:
Originally Posted by 2slam View Post
1 min please , what should that helpful for? could i create a garment with a c3 model? is that has a relation with designing? could i create a motion in my c3 or what ?
Well, with the C3 format. You can do a 3D model converter (to C3) and/or a plug-in for whatever 3D modeler app you use.
CptSky is offline  
Thanks
1 User
Old 05/26/2013, 23:38   #8
 
2slam's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 586
Received Thanks: 335
Quote:
Originally Posted by CptSky View Post
Well, with the C3 format. You can do a 3D model converter (to C3) and/or a plug-in for whatever 3D modeler app you use.
u mean if so creating a model in 3ds as an example simply convert it to a C3 with its fully motion and so? or making TQ's unique plugin for such things? there is a program around here called biturn which convert C3 to 3ds and other models even though 3Dmax has a plugin to export the file a s a c3 but the problem is how to apply motion on files ( say i've created an armor in 3dmax while exporting it to C3 and applying it in game i get if i wear a sculpture or a monument seems that the character is upside down feels like it doesn't obey the motion files in C3/0003/*** for C3 motion files in there ), hope i get some help here.
2slam is offline  
Old 05/26/2013, 23:42   #9
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
Quote:
Originally Posted by 2slam View Post
u mean if so creating a model in 3ds as an example simply convert it to a C3 with its fully motion and so? or making TQ's unique plugin for such things? there is a program around here called biturn which convert C3 to 3ds and other models even though 3Dmax has a plugin to export the file a s a c3 but the problem is how to apply motion on files ( say i've created an armor in 3dmax while exporting it to C3 and applying it in game i get if i wear a sculpture or a monument seems that the character is upside down feels like it doesn't obey the motion files in C3/0003/*** for C3 motion files in there ), hope i get some help here.


If used properly this code allows for ANY sort of conversion.


Possible uses of this code.


-Custom plugin for any and all modeling programs (3dsmax, maya, blender, etc) with full support for conquer files including custom animations
-Model viewer to preview items, characters and spells from outside the client
-Custom client from scratch using conquer (and all tq) art assets.


Here's a very basic model viewer I whipped up using this code while at work. It's nothing fancy and I didn't bother adding texturing but it all works nicely.
Attached Images
File Type: jpg Meshtastic1.jpg (29.7 KB, 89 views)
pro4never is offline  
Thanks
3 Users
Old 05/27/2013, 01:15   #10
 
2slam's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 586
Received Thanks: 335
Quote:
Originally Posted by pro4never View Post
If used properly this code allows for ANY sort of conversion.


Possible uses of this code.


-Custom plugin for any and all modeling programs (3dsmax, maya, blender, etc) with full support for conquer files including custom animations
-Model viewer to preview items, characters and spells from outside the client
-Custom client from scratch using conquer (and all tq) art assets.


Here's a very basic model viewer I whipped up using this code while at work. It's nothing fancy and I didn't bother adding texturing but it all works nicely.
hell yea , my only problem in designing is that i cant extract a monster with a c3 motion files smth like dat in mount/821/821000.c3 is the original model while other c3es are for motion , if sm1 could create such a plugin then you gotta got a new game even more better graphic with more boxes and polygons.
2slam is offline  
Reply


Similar Threads Similar Threads
Model viewer und model dateien finden und in cinema 4d importieren
09/20/2012 - Aion - 1 Replies
Hallo Ich würde gerne mir die Aion Models fuer ein anderes Game nehmen und diese in cinema 4d importieren. Bisher habe ich die .pak datei entpackt und in der dort entstandenen zip datei viele dateien gefunden. Nach suchen bin ich zur erkenntnis gekommen das ie .cgf dateien die model sind (richtig?) MNun weiss ich aber nicht wie ich mir diese anschauen kann und dann in cinema 4d importieren kann. gibt es dafuer irgendein tool?
about the 2012 new pets model files and the weapon model files!
09/19/2012 - SRO Private Server - 2 Replies
who can tell me how to add the new pets in silkroad?and who can tell me how te add the new weapons silkroad? who can share 2012 new pets model files?THANKS!!!
Model IDs
02/21/2007 - World of Warcraft - 1 Replies
Hallo! =) Kurze Frage: Wie finde ich die IDs von Modeln heraus?
New Model
12/28/2006 - World of Warcraft - 1 Replies
huhu wollte fragen ob mir jmd die datei geben kann um Mein Schwert Warlord Blade in ein
Model ID's
03/23/2006 - WoW Private Server - 5 Replies
Hi leute, wollt ma fragen ob hier wer die Model ID's der wichtigsten endis hat bzw. kennt, also ich meine Ony und Magma und so ! Weil ich würd mir gerne ma Magma als Mount machen, in den .spc und .tcp finde ich nichtmal den Namen Ony oder Magma THX schon mal ! Mfg.: Scholzebub text2schild.php?smilienummer=1&text=PLEASE HELP ^^ !!!' border='0' alt='PLEASE HELP ^^ !!!' />



All times are GMT +2. The time now is 01:37.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.