• Welcome to Twisted DIRT Forums.
 

Custom Objects for MVA - Release of SLTtoDXG converter

Started by mcm2boys, July 04, 2007, 04:38:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cR

On my PC I run XP and the convertor used to work (before I formatted and re-installed XP Pro) and on my laptop I run Vista. Both give the same error and running them as admin (wich it should do anyways?) doesn't have any effect.

ElDiablo (Paul)

That's all that I had...Laurie will have to be your savior now.
Sincerely,

Paul Valenti - Owner/Operator - Sound Advice
www.facebook.com/soundadvicekc

wakestyle21

First off thanks for the tool.

Ok now the problem I'm having is that when i place a .tga texture in with the slt it makes a dxm but not a dxt.
and since my multiex makes corrupt .pak's I can't put pak it manually...This all probably has to do with me being on Vista. Any help would be appriciated.

Thanks

mcm2boys

@wakestyle

I'm guessing that you have the 'Generate tex' options checked.. If so then the only reason i can think of is that the texture is not in a good TGA format, it needs to be either 24 or 32 bit, and the converter may have trouble with some PS (ver. 7 - i think maybe others) generated TGAs since they add some extra info at the beginning of the file which my TGA reading routines have trouble with..


@cR

ok we know the SLTs are ok since Paul and I can convert them, so the problem sounds like the setup of your machines. Do you have the helper (s2dhelp.dll) DLL installed in the same folder as the EXE?

Maybe it's file path to your SLTs (do they contain any weird characters - maybe spaces though that shouldn't make any difference), or the read/write permissions on the files/folders, they aren't in zip files (that appear as folders in Explorer) are they? Do you get any output after the read error in the conversion log screen? Finally, make sure no other progs are using the SLT files at the same time because the converter probably won't like that either..

Maybe a copy/paste of the error log might help..

wakestyle21

Im using photoshop 9. Does this version add extra data at the beginning?

Thanks

mcm2boys

Sorry i don't have PS9 so i don't know

if you want to send me the SLT and TGA i will give it try..


Laurie

cR

Quote from: mcm2boys on October 08, 2007, 06:39:28 AM
ok we know the SLTs are ok since Paul and I can convert them, so the problem sounds like the setup of your machines. Do you have the helper (s2dhelp.dll) DLL installed in the same folder as the EXE?

Maybe it's file path to your SLTs (do they contain any weird characters - maybe spaces though that shouldn't make any difference), or the read/write permissions on the files/folders, they aren't in zip files (that appear as folders in Explorer) are they? Do you get any output after the read error in the conversion log screen? Finally, make sure no other progs are using the SLT files at the same time because the converter probably won't like that either..

Maybe a copy/paste of the error log might help..

I tried multiple paths, most of them simple and without any special chars, the read/write permissions are ok and the files aren't in a zip. Everything gets converted/created except for the DXG.

QuoteReading SLT
Processing texture cR_Bale_ThorMX.tga
Created DXT format
Texture saved
Saved DXT file
Saved DXM file
There was a problem reading the SLT

Lib extract created

wakestyle21

Hey laurie I sent you the slt and tga files via email. Just wanted to check to make sure you got it.

Thanks for your help

mcm2boys

#48
hey wake

got them thanx, the problem is the tex's need to be a power of 2 pixels in size, ie 1x1, 2, 4, 8,16,32,64,128,256 etc they can be different but both sides must be one of these values.


cR

Sounds like you might have some line spaces in the SLT lines between the data lines or maybe there needs to be an extra Carriage Return at the end of the file.. Can't see much else could be a problem since it is obviously reading the texture info OK.. If you're still having trouble then i can convert the objects for you..

JvdL

I've started exporting all objects for my new track. Going through 3d Max 3.1 and using UniBastard.

I ecncountered a problem however. The Collision does not seem to work for them in MVA, but the collision DOES work in MCM2.
(I make sure that all SLT's made work in MCM2 before I convert them to MVA.)

So my guess is that something is going wrong with the .col file. Only I do not know where.

I tried as suggested in the help file to run the convertion without "optimize faces" checked. This did not help solve the poblem.

Any suggestions on how to make sure the rider has a headache when they smash my objects? *grin*

Thanks in advance!

John.

mcm2boys

There are a number of reasons why the collision might not work:

A broken COL file.

Have you added the LIB extract to your models.lib? Without that neither Editor will add collision since it tells them if it has collision and if so what the COL filename is.

You will need to place the PAK file (if you made one) created by Slt2Dxg in the Data folder for RBW's editor to find the files and in the media\CustomModels folder for UE2. If you are using individual files (which means you're using UE2) then you need all of the files for a model in the same folder, which should be Media\CustomModels or a sub-folder of that folder. (UE2 will only use 1 level of sub-folder in CustomModels).

