Jump to content

Crimson Skies: High Road to Revenge (DirectX *.x)


Recommended Posts

  • Engineer
1 hour ago, h3x3r said:

Problem is that uv are converted to float and rapi.rpgBindUV1Buffer function requires specified data type to work and refuse use of vtbuf.

I remember having had a similar problem with Noesis, years ago. I converted/copied the data into a temp buffer but don't remember, how. (Based on an example from MrAdults, swapping from big to litttle endian, but not sure.)

It's one of the reasons why I've swapped to plain "C" where I'm totally free (using pointers for example) .

Link to comment
Share on other sites

  • Engineer
23 minutes ago, notameowcelot said:

Might Noesis be out of the question for pulling off .x conversions then?

No - I guess Durik could solve the buffer problem.

Quote

If there's a better alternative (like the .bt stuff h3x3r did before) I'm happy to go with that

Since 010 editor isn't free, afaik, I didn't use it. But I was thinking about converting bt code to "C" code, sooner or later...

Link to comment
Share on other sites

  • Engineer
Posted (edited)
5 hours ago, shak-otay said:

Since 010 editor isn't free, afaik, I didn't use it. But I was thinking about converting bt code to "C" code, sooner or later...

Don't bother. The code is wrong. I must rewrite it.

EDiT. Here's updated version of template. Still fail at the end. It doesn't parse last file. It's just boundig box collison mesh.

 

crismossky_x.7z

Edited by h3x3r
Link to comment
Share on other sites

Posted (edited)
8 hours ago, h3x3r said:

Don't bother. The code is wrong. I must rewrite it.

EDiT. Here's updated version of template. Still fail at the end. It doesn't parse last file. It's just boundig box collison mesh.

 

crismossky_x.7z 7.5 kB · 1 download

does the BT still require maya for matrices and such? or can I use it fine in Blender now? testing it and it seems like it's more or less the same as it was before

Edited by notameowcelot
Link to comment
Share on other sites

  • Engineer
Posted (edited)

I mean in any 3d software which support it. In maya there is transfer function which can transfer uv set from mesh to another.

trans.jpg

First select mesh you want to copy from and then select mesh you want to paste.

Edited by h3x3r
Link to comment
Share on other sites

Just now, h3x3r said:

I mean in any 3d software which support it. In maya there is transfer function which can transfer uv set from mesh to another.

Oh shit, good point. Seems a bit time consuming, but I'll check and see if I can do that in the meantime with Blender.

Link to comment
Share on other sites

Posted (edited)

Gave UV transfer a shot (using devastator_fusalage.x due to less amount of submeshes). Left is Durik's, right is the BT. Transferring with topology mapping - the others look worse or don't work.

ga3aQH7.png

 

I noticed that the BT is mirrored for some odd reason - Durik's I do know is accurate geo wise, so I'm not sure if that's what would be causing the issue with UV transferring. Even when manually mirrored it still causes the issue.

pGp9dGo.png

 

 

Edited by notameowcelot
Link to comment
Share on other sites

Just now, h3x3r said:

Unfortunately i doesn't provide 2 or 3 clicks solutions🤣. I like playing with data.

All good lol - just gonna keep experimenting and see if I can get data transfer to work or not 🙂 

Link to comment
Share on other sites

  • Engineer
Posted (edited)

Try to edit this line >

struct {
	FSkip(16);
	int16 U,V; // Change it to uint16
	FSkip(12);
	Printf("vt %f %f\n",U*UVScaleFactor,-V*UVScaleFactor);
}VectorBuffer[VtxCount]<optimize=false>;

Oh you mean geometry?

Edited by h3x3r
Link to comment
Share on other sites

4 minutes ago, h3x3r said:

Try to edit this line >

struct {
	FSkip(16);
	int16 U,V; // Change it to uint16
	FSkip(12);
	Printf("vt %f %f\n",U*UVScaleFactor,-V*UVScaleFactor);
}VectorBuffer[VtxCount]<optimize=false>;

 

Done! Didn't notice any significant changes to the model once I reimported, at least.

In the meantime managed to get it much closer after tweaking a few data transfer settings. Still a bunch of random spots with broken or stretched UVs but looks a lot closer at a glance.

