Jump to content


Photo

New W3D animations - some progress!


  • Please log in to reply
11 replies to this topic

#1 NDC

NDC
  • Members
  • 245 posts
  • Location:Misty Albion

Posted 14 February 2014 - 11:41 PM

Dear all,

Recently I've been able learn a bit about the structure of new .w3d animations - and I can now retreive first frame positions and rotations, and I have an idea of what compression algorithm was used in those files.
However, actual extraction of animation data (even with some knowledge of the algorithm employed) will be very taxing. What can expedite the whole process is the source code for max2w3d.dle (in particular, the file motion.cpp).
With this knowledge, I will be able to update the exporter in a couple of hours.

I am writing this message in case someone here has the code - please, PM me! The last .w3d nuisance may be dealt with very easily with your help!



#2 Mathijs

Mathijs

    Post-modern Shaman

  • Network Leaders
  • 13,758 posts
  • Projects:Age of the Ring
  • Division:Revora
  • Job:Leader

Posted 15 February 2014 - 01:41 AM

Any idea wherein this code might be found?


No fuel left for the pilgrims


#3 NDC

NDC
  • Members
  • 245 posts
  • Location:Misty Albion

Posted 16 February 2014 - 10:12 AM

Hi, Mathijs!

Apparently, those who made the original w3d importer had the access to the source code:

http://www.deezire.n...php/t-6212.html

 

Also, some people from the Renegade forums might have it as well:

http://www.renegadef...to=435775&rid=0

http://pastebin.com/f779d6c08

 

I tried to contact both Coolfile and Jonwil, but to no avail.


Edited by NDC, 16 February 2014 - 10:13 AM.


#4 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 16 February 2014 - 07:17 PM

I'm not sure how much that would help, but have you taken a look at C&C3? It uses W3X, an XML-based W3D format that might have a very similar structure (I suspect they just changed byte values to XML tags). Jonwil has developed and open-sourced some tools for it: http://cncguild.net/item-172?addview


revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#5 NDC

NDC
  • Members
  • 245 posts
  • Location:Misty Albion

Posted 16 February 2014 - 07:59 PM

Thank you, Phil!
I'll have a thorough look!

#6 Mathijs

Mathijs

    Post-modern Shaman

  • Network Leaders
  • 13,758 posts
  • Projects:Age of the Ring
  • Division:Revora
  • Job:Leader

Posted 16 February 2014 - 08:09 PM

Allow me to fiercely cross my fingers.


  • NDC likes this

No fuel left for the pilgrims


#7 NDC

NDC
  • Members
  • 245 posts
  • Location:Misty Albion

Posted 16 February 2014 - 09:26 PM

Thank you, Mathijs!
By the way, Phil, I couldn't find the source code for the .w3x decompiler - do you know where I can get it?

#8 Banshee

Banshee

    One Vision, One Purpose!

  • Network Admins
  • 9,048 posts
  • Location:Rio De Janeiro, RJ, Brazil.
  • Projects:PPM, PPM: Final Dawn, OS SHP Builder, OS Palette Editor, OS W3D Viewer, VXLSE III, etc...
  •  Retired Network Leader
  • Division:Revora
  • Job:Maintenance Admin

Posted 16 February 2014 - 09:55 PM

.w3x file is an XML file. It doesn't have anything to decompile.

 

However, these xml files are eventually encoded in order to be read by the game. In this case, the source code of the program that decodes it is located at:

http://www.cncmods.net/extras.php


  • NDC likes this
Project Perfect Mod

Command & Conquer Mods, Mods Support, Public Researchs, Map Archives, Tutorials, Tools, A Friendly Community and much more. Check it out now!

Posted Image

#9 NDC

NDC
  • Members
  • 245 posts
  • Location:Misty Albion

Posted 16 February 2014 - 11:03 PM

Thanks for the files, Banshee!
Oh, of course, XMLs are essentially just text files - I just meant to refer to the programme on Phil's list (I'm a silly programmer, but not a stupid one, hopefully)!

#10 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 17 February 2014 - 01:23 AM

You're right, it's not there. Neither in the binaries nor in the source code. At least you can look at w3x_file.h and maybe find some useful information.


revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#11 Goldtouch

Goldtouch

    title available

  • Hosted
  • 449 posts

Posted 17 February 2014 - 06:02 PM

I believe what you are looking for is the source of the w3d viewer.
http://downloads.sou...mirror=internap


Edited by THORONGlL, 17 February 2014 - 06:04 PM.


#12 NDC

NDC
  • Members
  • 245 posts
  • Location:Misty Albion

Posted 18 February 2014 - 12:33 AM

Phil, yes, I examined it, and it bore out my suspicions. They used the so-called adaptive delta compression method.
THORONGIL, thank you! I've tried to find some references to the adaptive delta thing in the code, but it seems that the algorithm was not deployed there (i.e. there are some constructs for adaptive delta animations, but no importing algorirhms).

Edited by NDC, 18 February 2014 - 12:38 AM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users