Page 2 of 4

Re: Cyberpunk 2077 Noesis script

Posted: Thu Dec 31, 2020 12:29 am
by pox911
At least for the iguana, it seems that the weight to bone index is off by one? All the bones i select show a weight of the next one in line.

Image

Re: Cyberpunk 2077 Noesis script

Posted: Mon Jan 04, 2021 9:54 am
by Loomy
Big thanks for all your amazing work to bring us this script,

Noticed that quite a few of the meshes once extracted with cp77tools have their textures sharing same name, not all though, but added few lines to script to load up texture for these cases.. (wont work for all)

Code: Select all

def LoadModel(data, mdlList):
	
	matList = []
	texList = []
	
	###just above commitTriangles in vertLoop
	fName = os.path.basename(rapi.getInputName())
	meshName = fName.split(".")[0]
	texPath = dir +"\\textures\\"+meshName+"_d01.dds"

	material = NoeMaterial("submesh"+str(i), "")
	rapi.rpgSetMaterial("submesh"+str(i))
	material.setTexture(texPath)
	matList.append(material)
	###rapi.rpgCommitTriangles***

mdl.setModelMaterials(NoeModelMaterials(texList, matList))
###mdlList.append(mdl)***
Not sure how to load normal maps in noe, but it will usually follow same naming convention and end with *_n01".*

Image

Re: Cyberpunk 2077 Noesis script

Posted: Thu Jan 07, 2021 4:20 pm
by MaloneXI
Hi all ,

Does anyone know in what archive I could find the map of night city ? Not the game map , just the map , in map menu, the one that show the objectives etc.

Thanx a lot.

Re: Cyberpunk 2077 Noesis script

Posted: Mon Jan 11, 2021 10:49 am
by Loomy
Ive have modified the script to recursively parse all material instances (.mi) & textures info from main .mesh & .buffer, & referenced external files (*.mi, *.mt, *.ml*, etc)

End up with a list of all linked texture files, and material info. Not sure how to link specific material to which meshpart, but so far it would seem that the first few material instances found in mesh.0.buffer would correspond to the same mesh part(s) index-wise.

Would really appreciate any help to clean it up and try and link up these textures & setup materials for noesis to be able to load & export as much of it as possible. Still a WIP, needs alot of polishing. Note: change the cp77_path variable at top of file to the folder where you have extracted game data.

Some of the info it dumps from Kojimas Head Mesh as example:

Textures List:

Code: Select all

[
  "base\\characters\\head\\ma\\h0_732_ma_c__middle\\textures\\h0_732_ma_c__middle_d01.xbm",
  "base\\characters\\head\\ma\\h0_732_ma_c__middle\\textures\\h0_732_ma_c__middle_n01.xbm",
  "base\\characters\\head\\ma\\h0_001_ma_c__basehead\\textures\\h0_001_ma_c__basehead_tyger_d04.xbm",
  "base\\characters\\common\\skin\\face\\h0_000_ma_c__base_nd.xbm",
  "base\\characters\\head\\ma\\h0_001_ma_c__basehead\\textures\\h0_001_ma_c__basehead_rm01.xbm",
  "base\\characters\\common\\skin\\face\\h0_000_base__tintcolormask.xbm",
  "base\\characters\\common\\skin\\face\\h0_001_ma__wrnkl_stretch_n.xbm",
  "base\\characters\\common\\skin\\face\\h0_001_ma__wrnkl_squash_n.xbm",
  "base\\characters\\common\\skin\\face\\h0_001_ma__wrnkl_blood_mask_u.xbm",
  "base\\characters\\main_npc\\kojima\\h0_001_ma_a__kojima\\textures\\h0_001_ma_a__kojima_d01.xbm",
  "base\\characters\\main_npc\\kojima\\h0_001_ma_a__kojima\\textures\\h0_001_ma_a__kojima_n01.xbm",
  "base\\characters\\head\\ma\\h0_001_ma_c__basehead\\textures\\h0_001_ma_c__basehead_valentino_d04.xbm",
  "base\\characters\\head\\ma\\h0_001_ma_c__basehead\\textures\\h0_001_ma_c__basehead_d04.xbm",
  "base\\characters\\head\\ma\\h0_001_ma_c__basehead\\textures\\h0_001_ma_c__basehead_n01.xbm",
  "base\\characters\\head\\ma\\h0_001_ma_c__basehead\\textures\\h0_001_ma_c__basehead_d01.xbm",
  "base\\characters\\head\\ma\\h0_001_ma_c__basehead\\textures\\h0_001_ma_b__basehead_d03.xbm",
  "base\\characters\\head\\mba\\h0_000_mba_c__basehead\\textures\\h0_000_mba_c__basehead_d01.xbm",
  "base\\characters\\common\\character_customisation_items\\tattoos\\face\\textures\\head_tattoo__tygerclaw_01_d01.xbm",
  "base\\characters\\common\\character_customisation_items\\tattoos\\face\\textures\\head_tattoo__tygerclaw_01_e01.xbm",
  "base\\characters\\common\\character_customisation_items\\tattoos\\face\\textures\\head_tattoo__valentino_01_d01.xbm",
  "engine\\textures\\small_white.xbm"
]

