XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Sun Oct 22, 2017 12:43 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 55 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: Far Cry 3|4
PostPosted: Wed Dec 24, 2014 11:13 pm 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Sun Mar 20, 2011 7:35 pm
Posts: 212
Has thanked: 26 times
Have thanks: 48 times

Update: http://forum.xentax.com/viewtopic.php?p=101460#p101460

• Removed NumPy from the Maya importer - should improve compatibility
• Added rough support for Far Cry 2 and Avatar (FC2 still needs some work)
• Made a WIP importer for Softimage (no materials yet)
• Sat in a deck chair in my underwear in front of a black velvet painting of a sad crying clown in an iron lung and laughed hysterically for 10 minutes
• Made a WIP importer for Blender 2.73
• Kicked some Geese in the face
• Made a WIP importer for Lightwave
• Made a WIP importer for Noesis
• Made a very rough importer for Houdini (just imports a singe object, not too useful yet)

Maya is still the best of the lot, but Softimage is close behind.
I'll work on this junk again sometime in January.

You can make the ads go away by registering



Top
 Profile  
 
 Post subject: Re: Far Cry 3|4
PostPosted: Sat Feb 07, 2015 3:29 pm 
Offline
veteran
User avatar

Joined: Sat Jan 07, 2012 2:30 pm
Posts: 150
Has thanked: 53 times
Have thanks: 28 times
I am curious: is the issue for Pagan Min still there, or he can be imported correctly now?


Top
 Profile  
 
 Post subject: Re: Far Cry 3|4
PostPosted: Mon Feb 09, 2015 4:40 am 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Sun Mar 20, 2011 7:35 pm
Posts: 212
Has thanked: 26 times
Have thanks: 48 times
I just fixed a big problem with the materials.
I'll check that out next.
(Python indentation is going to be the death of me!)


Top
 Profile  
 
 Post subject: Re: Far Cry 3|4
PostPosted: Mon Feb 09, 2015 7:10 am 
Offline
mega-veteran
mega-veteran

Joined: Wed May 05, 2010 8:21 pm
Posts: 270
Location: Poland Głogów
Has thanked: 16 times
Have thanks: 514 times
......(Python indentation is going to be the death of me!)..........

My favorite text editor is Notepad++.
All scripts write in this editor.
I open script in Blender and Notepad++. When save script in notepad++, in Blender text window menu create red icon for reload a text.
And for python indentation select text block and use tab key or lshift+tab for transform this block.
Use always tab not space key.


Top
 Profile  
 
 Post subject: Re: Far Cry 3|4
PostPosted: Mon Feb 09, 2015 4:41 pm 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Sun Mar 20, 2011 7:35 pm
Posts: 212
Has thanked: 26 times
Have thanks: 48 times
Thanks Szkaradek.
I usually use Notepad++, but I still managed to mess up a block of code somehow.
I didn't even know about the text reload option in Blender. And I totally agree with the tab thing.
With the hap-hazard way I go about coding, spaces mess me up - I pretty much have to use tabs.

A bit off topic, but how much do you know about importing animation into Blender?
Models are no problem, but when I tried to import animation into Blender it wouldn't work for anything.
I tried every type of space transform I could think of.


Top
 Profile  
 
 Post subject: Re: Far Cry 3|4
PostPosted: Mon Feb 09, 2015 6:09 pm 
Offline
mega-veteran
mega-veteran

Joined: Wed May 05, 2010 8:21 pm
Posts: 270
Location: Poland Głogów
Has thanked: 16 times
Have thanks: 514 times
Code:
About animations:
I know we have 2 methods to get position of bone in every frame.
- method ARMATURESPACE - it is transform bone relative to skeleton
- method BONESPACE - it is tranform bone relative to bone parent

For transform bone we have:
- eulers and quaternions - for rotation
- vectors - for position
- matrices - rotation, position and scale in one math object



I use in most cases matrices 4x4. I try all convert to this matrices.
How convert:
posmatrix = convert vector to matrix4x4
rotmatrix = convert euler to matrix4x4 or convert quaternion to matrix
Blender use for quaternions: w,x,y,z  like  1,0,0,0
But when import quat from game we get for this case x,y,z,w : 0,0,0,1,
so we need convert gamequat to blenderquat (translate value w to first place)



