XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Sun Jul 22, 2018 5:38 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Resident Evil Outbreak Noesis script
PostPosted: Sat Jul 07, 2018 8:19 pm 
Offline
n00b
User avatar

Joined: Thu Jul 05, 2018 2:54 pm
Posts: 14
Has thanked: 0 time
Have thanks: 1 time
Hi everyone, I'm looking for help importing REO Models in noesis.

I have a noesis script but its Incomplete and only imports REO skeleton's at the moment so I'm looking for someone to help finish this noesis script.
I uploaded some samples from REO here http://www.mediafire.com/folder/jgti51rbb59pw/reo .

Also I didn't make this script.
Code:
from inc_noesis import *
import noesis
import rapi


def registerNoesisTypes():
   handle = noesis.register("Resident Evil Outbreak skeletons", ".AHI")
   noesis.setHandlerTypeCheck(handle, noepyCheckType)
   noesis.setHandlerLoadModel(handle, noepyLoadModel)
   noesis.logPopup()
   return 1



def noepyCheckType(data):
   f = NoeBitStream(data)
   if len(data) < 16:
      return 0
   return 1


def noepyLoadModel(data, mdlList):
   ctxt = rapi.rpgCreateContext()
   rapi.rpgSetOption(noesis.RPGOPT_TRIWINDBACKWARD, 0)
   f = NoeBitStream(data)
   
   boneList=[]
   
   unk1=f.read("i")[0]
   numBones=f.read("i")[0]
   fileSize=f.read("i")[0]
   unkA=f.read("4i")[0]
   for x in range(0,numBones-1):
      start=f.read("H")[0]
      unkB=f.read("H")[0]
      unkC=f.read("i")[0]
      boneSize=f.read("i")[0]
      boneID=f.read("i")[0]
      boneName="bone " + str(boneID)
      boneParent=f.read("i")[0]
      print (boneParent)
      boneParentName="bone " + str(boneParent)
      boneChild=f.read("i")[0]
      unkD=f.read("i")[0]
      scl=NoeVec3.fromBytes(f.readBytes(12))
      s4=f.read("f")[0]
      q=NoeQuat.fromBytes(f.readBytes(16))
      trans=NoeVec3.fromBytes(f.readBytes(12))
      t4=f.read(">f")[0]
      unkE=f.read("i")[0]
      unkF=f.read("i")[0]
      unkG=f.read("46i")[0]
      mtrx = q.toMat43(1)
      mtrx[0] *= scl
      mtrx[1] *= scl
      mtrx[2] *= scl
      mtrx[3] = trans
      
      if boneID==0:
         boneList.append(NoeBone(boneID+1, boneName, mtrx, None, boneParent))
      else:
         boneList.append(NoeBone(boneID, boneName, mtrx, None, boneParent))
   
      
      
      
   boneList = rapi.multiplyBones(boneList)
   mdl =  NoeModel()
   mdlList.append(mdl)
   mdl.setBones(boneList)
   
   
   rapi.rpgClearBufferBinds()
   
   return 23474868            #because I said so


Top
 Profile  
 
 Post subject: Re: Resident Evil Outbreak Noesis script
PostPosted: Sun Jul 08, 2018 10:48 am 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2314
Location: Nexus, searching for Jim Kirk
Has thanked: 525 times
Have thanks: 1201 times
Steve666 wrote:
so I'm looking for someone to help finish this noesis script.
i.e. a Noesis script that can import .amo meshes? (Don't want to be mean but I don't think that someone will write it.
Iirc Predator created a max script/tool to import Resident Evil 5 assets into 3dsmax. Maybe it supports amo, too.)

Anyways, you'll need someone to find out where's the bone ids and weights to be located, maybe in the amo file.
Quote:
Also I didn't make this script.
Then who did?

I used Noesis to create an smd from the skeleton then imported it to blender:


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
"you can't always get things served on a silver tray"
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: Resident Evil Outbreak Noesis script
PostPosted: Sun Jul 08, 2018 4:04 pm 
Offline
mega-veteran
mega-veteran

Joined: Fri Jul 08, 2011 10:36 am
Posts: 195
Has thanked: 26 times
Have thanks: 148 times
shakotay2 wrote:
Anyways, you'll need someone to find out where's the bone ids and weights to be located, maybe in the amo file.

