Important information: this site is currently scheduled to go offline indefinitely by end of the year.

[PC] Devil May Cry 4

The Original Forum. Game archives, full of resources. How to open them? Get help here.
User avatar
Tosyk
double-veteran
double-veteran
Posts: 1027
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 269 times
Been thanked: 154 times
Contact:

Re: [PC] Devil May Cry 4

Post by Tosyk »

Dtmech wrote:Yes i know i know , i already did it with Lost planet and Re5 , but DMC4 doesn't give me the .ms file , it just closes and that's it i don't get anything.
Try to do it with other files, perhaps unpacking archives was not entirely successful. See it all Do you have files with extensions. When I unpacked my archives, I have all the files have no extension and I now have to rename every file manually. Try just mod2max copy the files in the folder, then run mod2max, inscribe the name of the file and press Enter (ie, not via drag-and-drop).
Thank you for all you do here
my blog | my forum
Dtmech
ultra-n00b
Posts: 8
Joined: Mon Dec 14, 2009 1:32 pm

Re: [PC] Devil May Cry 4

Post by Dtmech »

Tosyk wrote:
Dtmech wrote:Yes i know i know , i already did it with Lost planet and Re5 , but DMC4 doesn't give me the .ms file , it just closes and that's it i don't get anything.
Try to do it with other files, perhaps unpacking archives was not entirely successful. See it all Do you have files with extensions. When I unpacked my archives, I have all the files have no extension and I now have to rename every file manually. Try just mod2max copy the files in the folder, then run mod2max, inscribe the name of the file and press Enter (ie, not via drag-and-drop).

Didn't work. :/

The archives i need to extract are in nativepc/rom/enemy/ ?
User avatar
Tosyk
double-veteran
double-veteran
Posts: 1027
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 269 times
Been thanked: 154 times
Contact:

Re: [PC] Devil May Cry 4

Post by Tosyk »

Dtmech wrote:
Tosyk wrote:
Dtmech wrote:Yes i know i know , i already did it with Lost planet and Re5 , but DMC4 doesn't give me the .ms file , it just closes and that's it i don't get anything.
Try to do it with other files, perhaps unpacking archives was not entirely successful. See it all Do you have files with extensions. When I unpacked my archives, I have all the files have no extension and I now have to rename every file manually. Try just mod2max copy the files in the folder, then run mod2max, inscribe the name of the file and press Enter (ie, not via drag-and-drop).

Didn't work. :/

The archives i need to extract are in nativepc/rom/enemy/ ?
I can not say for sure right now. Put my file model and my copy mod2max. I just tried - everything works fine.

ps: it seems the files with the models should be in the directory \ demo, at least, with the main characters
You do not have the required permissions to view the files attached to this post.
Thank you for all you do here
my blog | my forum
Dtmech
ultra-n00b
Posts: 8
Joined: Mon Dec 14, 2009 1:32 pm

Re: [PC] Devil May Cry 4

Post by Dtmech »

Tosyk wrote:
Dtmech wrote:
Tosyk wrote:Try to do it with other files, perhaps unpacking archives was not entirely successful. See it all Do you have files with extensions. When I unpacked my archives, I have all the files have no extension and I now have to rename every file manually. Try just mod2max copy the files in the folder, then run mod2max, inscribe the name of the file and press Enter (ie, not via drag-and-drop).

Didn't work. :/

The archives i need to extract are in nativepc/rom/enemy/ ?
I can not say for sure right now. Put my file model and my copy mod2max. I just tried - everything works fine.

ps: it seems the files with the models should be in the directory \ demo, at least, with the main characters

Well your file works fine , but my files , just don't , what did you exactly do when you extracted the arc files?
User avatar
Tosyk
double-veteran
double-veteran
Posts: 1027
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 269 times
Been thanked: 154 times
Contact:

Re: [PC] Devil May Cry 4

Post by Tosyk »

Dtmech wrote:Well your file works fine , but my files , just don't , what did you exactly do when you extracted the arc files?
I do not remember exactly how extract archives, it has been a long time, at least in the past year. :) Try Dmc4Extract or RE5ArcTool v095. But I did not do anything unusual, the same thing as everyone else.
Thank you for all you do here
my blog | my forum
Dtmech
ultra-n00b
Posts: 8
Joined: Mon Dec 14, 2009 1:32 pm