Code: Select all

{
    "CMaterialInstance": {
          "Normal": "base\\characters\\head\\ma\\h0_732_ma_c__middle\\textures\\h0_732_ma_c__middle_n01.xbm",
          "baseMaterial": "base\\characters\\common\\skin\\character_mat_instance\\male\\head\\male_head_02_ca_limestone.mi",
          "Albedo": "base\\characters\\head\\ma\\h0_732_ma_c__middle\\textures\\h0_732_ma_c__middle_d01.xbm",
      },
      "CMaterialInstance": {
          "CavityIntensity": 0.25,
          "DetailRoughnessBiasMin": 1,
          "MicroDetailInfluence": 1,
          "MicroDetailUVScale02": 8,
          "Normal": "base\\characters\\head\\ma\\h0_732_ma_c__middle\\textures\\h0_732_ma_c__middle_n01.xbm",
          "BloodColor": {
            "Blue": 0,
            "Alpha": 0,
            "Green": 0,
            "Red": 0
          },
          "DetailRoughnessBiasMax": 0.8500000238418579,
          "TintColorMask": "base\\characters\\common\\skin\\face\\h0_000_base__tintcolormask.xbm",
          "Detailmap_Squash": "base\\characters\\common\\skin\\face\\h0_001_ma__wrnkl_squash_n.xbm",
          "Roughness": "base\\characters\\head\\ma\\h0_001_ma_c__basehead\\textures\\h0_001_ma_c__basehead_rm01.xbm",
          "Detailmap_Stretch": "base\\characters\\common\\skin\\face\\h0_001_ma__wrnkl_stretch_n.xbm",
          "TintColor": {
            "Blue": 83,
            "Alpha": 255,
            "Green": 149,
            "Red": 131
          },
          "DetailNormalInfluence": 1,
          "MicroDetailUVScale01": 20,
          "DetailNormal": "base\\characters\\common\\skin\\face\\h0_000_ma_c__base_nd.xbm",
          "TintScale": 0.379,
          "baseMaterial": "base\\characters\\common\\skin\\character_mat_instance\\male\\head\\male_head_npc_06_limestone_tyger.mi",
          "Albedo": "base\\characters\\head\\ma\\h0_001_ma_c__basehead\\textures\\h0_001_ma_c__basehead_tyger_d04.xbm",
          "Bloodflow": "base\\characters\\common\\skin\\face\\h0_001_ma__wrnkl_blood_mask_u.xbm",
          "SkinProfile": "skip"
        }
      }
    
}

Re: Cyberpunk 2077 Noesis script

Posted: Mon Jan 11, 2021 10:55 am
by Loomy
Here is WIP script as mentioned above, check class CR2WFile, info is output to cr2w_list, cr2w_textures, cr2w_external_data variables. Make sure to edit your cp77_path to your own extracted archives location

https://pastebin.com/kGUQL1gG

Re: Cyberpunk 2077 Noesis script

Posted: Mon Jan 11, 2021 9:26 pm
by Loomy
MaloneXI wrote: Thu Jan 07, 2021 4:20 pm Hi all ,

Does anyone know in what archive I could find the map of night city ? Not the game map , just the map , in map menu, the one that show the objectives etc.

Thanx a lot.
I believe this is it:- base\entities\cameras\3dmap\3dmap_* (found in gamedata archive)

Re: Cyberpunk 2077 Noesis script

Posted: Wed Jan 13, 2021 9:08 am
by Thumpist
Hi Everyone,

I am very new to this, I basically love the vehicles in CP2077 and I have already printed a Quadra from a file I found on thingiverse but I was hoping to do some more of the CP cars. I have extracted the archive and I can view the meshs via Noesis but every mesh I open is just really low on the poly count and barely has the vehicle shape. I am sure there is something I am missing or I am over estimating what the program can do? Is what I am trying to do possible?

Re: Cyberpunk 2077 Noesis script

Posted: Fri Jan 15, 2021 2:43 am
by Piranjak
Hi all, I'm having a problem which I assume is probably caused by something small and obvious, but I know basically nothing about this. I mean, really.
I got the mesh files I want with CP77Tools and put the python script in Noesis so it's all set, but when I try to open the mesh files it tells me they cannot be previewed. If I try to extract them I get the error "couldn't find a suitable buffer file". Any advice?

Re: Cyberpunk 2077 Noesis script