In the file "HE00_00.AMO" there is a data starting at 0x1B9CC, which I believe are bone ids and weights. The structure goes like this : number of entries / number of bones influencing the vertex (int), bone id (int), weight (float, 0 - 100 range).

Here is an example with 2 entries / bones.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Resident Evil Outbreak Noesis script
PostPosted: Sun Jul 08, 2018 7:56 pm 
Offline
n00b
User avatar

Joined: Thu Jul 05, 2018 2:54 pm
Posts: 14
Has thanked: 0 time
Have thanks: 1 time
Thanks you akderebur for taking the time to help.
by the way i don't know how to write Noesis script so I still looking for help.

shakotay2 wrote:
Steve666 wrote:
Also I didn't make this script.
Then who did?
Its created by someone named "The dude" I found that script here https://pastebin.com/kp1RgZNx

shakotay2 wrote:
I used Noesis to create an smd from the skeleton then imported it to blender:
shakotay2 that method doesn't work on r0060100.AMO map files.
Also the nbdx_obj.exe doesn't export the r0060100.AMO map files correctly.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Resident Evil Outbreak Noesis script
PostPosted: Sun Jul 08, 2018 9:19 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2314
Location: Nexus, searching for Jim Kirk
Has thanked: 525 times
Have thanks: 1201 times
Steve666 wrote:
Its created by someone named "The dude" I found that script here https://pastebin.com/kp1RgZNx

Thanks, but I really don't get it why you removed this line from the script:
#Code is by TheDude

Steve666 wrote:
shakotay2 wrote:
I used Noesis to create an smd from the skeleton then imported it to blender:
shakotay2 that method doesn't work on r0060100.AMO map files.
You should know that maps usually don't have skeletons (huuh?).
btw: there was no amo map file in your samples, was it?

edit/correction: okay, skeleton for a room, sounds funny:
shadowmoy wrote:
unsupported files are the AHI files that contain the scene bones /skeleton, in order to make the room look correct you need to load the ahi file and the bone id in each mesh block then transform/rotate the mesh according to the bone , same trick is used in re4 ps2 and pc version and maybe some other re games (not used in re5 or re6)


Steve666 wrote:
Also the nbdx_obj.exe doesn't export the r0060100.AMO map files correctly.
Use the quickbms script mentioned here:
viewtopic.php?f=16&t=9923&p=82047&hilit=ResidentEvilOutbreak2AMOto3dsUV.bms#p82047

(dunno whether it works with maps, though)

_________________
"you can't always get things served on a silver tray"
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: Resident Evil Outbreak Noesis script
PostPosted: Sun Jul 08, 2018 10:10 pm 
Offline
n00b
User avatar

Joined: Thu Jul 05, 2018 2:54 pm
Posts: 14
Has thanked: 0 time
Have thanks: 1 time
shakotay2 wrote:
Use the quickbms script mentioned here:
viewtopic.php?f=16&t=9923&p=82047&hilit=ResidentEvilOutbreak2AMOto3dsUV.bms#p82047

(dunno whether it works with maps, though)

I tried that method too, it doesn't export r0060100.AMO room files correctly either.


Top
 Profile  
 
 Post subject: Re: Resident Evil Outbreak Noesis script
PostPosted: Mon Jul 09, 2018 9:22 am 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2314
Location: Nexus, searching for Jim Kirk
Has thanked: 525 times
Have thanks: 1201 times
I see; it's required to apply skeleton data (translation from the smd file) to the submeshes, for example
20 2925.000000 250.000000 5700.000000 0.000000 -0.000000 0.000000
(so x=2925.0 y=250.0 z=5700.0)
21 2925.000000 199.999939 5250.000000 0.000000 -0.000000 0.000000

to 20.3ds and 21.3ds (benches) after import into blender.

Too busy atm to check it but should work for all 115 submeshes.
(SM 3 is the only one with rotation != 0 degrees, btw.)

(Seems there is some unwanted rotation with the quickbms 3ds creation, though, -90° counterclockwise related to x axis.
You could try to swap above y and z to circumvent his.)

_________________
"you can't always get things served on a silver tray"
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: Resident Evil Outbreak Noesis script
PostPosted: Mon Jul 09, 2018 7:30 pm 
Offline
n00b
User avatar

