[Almost there] Exporting Mass Effect 3 maps to Source

So by today i have a working tool that allows me to export Mass Effect 3 maps into UDK, Unreal Engine 4 and 3ds max (via maxscript) with 99% accuracy.

Here is Citadel Docks from one of the story missions, ingame

http://i.imgur.com/XdouXGD.jpg[/thumb]
And being recreated in Unreal Engine 4.
[thumb]http://i.imgur.com/Y0OL24K.jpg

I know how unreal engine works much better than Source (which i don’t know entirely), so i will describe the whole process and hopefully you can tell me if it is possible to recreate such process for SFM

Here is how it works

  1. I use modified ME3Explorer to export map into a .t3d format. This is basically a text file that holds no geometry information or material exture information. It only holds basic properties of a static meshes on a level (model name; position; rotation; scale)
  2. Inside Unreal Engine 4 i import static meshes from that level package and sett materials.
  3. Only then i import .t3d file and the engine assembles the level from those static meshes.
  4. Viola! The level now looks 99% identical to ngame original!

So my question is - is it possible to recreate such process for Source Engine?

The .t3d sample and .max sample is right here, they could probobly tell you more about the nature of the process than my poor english

max sample



-------------------------------------------------------
-------------------------------------------------------
CeilingBrace_1x6_2988 = copy $CeilingBrace_1x6
CeilingBrace_1x6_2988.name = "CeilingBrace_1x6_2988" --name the copy as"CeilingBrace_1x6_2988"
$CeilingBrace_1x6_2988.Position=[2100.000, 4900.000, 19900.000]
$CeilingBrace_1x6_2988.scale=[-1.000, 1.000, 1.000]
--Setting the rotation
fn SetObjectRotation obj rx ry rz =
(
-- Reset the object's transformation matrix so that
-- it only includes position and scale information.
-- Doing this clears out any previous object rotation.
local translateMat = transMatrix obj.transform.pos
local scaleMat = scaleMatrix obj.transform.scale
obj.transform = scaleMat * translateMat
-- Perform each axis rotation individually
rotate obj (angleaxis rx [1,0,0])
rotate obj (angleaxis ry [0,1,0])
rotate obj (angleaxis rz [0,0,1])
)
-- Set currently selected Object's rotation to 0.000 0.000 -90.003
SetObjectRotation $CeilingBrace_1x6_2988 0.000 0.000 -90.003
-------------------------------------------------------
-------------------------------------------------------


UE4 .t3d sample



Begin Map Name=/Game/Maps/ME3_Exported
   Begin Level NAME=PersistentLevel
      Begin Actor Class=StaticMeshActor Name=StaticMeshActor_2600 Archetype=StaticMeshActor'/Script/Engine.Default__StaticMeshActor'
        Begin Object Class=StaticMeshComponent Name="StaticMeshComponent0" Archetype=StaticMeshComponent'/Script/Engine.Default__StaticMeshActor:StaticMeshComponent0'
        End Object
        Begin Object Name="StaticMeshComponent0"
            StaticMesh=StaticMesh'/Game/ME3_Mod/Maps/Crate01_M.Crate01_M'
            RelativeLocation=(X=4650.906,Y=-411.781,Z=19250.370
            RelativeRotation=(Pitch=0.000,Yaw=148.897,Roll=0.000)
            RelativeScale3D=(X=1.000,Y=1.000,Z=1.000)
        End Object
        StaticMeshComponent=StaticMeshComponent0
        ActorLabel="StaticMeshActor_2600"
End Actor
End Level
Begin Surface
End Surface
End Map


It’s not ideal, since you’re still largely building via static meshes rather than BSP for the majority of things. But getting the mesh to source shouldn’t be such a huge issue with wallworm from max.

You should recreate in Brushes everything that is even remotely blocky, chop the meshes into pieces to fit around them as possible.

That’s really interesting. Did you add the t3d exporting yourself or can that be done in current public builds of me3explorer?

I added it myself, public build doesn’t have a capability to export into .t3d.

I take it Source engine have a problem with large amounts of static meshes? All ME3’s levels is mostly a static meshes.

All levels in modern games are static meshes.
The problem with source is that it uses a very archaic BSP format, meaning maps are mostly made of brushes rather than meshes.
Furthermore, source vertex lighting is rather poor, and somewhat unreliable.

If you configure it right, it can be… acceptable. I merged multiple objects together into a larger scale model with my enviorments when I made my vault 81 port map. Takes forever to map brushes as collision replacements for the models themselves.

I’ve actually come up with a way to bake lightmaps onto static meshes, however it’s pretty hacky at the moment and probably doesn’t run well.

I am REAALLY interested in this.

I have earlier written tools to convert all of the models and materials in Unreal Engine games to Source automatically. Granted, it’s a really lazy port and doesn’t do any fancy shader materials, but basically is just a raw conversion of diffuses and bumpmaps, as spat out by Gildor’s UModel.

When you say the .max sample, what exactly is that? Do you already have a tool that can take that .t3d and import all the models needed?

Because if so, then it’s trivial to get that into Source Filmmaker.

I’m surprise this is actually possible. Mass Effect 3 map works, reminds me of that one fellow that made Anderson’s Apartment, beautifully done so I hope to see more on Source. Nice job.

I can’t remember but I think UE4 can export as obj, you could do that then use http://dev.wallworm.com/ in 3DS MAX to export as VMF

I think later versions of UE3 can do this too.

Well shit, if he can export it as an OBJ and have it convert over to a VMF, then that is definitely a better way to go.

Not really. max sample is a 3ds max script file .ms that just manipulates the objects that is already in the scene. It searches object in the scene by its name, copy it, rotate, scale and position as it is in game. Before applying that script you would need to import all static meshes into scene yourself. Just as .t3d it holds no information on textures or geometry.

Ah.

Well, from what I can tell, the names in the t3d correlate to the model names as I have them converted. Namely,


StaticMesh=StaticMesh'/Game/ME3_Mod/Maps/Crate01_M.Crate01_M'

Correlates to


Crate01_m.mdl

Assuming that all of the .t3d meshes are of the form


<PATH>/<MODEL>.<MODEL>

With the same exact model name used twice, then I can very easily parse that .t3d into something usable, either in 3dsmax or directly in SFM.

If you want to toss me that .t3d file, I can tinker with it sometime over the next week or two, and see what I can come up with. I like the .obj export idea, and so I think I will try to get it into 3dsmax first. I foresee horrific loading times in my future, but it is what it is.

That’s actually perfect, because wallworm uses helpers afaik for its props. So you’d import them all, tweak them to be a wallworm model, then export it as a vmf (and the meshes as static prop)

Yeah, that’s pretty much it.

And btw that is what i come up in 40 minutes:

there are 1928 static meshes in the scene that only uses 63 materials. Applying textures for those 63 materials took most of the time. If i had to apply 1928 materials it would took… probobly 10-12 hours. So as a time-saver - i call it a huge success.

Again, if you would be willing to share a .t3d for me to work with, I can automate the entire process, sans the extraction of assets from Unreal packages (EG using UModel).

That way you wouldn’t have to do any work at all - you just launch the script, load the t3d, and go watch an episode of Luke Cage or something while the script loads the entire .t3d into 3dsmax, automatically applying the materials and what-not.

Ok, here is an .t3d for that docks map https://gist.github.com/anonymous/47d57b06f4395aafedd7ba81527f9a18

Btw, i can just send you the tool itself so that you could play with it yourself. Which free filehosting service should i use? Mediafire is blocked in my country.

I’m pretty sure you should not put all of that raw code in your post even if it’s not displayed all at once
put it on Pastebin?