2oy9bzz.png

Link to comment
Share on other sites

  • Engineer

Well i fixed the mirror issue.

Replace these 2 structs.

typedef struct
{
    float X;
    float Y;
    float Z;
    Printf("v %f %f %f\n",-X,Y,Z);
} Vec3PosFloat;

typedef struct
{
    uint16 F1;
    uint16 F2;
    uint16 F3;
    Printf("f %u/%u %u/%u %u/%u\n", F3+1,F3+1,F2+1,F2+1,F1+1,F1+1);
} IndicesInt16;

 

Link to comment
Share on other sites

Posted (edited)
20 minutes ago, h3x3r said:

Well i fixed the mirror issue.

Replace these 2 structs.

typedef struct
{
    float X;
    float Y;
    float Z;
    Printf("v %f %f %f\n",-X,Y,Z);
} Vec3PosFloat;

typedef struct
{
    uint16 F1;
    uint16 F2;
    uint16 F3;
    Printf("f %u/%u %u/%u %u/%u\n", F3+1,F3+1,F2+1,F2+1,F1+1,F1+1);
} IndicesInt16;

 

qpqE89F.png

Yup, that works! It also fixed the topology mapping - no more UV issues from what I can see!

Isx60Oh.png

I could use this to set up smaller or single mesh models in the meantime - the method wouldn't be too feasible for full plane models and the like due to the amount of submeshes that are present, so would have to find a way to automate it for those if I wanted to go that far. (also doesn't work with meshes that are meant to be affected by matrices but that's a separate issue to sort out I'd think)

Edited by notameowcelot
Link to comment
Share on other sites

  • Engineer
Posted (edited)

Yep. Second uv set. BTW i just noticed when you use uint16 U,V; in VectorBuffer the uv are fucked up. So use int16 U,V.

Thing is that uint16 doesn't have nagative value.

uvset.jpg

If you want output second uv set just edit these lines in VectorBuffer.

FSkip(16); > FSkip(20);
int16 U,V; > leave
FSkip(12); > FSkip(8);

I would like to include it in export but thing is that *.obj file doesn't support more than one uv set.

Edited by h3x3r
  • Like 1
Link to comment
Share on other sites

Posted (edited)

been a bit, I've been using the workaround for UVs, though I have noticed despite this UVs can still look pretty wonky like on the Pandora where it had stretched bits - @Durik256i'm sorry I'm pinging you so much in this thread but really hoping you might know something to help us figure out making the UVs work on Noesis

 

i've noticed also that meshes don't seem to have skin/weight info for bones in the noesis script - how would I go about getting that?

Edited by notameowcelot
Link to comment
Share on other sites

  • Engineer
12 hours ago, notameowcelot said:

making the UVs work on Noesis

Hello. I haven't been following this topic. post it again (files model, texture). screenshot of what the current uv is and what it should be. structure where uvScale is located. I'll look into it then.)

  • Like 1
Link to comment
Share on other sites

38 minutes ago, Durik256 said:

Hello. I haven't been following this topic. post it again (files model, texture). screenshot of what the current uv is and what it should be. structure where uvScale is located. I'll look into it then.)

  i'll attach a few samples, one sec!

On 4/25/2024 at 8:33 PM, notameowcelot said:

 

YWzwy5h.pngingame

 

PGVmYZc.pngBlender

Z3p0vDV.pngUV sheet, scaled roughly

 

that's the Pandora's textures as they currently are in the plugin - note that 'Blender' is already scaled up by me manually, the textures around the middle part of the bridge are stretched

i'm hoping just the Devastator model will suffice for you, so here's them attached - obj-uv is h3x3r's bt which includes proper uv scaling, but has broken meshes (and also doesn't support multiple UV sets which is needed) - i've already got a preconverted fbx in there from your noesis plugin as well, plus a few extra models from the pf devastator bin - hope these all help!

 

https://zippyshare.day/2UwSr2fuQ4ZyZbW/file

some quick sample images to show current uvs and how they should be:

 

h5PxkTy.pngcurrent

J9AJPKl.pnghow it should be

 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...