Joined: Thu Jul 05, 2018 2:54 pm
Posts: 14
Has thanked: 0 time
Have thanks: 1 time
shakotay2 wrote:
I see; it's required to apply skeleton data (translation from the smd file) to the submeshes, for example
20 2925.000000 250.000000 5700.000000 0.000000 -0.000000 0.000000
(so x=2925.0 y=250.0 z=5700.0)
21 2925.000000 199.999939 5250.000000 0.000000 -0.000000 0.000000
Thanks shakotay2, that works.


Top
 Profile  
 
 Post subject: Re: Resident Evil Outbreak Noesis script
PostPosted: Mon Jul 09, 2018 9:26 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2314
Location: Nexus, searching for Jim Kirk
Has thanked: 525 times
Have thanks: 1201 times
Steve666 wrote:
shakotay2 wrote:
I see; it's required to apply skeleton data (translation from the smd file) to the submeshes, for example
20 2925.000000 250.000000 5700.000000 0.000000 -0.000000 0.000000
(so x=2925.0 y=250.0 z=5700.0)
21 2925.000000 199.999939 5250.000000 0.000000 -0.000000 0.000000
Thanks shakotay2, that works.
well, in which way does it work?

I made a blender python script to apply all 115 offsets and the meshes are not clumped any more but is this what it should look like?
(I exchanged the applied offsets y and z but no improvement.)
About 12 parts were being "blasted away", i.e. sm 12 and sm 37 for example but dunno what the problem could be.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
"you can't always get things served on a silver tray"
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: Resident Evil Outbreak Noesis script
PostPosted: Tue Jul 10, 2018 1:41 am 
Offline
n00b
User avatar

Joined: Thu Jul 05, 2018 2:54 pm
Posts: 14
Has thanked: 0 time
Have thanks: 1 time
shakotay2 wrote:
I made a blender python script to apply all 115 offsets and the meshes are not clumped any more but is this what it should look like?
No its not supposed to look like that

shakotay2 wrote:
in which way does it work?
I copied the skeleton translation data on to one of the room meshes but that doesn't seem to work for all the room files

Didn't work for this room file.


Top
 Profile  
 
 Post subject: Re: Resident Evil Outbreak Noesis script
PostPosted: Tue Jul 10, 2018 2:48 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2314
Location: Nexus, searching for Jim Kirk
Has thanked: 525 times
Have thanks: 1201 times
After I realized that blender's script generated sorted filelist spoils the indices it looks a little bit better (maybe one index off or something like that?):
(I'd need an ingame screenshoot from that room to tell more.)


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
"you can't always get things served on a silver tray"
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: Resident Evil Outbreak Noesis script
PostPosted: Tue Jul 10, 2018 11:15 pm 
Offline
n00b
User avatar

Joined: Thu Jul 05, 2018 2:54 pm
Posts: 14
Has thanked: 0 time
Have thanks: 1 time
I'm not sure what level that room is on. Also can you upload your blender script so i can try it out?


Top
 Profile  
 
 Post subject: Re: Resident Evil Outbreak Noesis script
PostPosted: Wed Jul 11, 2018 11:09 am 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2314
Location: Nexus, searching for Jim Kirk
Has thanked: 525 times
Have thanks: 1201 times
Steve666 wrote:
Also can you upload your blender script so i can try it out?
I need to find out the problem before (wouldn't like to release or pm scripts with stupid bugs :D ).

Maybe you can send me your "best looking" room (blender screenshoot, *.amo and *.ahi file ) so that I can test the script?

_________________
"you can't always get things served on a silver tray"
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: Resident Evil Outbreak Noesis script
PostPosted: Wed Jul 11, 2018 7:24 pm 
Offline
n00b
User avatar

Joined: Thu Jul 05, 2018 2:54 pm
Posts: 14
Has thanked: 0 time
Have thanks: 1 time
shakotay2 wrote:
Maybe you can send me your "best looking" room (blender screenshoot, *.amo and *.ahi file ) so that I can test the script?
Okay, I uploaded the room file here https://www.mediafire.com/folder/jgti51 ... i7vmde4uc8


Top
 Profile  
 
 Post subject: Re: Resident Evil Outbreak Noesis script
PostPosted: Wed Jul 11, 2018 8:51 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2314
Location: Nexus, searching for Jim Kirk
Has thanked: 525 times
Have thanks: 1201 times
well, seems you got it! :) All I get is a mess, more or less. This is my nearest "hit":


Quote:
I copied the skeleton translation data on to one of the room meshes

Can you exactly explain that process, please?


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
"you can't always get things served on a silver tray"
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: fakelawface, Google [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group