Re: [PC] Devil May Cry 4

Post by Dtmech »

Tosyk wrote:
Dtmech wrote:Well your file works fine , but my files , just don't , what did you exactly do when you extracted the arc files?
I do not remember exactly how extract archives, it has been a long time, at least in the past year. :) Try Dmc4Extract or RE5ArcTool v095. But I did not do anything unusual, the same thing as everyone else.
Maybe you can send the two extraction tools over a pm?
User avatar
Tosyk
double-veteran
double-veteran
Posts: 1027
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 269 times
Been thanked: 154 times
Contact:

Re: [PC] Devil May Cry 4

Post by Tosyk »

Dtmech wrote:
Tosyk wrote:
Dtmech wrote:Well your file works fine , but my files , just don't , what did you exactly do when you extracted the arc files?
I do not remember exactly how extract archives, it has been a long time, at least in the past year. :) Try Dmc4Extract or RE5ArcTool v095. But I did not do anything unusual, the same thing as everyone else.
Maybe you can send the two extraction tools over a pm?
For some reason I have in the program archive virus appears :[ , not only were infected mod2max and dmc4tex :oops: , I have not used them for a month, as the games that are already extracted and waiting in the wings. So send them not see the point. However, you can find the same tools in this topic.
Thank you for all you do here
my blog | my forum
User avatar
ddt
ultra-n00b
Posts: 3
Joined: Sat Jan 09, 2010 1:22 pm

Re: [PC] Devil May Cry 4

Post by ddt »

2 Surveyor .
sorry, I'm a new one.
I 'd recomply ( also modifyed ) your code Dmc4ModelScr.
and I simply use:
LPVDEC VDecBIO5=0;
D3DVERTEXELEMENT9 DecBIO5[] = {
{ 0, 0, D3DDECLTYPE_SHORT4N, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0 },
{ 0, 8, D3DDECLTYPE_UBYTE4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BLENDINDICES, 0 },
{ 0, 12, D3DDECLTYPE_UBYTE4N, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BLENDWEIGHT, 0 },
{ 0, 16, D3DDECLTYPE_UBYTE4N, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0 },
{ 0, 20, D3DDECLTYPE_UBYTE4N, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TANGENT, 0 },
{ 0, 24, D3DDECLTYPE_FLOAT16_2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0 },
{ 0, 28, D3DDECLTYPE_FLOAT16_2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 1 },
{ 255, 0, D3DDECLTYPE_UNUSED, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0 },
};
to Create the Vertex Declaration.
and get the result below.
It look crazy, the UV coord seens like single dimenstion.
and I don't understand why.

the code here:

void CMOD::Draw(LPDEV pDev)
{
qVDec(VDecBIO5);
cObject* p = m.pObject;
_for( a, 0, m.ObjectNum )
{
int id = m.pMaterial[ p->MatId ].Layer0 - 1;
if( id >= 0 )
qTEX(0, TX[id]);

qDrawIdxUP( triangle_strip, m.VertexNum, p->Count, m.pIndex+p->Start, (byte*)(m.pVertex) + p->Base1, 32 );
p++;
}
}

btw, the OBJ format output, I see this:
for(unsigned int a = 0; a < m_uiVertexNum; a++)
fprintf(pFile, "vt %f %f %f\n", pUF[a], 1.0f - pVF[a], 0.5f);
UV coord why is 3 member, what dose 3rd member ( .5f ) means?
You do not have the required permissions to view the files attached to this post.
shadowmoy
veteran
Posts: 153
Joined: Sat Feb 21, 2009 2:29 pm
Has thanked: 19 times
Been thanked: 43 times

Re: [PC] Devil May Cry 4

Post by shadowmoy »

0.5f is the W component but can be skipped also reread the surveyor source code to see that re5 models have 2 uv layers to be able to fix yourmodel viewer....
_-=<(¯`·._.·[ CodeMan ]·._.·´¯)>=-_
User avatar
ddt
ultra-n00b
Posts: 3
Joined: Sat Jan 09, 2010 1:22 pm

Re: [PC] Devil May Cry 4

Post by ddt »

Thanks shadowmoy.
I'd completely reread the code. (stupid)
and now it's work.

btw
struct cObject
{
u16 Id;
u16 MatId;
byte Flag[16];
uint Base1; //this member seens like the offset when
//the game call SetStreamSource's 3rd parameter
uint Zero;
uint Start;
uint Count;
uint Base;
uint Inconnu[3];
};
and also found that the game
just simply Create VertexBuffer and copy
whole pVertex's buffer
You do not have the required permissions to view the files attached to this post.
firsak
advanced
Posts: 64
Joined: Wed Dec 16, 2009 12:32 pm
Location: Russia
Has thanked: 20 times
Been thanked: 11 times
Contact:

Re: [PC] Devil May Cry 4

Post by firsak »

About joining meshes each having its own skin modifier.

I have found this script that joins meshes with different skin modifiers. I tested it and it works perfectly... as long as the meshes do not share the same bones. If vertices on different objects share the same bone, the bone weights of those vertices are lost. Can anyone improve this script?
Here it is:

Code: Select all

macroscript mergeSkinObjects
category:"AndreyK"
(
fn fnMergeSkinObjects objectsList refFrame =
(
ObjSkinVertices = #()
bonesList = #()

struct sSkinVertex (bonesCount,bonesID,bonesWeight)

--1
setCommandPanelTaskMode #modify

bonesOffset = 0
for obj in objectsList do
(
select obj

skinMod = undefined
for i=1 to obj.modifiers.count do
(
if (classof obj.modifiers[i] == Skin) do skinMod = obj.modifiers[i]
)

if(skinMod != undefined) then
(
--modPanel.setCurrentObject skinMod
vertices_count = skinOps.GetNumberVertices skinMod

for i = 1 to vertices_count do
(
newSkinVertex = sSkinVertex 0 #() #()
newSkinVertex.bonesCount = skinOps.getVertexWeightCount skinMod i
for j = 1 to newSkinVertex.bonesCount do
(
Append newSkinVertex.bonesID ((skinOps.getVertexWeightBoneID skinMod i j)+bonesOffset)
Append newSkinVertex.bonesWeight ( skinOps.getVertexWeight skinMod i j )
)
append ObjSkinVertices newSkinVertex
)

bones_count = skinOps.GetNumberBones skinMod
bonesOffset += bones_count

for i = 1 to bones_count do
(
appendifunique bonesList (skinOps.GetBoneName skinMod i 0)
)
)-- if(skinMod != undefined)
else deleteItem objectsList (findItem objectsList obj)
)--for obj in objectsList

--2
at time refFrame
(
skinobj = box prefix:"skinobj_"
convertto skinobj editable_poly
polyop.deleteVerts skinobj #{1..8}

for newElement in objectsList do
(
polyop.attach skinobj newElement
)

--3
skinMod = skin()
addModifier skinobj skinMod
skinMod.bone_limit = 4 --todo - find maximum bone_limit in all objects
skinMod.weightAllVertices = false

select skinobj
setCommandPanelTaskMode #modify
--modPanel.setCurrentObject skinMod


for BoneName in BonesList do
(
skinOps.addbone skinMod (GetNodeByName(BoneName)) 1
)

skinOps.Invalidate skinMod 0

skinOps.SelectBone skinMod 1

--4
vertices_count = skinOps.GetNumberVertices skinMod

for i = 1 to vertices_count do
(
skinOps.SetVertexWeights skinMod i ObjSkinVertices[i].bonesID[1] 1
skinOps.SetVertexWeights skinMod i ObjSkinVertices[i].bonesID ObjSkinVertices[i].bonesWeight
)
)--at time refFrame
)--fn fnMergeSkinObjects

on execute do
(
objectsList = selection as array

if(objectsList.count>0) do
try
(
fnMergeSkinObjects objectsList 0
)
catch()
)
)--macroscript 
Save it as *.mcr, put it into \ui\macroscripts. Now create a toolbar with the button (category AndreyK -> mergeSkinObjects). Select multiple objects with skin modifiers, press the button to merge those objects.

I know, there is an SMD plugin solution, but it is more like a workaround. And it has its drawbacks. Is anyone here good at MaxScript willing to improve this script?
User avatar
ddt
ultra-n00b
Posts: 3
Joined: Sat Jan 09, 2010 1:22 pm

Re: [PC] Devil May Cry 4

Post by ddt »

Today learn effect.
I fool again.
Is there someone help me!
what is going on in the effect file ?
sampler s0 : register(s0);

#if 1
row_major float3x4 mJoint[32];
#else
float3x4 mJoint[32];
#endif

float4x4 mPV;
float4x4 mW;

void vs(
float3 ipos :POSITION,
float2 itex :TEXCOORD0,
float2 itex1 :TEXCOORD1,
float4 weight : BLENDWEIGHT0,
float4 bone : BLENDINDICES0,
out float4 opos :POSITION,
out float2 tex :TEXCOORD0,
out float2 tex1 :TEXCOORD1)
{
float3 pos = 0;
if( 1 )
{
pos = mul( ipos, mJoint[ bone.x ] )*weight.x + mul( ipos, mJoint[ bone.y ] )*weight.y;
if( weight.z ) pos += mul( ipos, mJoint[ bone.z ] )*weight.z + mul( ipos, mJoint[ bone.w ] )*weight.w;
}
else
{
pos = mul( mJoint[ bone.x ], ipos )*weight.x + mul( mJoint[ bone.y ], ipos )*weight.y;
if( weight.z ) pos += mul( mJoint[ bone.z ], ipos )*weight.z + mul( mJoint[ bone.w ], ipos )*weight.w;
}

opos = mul( float4(pos, 1), mW );
opos = mul( opos, mPV );
tex = itex;
tex1 = itex1;
}

float4 ps( float2 t0 : TEXCOORD0, float2 t1 : TEXCOORD1 ):COLOR0
{
float u = ( t1.x < 0 ) ? t0.x : t1.x;
float v = ( t1.y < 0 ) ? t0.y : t1.y;
return float4( tex2D( s0, float2( u, v ) ).xyz, 1 );
}

technique Bio5{
pass P0{
vertexShader = compile vs_2_0 vs();
pixelShader = compile ps_2_0 ps();
}
}

I'm so sure I'd pass the right BoneMatrix(m3x4) data,
and call peff->CommitChanges();
just don't know what the diffent between:
"row_major float3x4" and "float3x4" ?
how to calc then with "mul"
You do not have the required permissions to view the files attached to this post.
rogueclarkey
ultra-n00b
Posts: 6
Joined: Tue Jul 22, 2008 4:01 pm
Has thanked: 3 times
Been thanked: 5 times

Re: [PC] Devil May Cry 4

Post by rogueclarkey »

Hi All,

A quick nod to all the work previous work done by others in this thread. Great work :)

I'm trying to make sense of some anomalies I'm coming across in the face data when I'm looking at the dante model data.
(model\game\pl006\pl006.mod)

The code I've written is based on the Dmc4Model source posted on this forum. Cheers Surveyor.

From previous posts in the cObject class:

usFlag[6] - start Vertex index
usFlag[5] - end Vertex index
usFlag[4] - vertexCount

uiCount - number of tris in the triangle strip

For the very first object in pl006.mod, uiCount = 4 so there should be 6 indices for this triangle strip. This seems to tie up correctly because uiStart for the second object is 6.

If I print out the above fields and all the indices within that strip I get the following:
  • Object 0: usFlag[6]: 0 usFlag[5]: 2 usFlag[4]: 3
    uiCount+2: 6 // number of indices
    0: 0
    1: 1
    2: 2
    3: 2
    4: 2
    5: 3
I'm a little confused if the usFlag[6] is 0 and usFlag[5] is 2, why the last index that makes up the triangle strip is 3. i.e. A number outside this range.

I think I must be misinterpreting something and I hope someone with a bit more familiarity with the format might be able to shed some light on this.
onionhead
beginner
Posts: 37
Joined: Tue Oct 27, 2009 3:02 am
Has thanked: 8 times
Been thanked: 1 time

Re: [PC] Devil May Cry 4

Post by onionhead »

can dantes office be extracted thru the extractor provided? or do i have to extract the models seperately and put them back togehter in max?
oBadboyo
ultra-n00b
Posts: 1
Joined: Fri Mar 12, 2010 6:32 am

Re: [PC] Devil May Cry 4

Post by oBadboyo »

can you tell me what exactly i need to do to import RE5 model.
I imported the ms then exported to smd ( should i delete the low LOD ?)
open the smd with notepad, replace all the \ with /, still error when importing.
And BTW, why the model is so blocky with useless line +part, and when i give the meshsmooth it appear sort of not smooth at all. Mod2obj import it smoothly but sadly no bone :(
Post Reply