I created 3 cases to get position for bone in each frame: (all code i got from actionLib.py from my importers)

1.when bone have only rotation transform:

   for n in range(len(actionbone.rotFrameList)): - list of all rotation frames for this bone
      frame=actionbone.rotFrameList[n] - get frame
      bonematrix=actionbone.rotKeyList[n] - get rotation matrix 4x4 for current frame
      if self.ARMATURESPACE is True: - method
         pbone.poseMatrix=bonematrix
         pbone.insertKey(skeleton, 1+frame,[Blender.Object.Pose.ROT],True) - insert key only for rotation
         pose.update() - this command i don't understand what is really make, sometimes animation works without this command
      if self.BONESPACE is True: - method
         if pbone.parent:      
            pbone.poseMatrix=bonematrix*pbone.parent.poseMatrix - multiply bone matrix and parent matrix, when bone has parent
         else:
            pbone.poseMatrix=bonematrix
         pbone.insertKey(skeleton, 1+frame,[Blender.Object.Pose.ROT],True)
         pose.update()


2.when bone have only position transform:

   for n in range(len(actionbone.posFrameList)):- list of all position frames for this bone
      frame=actionbone.posFrameList[n] - get frame
      bonematrix=actionbone.posKeyList[n] - get position matrix 4x4 for current frame
      if self.ARMATURESPACE is True:
         pbone.poseMatrix=bonematrix
         pbone.insertKey(skeleton, 1+frame,[Blender.Object.Pose.LOC],True)
         pose.update()
      if self.BONESPACE is True:
         if pbone.parent:      
            pbone.poseMatrix=bonematrix*pbone.parent.poseMatrix
         else:
            pbone.poseMatrix=bonematrix
         pbone.insertKey(skeleton, 1+frame,[Blender.Object.Pose.LOC],True) - insert key only for position
         pose.update()
         
3.when bone have rotation and position tranform:
   
                        
   for n in range(len(actionbone.matrixFrameList)): - list of all position frames for this bone
      frame=actionbone.matrixFrameList[n] - get frame
      bonematrix=actionbone.matrixKeyList[n]  - get matrix 4x4 (position rotation in one) for current frame
      if self.ARMATURESPACE is True:
         pbone.poseMatrix=skeleton.matrixWorld*bonematrix
         pbone.insertKey(skeleton, 1+frame,[Blender.Object.Pose.ROT,Blender.Object.Pose.LOC],True)
         pose.update()
      if self.BONESPACE is True:
         if pbone.parent:      
            pbone.poseMatrix=bonematrix*pbone.parent.poseMatrix - multiply bone matrix and parent matrix, when bone has parent
         else:
            pbone.poseMatrix=bonematrix
         pbone.insertKey(skeleton, 1+frame,\
            [Blender.Object.Pose.ROT,Blender.Object.Pose.LOC],True)
         pose.update()          

   
It was all for Blender 249.
i don't know how it make with new API in newest versions of Blender.
If you want i can help you with your animation.      



Top
 Profile  
 
 Post subject: Re: Far Cry 3|4
PostPosted: Thu Feb 12, 2015 2:50 am 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Sun Mar 20, 2011 7:35 pm
Posts: 212
Has thanked: 26 times
Have thanks: 48 times
I updated the Maya importer and link (first page, 2/3 of the way down).
There's a new file to place in Maya's Python site-packages folder so make sure to do that.
I fixed an issue with the materials and added support for all 4 uv maps.

And here's an updated list of Pagan Min parts to mix and match as you please.
Code:
BAF1E182F30E09AB.xbg            Hands and shirt
31BA411526EBAF49.xbg            Jacket
E947F48E7E55E0EA.xbg            Head
A78035D76C29FA64.xbg            Hair
D1D687FF151DD3B2.xbg            Pants
D95C21735F0C5BAE.xbg            Shoes
852F71E1617678EB.xbg            Snow_Suit (gloves and shirt)
56A922664B5382DF.xbg            Shirt and shoes (sleaves rolled up)
96FA3A27A323E65A.xbg            Fortress Statue