Posted: Fri Jan 15, 2021 9:19 am
by micro777
Piranjak wrote: Fri Jan 15, 2021 2:43 am Hi all, I'm having a problem which I assume is probably caused by something small and obvious, but I know basically nothing about this. I mean, really.
I got the mesh files I want with CP77Tools and put the python script in Noesis so it's all set, but when I try to open the mesh files it tells me they cannot be previewed. If I try to extract them I get the error "couldn't find a suitable buffer file". Any advice?
Попытаться изменить значение nameToIndex,0 в строке 328 скрипта на nameToIndex,1.
Try changing the nameToIndex,0 value in script line 328 to nameToIndex,1.
indOffFlag = buildFlagFromNames(["teOffset","Uint32"],nameToIndex,1)
Image

Re: Cyberpunk 2077 Noesis script

Posted: Fri Jan 15, 2021 4:44 pm
by Piranjak
micro777 wrote: Fri Jan 15, 2021 9:19 am
Piranjak wrote: Fri Jan 15, 2021 2:43 am Hi all, I'm having a problem which I assume is probably caused by something small and obvious, but I know basically nothing about this. I mean, really.
I got the mesh files I want with CP77Tools and put the python script in Noesis so it's all set, but when I try to open the mesh files it tells me they cannot be previewed. If I try to extract them I get the error "couldn't find a suitable buffer file". Any advice?
Попытаться изменить значение nameToIndex,0 в строке 328 скрипта на nameToIndex,1.
Try changing the nameToIndex,0 value in script line 328 to nameToIndex,1.
indOffFlag = buildFlagFromNames(["teOffset","Uint32"],nameToIndex,1)
Image
Sadly still having the same issue, but thank you for taking the time.

Re: Cyberpunk 2077 Noesis script

Posted: Sat Jan 16, 2021 2:13 am
by nekoboinick
micro777 wrote: Fri Jan 15, 2021 9:19 am
Piranjak wrote: Fri Jan 15, 2021 2:43 am Hi all, I'm having a problem which I assume is probably caused by something small and obvious, but I know basically nothing about this. I mean, really.
I got the mesh files I want with CP77Tools and put the python script in Noesis so it's all set, but when I try to open the mesh files it tells me they cannot be previewed. If I try to extract them I get the error "couldn't find a suitable buffer file". Any advice?
Попытаться изменить значение nameToIndex,0 в строке 328 скрипта на nameToIndex,1.
Try changing the nameToIndex,0 value in script line 328 to nameToIndex,1.
indOffFlag = buildFlagFromNames(["teOffset","Uint32"],nameToIndex,1)
Image
I am having the same issue, and your fix is sadly not working. I tried creating the file, just in case if it wasn't able to initially create the file, but it doesn't seem to work.

Re: Cyberpunk 2077 Noesis script

Posted: Sat Jan 16, 2021 4:11 am
by lndrx
nekoboinick wrote: Sat Jan 16, 2021 2:13 am
micro777 wrote: Fri Jan 15, 2021 9:19 am
Piranjak wrote: Fri Jan 15, 2021 2:43 am Hi all, I'm having a problem which I assume is probably caused by something small and obvious, but I know basically nothing about this. I mean, really.
I got the mesh files I want with CP77Tools and put the python script in Noesis so it's all set, but when I try to open the mesh files it tells me they cannot be previewed. If I try to extract them I get the error "couldn't find a suitable buffer file". Any advice?
Попытаться изменить значение nameToIndex,0 в строке 328 скрипта на nameToIndex,1.
Try changing the nameToIndex,0 value in script line 328 to nameToIndex,1.
indOffFlag = buildFlagFromNames(["teOffset","Uint32"],nameToIndex,1)
Image
I am having the same issue, and your fix is sadly not working. I tried creating the file, just in case if it wasn't able to initially create the file, but it doesn't seem to work.
Same here. Noesis asks for the .rig file, but even selecting what appears to be the correct file, nothing happens. Says that the rig file is invalid and keeps asking for it. If you cancel the selection, nothing is exported nor previewed.

Re: Cyberpunk 2077 Noesis script

Posted: Sat Jan 16, 2021 4:44 am
by lndrx
Extracted the archive again using CP77Tools version 0.2.0.1. Now this works! Thank you!

Re: Cyberpunk 2077 Noesis script

Posted: Sat Jan 16, 2021 3:56 pm
by Piranjak
lndrx wrote: Sat Jan 16, 2021 4:44 am Extracted the archive again using CP77Tools version 0.2.0.1. Now this works! Thank you!
Using version 0.2.0.1 fixed it for me too! Thank you! <3

Re: Cyberpunk 2077 Noesis script

Posted: Sat Jan 16, 2021 7:16 pm
by lndrx
Ok, I'm not a great programmer, but I kinda sorted what is "wrong". The new version of CP77Tools (v1.0 at this time) doesn't have any buffer files. It cleans everything leaving only the mesh file. Joschka's script 1.2.1 needs these buffer files to work. I'm trying to update the python code to point the original file "as also the buffer file".