MOH Central

Projects => OpenMOHAA Project => Topic started by: Elgan {sfx} on January 21, 2016, 09:33:52 PM

Title: moh bsp->obj,cde
Post by: Elgan {sfx} on January 21, 2016, 09:33:52 PM
working on my bsp -> model scene -> cde / obj /ply

thor,

can you use max and do ur stuff with models?
the cde has textures. That work, They doint show in blender, no idea why!

They show in unrealengine....? if i export as fbx...but some faces are missing (messed up normals?)

So can u see if u can get something going exporting as a big mesh from 3ds like u do?


https://drive.google.com/open?id=0BwhPvNv1Nz1ANnlFM2FWTU13M2s


once ive done the patch mesh ill make cmd line tool. Need to know things are working ok with brushes tho..

the problem is flipping normals after exporting from blender,m on unity and ue4

NOT DONE ANY WORK TODAY ARGHGHDHGDFHG going to oversleep, have a date now i have to cancel haha

Title: Re: moh bsp->obj,cde
Post by: Elgan {sfx} on January 23, 2016, 05:29:09 PM
think i like 3ds max a lot better
Title: Re: moh bsp->obj,cde
Post by: Elgan {sfx} on January 23, 2016, 09:04:57 PM
in unity, i found that if you select all faces and lfip normals, in max. Then you can fix up any left overs. Then export..works fine....

some scale issues with textures in UE4...
Title: Re: moh bsp->obj,cde
Post by: Thorongil {sfx} on January 24, 2016, 09:32:55 AM
In UE4 when you import it as one object you can't rotate doors if I'm correct same for the bridge on crossroads, when a bomb is placed it needs to reveal the broken bridge after it exploded. But In unity you can import them as on object and can still select individual objects.

Also for the first test need to find the right workflow. Here is an example of usarmy parts (head, body & hands) worldmodel in tpose with an seperate animation. Can you check if this works out.
Title: Re: moh bsp->obj,cde
Post by: Elgan {sfx} on January 24, 2016, 10:42:15 AM
No, Well this is imported with no doors, but youre wrong aboutt he combined mesh thing. See the screenshot.

Process
use the tool to convert a pk3 into an .dea file.
Right now, it will grab the first .bsp from the pk3, which it finds in /maps.

so make a pk3 of ALL mohaa's textures, and ALL mohaa's scripts and maps folder and a bpos

map.pk3
textures/
scripts/
maps/mohdm1.bsp

Then run command line

1. assimp.exe export mohdm1.pk3 mohdm1.dae

2. mohdm1.dae will be produced with all the textures in the same folder.

3. (i forgot to fix this) open mohdm1.dae and check the name of the textures links, you may have to do a file replace on all the textures in the dae file. (will fix this later, cba now)

4. import into max and delete the sky box

5. select all objects

6. go to modifiers and select "normals" and flip all the normals.

7. to go views->xview->face orientation

8. Select all, and you can see if anything is majorly wrong. Faces will be green is they are wrong, or textured if right, Doa  render to check. ( things facing the wrong way wont get rendered).

NOTE: some faces WILL be green as they are on the outside. Also if u select a wall, its backface is green and font should not be. So it may appear green util u zoom in.

9 export as fbx

10 import into UE4 ,

DO NOT TICK COMBINE MESHES (or you will end up with a single mesh) <- now we can make edits to the map, explode a bridge etc
tick import all,
tick import normals


11. i do not know how to fix textures right now.



Title: Re: moh bsp->obj,cde
Post by: Elgan {sfx} on February 08, 2016, 11:25:56 AM
code is dumped here right now
https://github.com/elgansayer/assimp

eventually

* Clean up and load pk3 or BSP
* fix patch mesh
* support both Q3 and MOH bsp/pk3
* improve texture naming

other
* load bt and SH
* add sdk/skc

code is all in the q3 files. Not committed to original assimp project because it overwrites q3 import right now.

Title: Re: moh bsp->obj,cde
Post by: Ley0k {sfx} on February 12, 2016, 06:08:33 AM
Some beginning of the UE BSP importer below :)
Title: Re: moh bsp->obj,cde
Post by: Cobra {sfx} on February 12, 2016, 06:42:44 AM
Fantastic work that Ley0k, well done mate, Innovation Medal Gold right there!!!  8)

{SFX} Innovation Medal {Gold}
(http://s18.postimg.org/4l7e5fi7p/SFX_IMG.png)

Awarded for:

The {SFX} Innovation Medal {Gold}
is awarded to people whom have
Developed something that the Team or
Community find really useful, this can
be a Script, Program, Admin Tools etc.
Title: Re: moh bsp->obj,cde
Post by: Ley0k {sfx} on February 13, 2016, 01:50:29 PM
UPDATE: I made a standalone importer which uses instead export .bsp to .fbx, and here is a better result below

However it seems that texture gets assigned to wrong faces, I'll try to fix it
Title: Re: moh bsp->obj,cde
Post by: Ley0k {sfx} on February 13, 2016, 04:28:48 PM
Another version with textures fixed (much better now :D)
Title: Re: moh bsp->obj,cde
Post by: Cobra {sfx} on February 13, 2016, 04:30:43 PM
Its coming to life very fast :)
Title: Re: moh bsp->obj,cde
Post by: Ley0k {sfx} on February 14, 2016, 02:05:51 PM
I added some normal map, I will update the git project lol
Title: Re: moh bsp->obj,cde
Post by: Cobra {sfx} on February 14, 2016, 02:25:50 PM
OMG that looks amazing dude, lovely work  8)
Title: Re: moh bsp->obj,cde
Post by: Heatsinkbod {sfx} on February 14, 2016, 03:17:57 PM
Loving that  8) Lets rock
Title: Re: moh bsp->obj,cde
Post by: Goober {sfx} on February 14, 2016, 06:11:04 PM
You guys are doing amazing work here. Keep it up  ;)
Title: Re: moh bsp->obj,cde
Post by: Elgan {sfx} on February 14, 2016, 08:30:16 PM
http://www.moddb.com/mods/medal-of-honor-allied-assault-hd/downloads/mohaa-hd-final
Title: Re: moh bsp->obj,cde
Post by: Ley0k {sfx} on February 15, 2016, 04:57:27 AM
I used heatsink's one as it's more HD
Title: Re: moh bsp->obj,cde
Post by: Cobra {sfx} on February 15, 2016, 06:47:51 AM
DoubleKill supplied the textures i gave you Ley0k, we need to know now where they came from.