If you use RBWs editor then the PAK will also need to be in the Data folder for the objects to show up (which i'm guessing they do) and the collision to work. If you use UE2 it will add all non-stock files to the PAK automatically - or it should - so the objects will show up and collision should work without cluttering your Data folder..


I guess the best place to start to check is take a look inside the PAK, (UE2|Files tab or MultiEx) and see if the COL files have been packed into the track. If so make sure the COL file paths are correct.

If all of that checks out then i guess you better send them to me and i'll take a look see..

Looks like right now, only the rider isn't getting a headache from these objects.  ;D

Laurie

JvdL

Woot! Rider gets a headache now! *cheers*

Seems I forgot to add the lib to the one the game uses. I only set the lib up for EU2. But it's all working now.

Thanks for the quick help!

John

PS, "Looks like right now, only the rider isn't getting a headache from these objects." This made me laugh pretty bad in real, good one! :P

mcm2boys

Glad to hear you got it working.

You confuse me a bit with the LIB stuff, i thought UE2 and RBWs Editor both use the same LIB, so how did you update for 1 and not the other.?

JvdL

EU2 reads the LIB in MX vs ATV Unleashed/media/CustomModels. Atleast, that is what you told me.

When I made a modified LIB for my objects and placed it in the CutsomModels folder. EU2 found the objects and adds them to the track. The only downside being, it can not relate the collision to them.

When I added my LIB code to the MX vs ATV Unleashed/media/Model.lib, it did relate the collision to the model after a repack through EU2.

As far as the RBW editor goes and custom objects. I do not know. I only use RBW for starting a project now, and continue building the track in EU2. So basicaly, I do not use the RBW editor anymore.


A question though. I use the seperated object files for EU2, so the unpacked object so to speak. EU2 writes all these files to the track.pak.
Will I still need to create a pak file for the custom objects in order to get it to work for other people too?

mcm2boys

#54
UE2 reads the model.lib file from the %MVA%\media folder not the %MVA%\media\custommodels folder, sorry if i said different, so it uses the same file the RBW editor uses.

If the dxg, dxt, dxm, col and pco files are in the PAK file then you don't need to create a PAK file for people to put in their Data folders, since all the files they need are in your track PAK already.

But because of the way MVA finds and uses models in the PAK files there is always the chance that someone elses model with the same name (a file name collision) will get picked up instead of yours..

This issue also brings up a load of other problems like file space - since every track that uses your objects will be packed with them in the PAK, the files are bigger than if you supply an object PAK with your track etc

Then if someone hasn't got the right object PAK it generates a lot forum traffic/email about why it doesn't work - crap track etc, etc..

If you want to give other people access to your objects to use in their own track designs then you need to supply them the LIB extract and the PAK file.


I'm happy to see you using UE2 for most of your track building you will need to go back to the RBW editor for the spline i think and it is probably a good idea to use their values for the minimap settings in the ATYFILE. I'd be interested to hear your feedback on using UE2 for such a big slice of the design process.

cR

Quote from: mcm2boys on October 13, 2007, 11:23:54 AM
Sounds like you might have some line spaces in the SLT lines between the data lines or maybe there needs to be an extra Carriage Return at the end of the file.. Can't see much else could be a problem since it is obviously reading the texture info OK.. If you're still having trouble then i can convert the objects for you..

I'm 100% sure the problem is not within the SLT files. I tried the ones that worked before I formatted, tried newly created ones and even tried some from mcmfactory and they all won't work (same error). Is there something that has to be updated? Like .NET framework or something?

mcm2boys


It doesn't use .NET but i'm running .NET 2.0 if that helps. I don't understand why it doesn't work, i guess the program files might be corrupt. I am sending you a copy of the program with some extra logging, give it a spin and see what th log says..

wakestyle21

Ok, I got my object working...Kinda

My object is a chain link fence with 3 parts: The vertical post(cylinder), the horizontal post(cylinder) and the

mesh(plane).


I can convert an slt of just the mesh without the posts and it works great in game. Same goes for the posts. They

work great in game without the mesh. The problem comes when I try to use the complete object.The slt converts and

no errors are shown in the log window, but when I try to place the object in the RBW editor it crashes as soon as i

click the viewport to place the object.


I've tried just about every different options combination with the converter and nothing works.


I'm new to this custom objects thing as I didn't mess with objects back in the mcm2 days. I'm sure i'm making some

stupid noob mistake but I am stuck so any help would be greatly appriciated.

A few things to note: I am running vista which obviously doesn't like this game too much. Also for some reason when

I make paks with multiex they don't work correctly so this might have something to do with that. I am letting the

slt converter make the paks for me though.


Laurie,

I have sent you a zip file with the files I have createdif you wanna take a look. There is an "Only Mesh" folder, an "Only Posts" folder and a

"Full Fence" folder...the first 2 work but the 3rd one doesn't

Thanks a lot.

One last thing, does anyone know what causes these vertial lines through my alpha?:






mcm2boys

first the textures, i found a bug in the texture conversion routines which i've now fixed and the new version is available from the link in the first post. Those lines you got are because you used white as the background color for the alpha parts and that found the bug in the tex conversion.


For the SLT conversion, i can get your model to work in game if i use your full model (mesh and posts) in UE2 to pack the track. However, like you when i try to place it in the RBW editor it crashed the editor. So this means RBW uses different code in the editor to the game, not a big surprise, but we need a work around to make it work in the editor. I found if I added another copy of the post tex to the materials list

[Materials]
NumberOfMaterials=3
[Material - 0]
TextureMap=fenceTex.tga
[Material - 1]
TextureMap=postTex.tga
[Material - 2]
TextureMap=postTex.tga


and the changed the line Material#= in the [LOD 0 - Surface 2] section as below it works in the editor.

Material#0=2
[LOD 0 - Surface 2 - Vertices]


You could avoid this by combining both the posts into a single object in ms3d before you export the SLT. It seems that the editor needs 1 texture per surface in the model otherwise it crashes.

Nice object BTW.. looks good in game too.

One final comment about collision, you might need to make a special object to use for creating the COL file that is double-sided, because the collision needs polies facing it (ie normal pointing in the direction of the contact) in order for collision to be detected. At the moment the fence only has collision from one side.

Laurie

wakestyle21

Thanks for the quick response, I'll try the new version for the texs and the workaround when I get home.

Also i did notice the collision is on one side only and I asked cR a while ago about it and he enlightened me. Just havn't got around to it yet.

Thanks again for all your help.