I still haven't been able to find the diffuse hair textures anywhere.
I even converted some of the DX10 textures trying to find it.
Image


Top
 Profile  
 
 Post subject: Re: Far Cry 3|4
PostPosted: Thu Feb 12, 2015 10:36 pm 
Offline
veteran
User avatar

Joined: Sat Jan 07, 2012 2:30 pm
Posts: 150
Has thanked: 53 times
Have thanks: 28 times
Thanks for fixing Pagan! About the hair diffuse, I think that maybe it could be ripped directly from the game, though I'm not completely sure about that.


Top
 Profile  
 
 Post subject: Re: Far Cry 3|4
PostPosted: Tue Mar 24, 2015 11:32 am 
Offline
veteran
User avatar

Joined: Sat Jan 07, 2012 2:30 pm
Posts: 150
Has thanked: 53 times
Have thanks: 28 times
Hey guys, I'm trying to load the script in Maya, but I keep getting this error:

Code:
# Error: line 1: ImportError: file <maya console> line 8: No module named numpy #


How can I fix this? Is something missing in my Python folder?


Top
 Profile  
 
 Post subject: Re: Far Cry 3|4
PostPosted: Tue Mar 24, 2015 8:01 pm 
Offline
double-veteran
double-veteran
User avatar

Joined: Fri Jul 08, 2011 12:06 pm
Posts: 927
Location: Torrance, CA
Has thanked: 9 times
Have thanks: 254 times
Yeah, seems like thedude used http://www.numpy.org/ maybe.


Top
 Profile  
 
 Post subject: Re: Far Cry 3|4
PostPosted: Thu Mar 26, 2015 11:53 pm 
Offline
veteran
User avatar

Joined: Sat Jan 07, 2012 2:30 pm
Posts: 150
Has thanked: 53 times
Have thanks: 28 times
How does it work exactly? Putting the numpy files in the python folder is not enough, so I'm not really sure how its installation works.


Top
 Profile  
 
 Post subject: Re: Far Cry 3|4
PostPosted: Fri Mar 27, 2015 12:11 am 
Offline
double-veteran
double-veteran
User avatar

Joined: Fri Jul 08, 2011 12:06 pm
Posts: 927
Location: Torrance, CA
Has thanked: 9 times
Have thanks: 254 times
what file did you download? this one?

http://sourceforge.net/projects/numpy/files/NumPy/

Download the superpack installer 2.7 in version 1.92 folder. It will require python 2.7 installed on your system.


Top
 Profile  
 
 Post subject: Re: Far Cry 3|4
PostPosted: Fri Mar 27, 2015 1:01 am 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Sun Mar 20, 2011 7:35 pm
Posts: 212
Has thanked: 26 times
Have thanks: 48 times
I think I took it out to decrease the file size of the archive. Then I was going to upload it separately and post the link,but I guess I forgot. ٩◔̯◔۶
https://app.box.com/s/jfh8lcrq5vg4odp5yl4x03w4crlyuvlx


Top
 Profile  
 
 Post subject: Re: Far Cry 3|4
PostPosted: Fri Mar 27, 2015 9:50 am 
Offline
veteran
User avatar

Joined: Sat Jan 07, 2012 2:30 pm
Posts: 150
Has thanked: 53 times
Have thanks: 28 times
Ah so that was my problem: I apparently had tried to install a wrong version for Numpy. Thank you both, the one posted by TheDude seems to work perfectly now.

The only issue now is that I still can't get Pagan's eyebrows... I got the latest script, so I don't really know why that happens.


Top
 Profile  
 
 Post subject: Re: Far Cry 3|4
PostPosted: Sun Mar 29, 2015 12:19 am 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Sun Mar 20, 2011 7:35 pm
Posts: 212
Has thanked: 26 times
Have thanks: 48 times
I don't know how I managed to leave this out of the list, but the model of Min's face with his eyebrows is 9C44E182FDE38402.xbg.

Also grepWin is what I use to find specific models. http://stefanstools.sourceforge.net/grepWin.html
..just throwing that out there



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 55 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: Tydeus and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group