Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Star Wars The Old Republic gr2 Noesis plugin alpha release

Post questions about game models here, or help out others!
The Chief
veteran
Posts: 101
Joined: Fri Oct 09, 2009 3:44 am
Has thanked: 90 times
Been thanked: 10 times

Re: Star Wars The Old Republic gr2 Noesis plugin alpha relea

Post by The Chief »

Ok guys this will sound odd but ¿Did any one know on wich .tor file are the models from Satele Shan and Darth Malgus? or they are also
separated on pieces ?

Many of the models are separated on tor files but iam curius if those models are in a single piece.
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: Star Wars The Old Republic gr2 Noesis plugin alpha relea

Post by MrAdults »

Vindis wrote:(I don't know if you read this thread Senor Casaroja :)) But I have a question for you. Is it possible to create dialogs in Noesis? I mean, if i don't want to write a standalone program to view the models, can i create pop-up window, where the user can select which material he/she want to load? Or can noesis open file on their own? I read the matfile name from the xml, open the mat file, and read the texture names from them.

I thought (i researched the file structure now and then, and starts to understand the whole thing now) i'll rewrite the whole code, parse the xml, read the mat and list the results it in a window. You just have to choose the mat and Noesis load it with the mesh (i still can't figure out where the "item names" are stored, maybe it's only server sided, and the client contains only IDs).
I guess I missed that. Yes, you can do user prompts, which allow you to prompt for a variety of inputs, as well as file and folder paths. There's lots of examples of those in the tools scripts on the Noesis plugins/scripts Google code repo.

BeautifulSoup is also included in Noesis now, if you prefer that for XML parsing.
Acewell
VIP member
VIP member
Posts: 1330
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2710 times
Been thanked: 884 times

Re: Star Wars The Old Republic gr2 Noesis plugin alpha relea

Post by Acewell »

The Chief wrote:Did any one know on wich .tor file are the models from Satele Shan and Darth Malgus?
swtor_main_art_creature_a_1.tor

Darth Malgus model
resources\art\dynamic\creature\model\bms_malgus_a01.gr2(hood down) OR bms_malgus_a02.gr2(hood up)

Satele Shan model
resources\art\dynamic\creature\model\bfn_satele_a01.gr2

textures for both characters
resources\art\dynamic\npc\unique_characters\texture\___psd
The Chief
veteran
Posts: 101
Joined: Fri Oct 09, 2009 3:44 am
Has thanked: 90 times
Been thanked: 10 times

Re: Star Wars The Old Republic gr2 Noesis plugin alpha relea

Post by The Chief »

Men really thank you for point me out the location of those models really. :)

By the way iam wonder ¿There will be in the future support for the bones and animations?
luke9511
beginner
Posts: 29
Joined: Sat Jun 30, 2012 11:48 pm
Has thanked: 13 times

Re: Star Wars The Old Republic gr2 Noesis plugin alpha relea

Post by luke9511 »

where can i download the program that can open the .tor files to extract the models? and thank you very much for the plugin!

EDIT never mind anyone else wondering you can find it here viewtopic.php?f=10&t=7186&start=180 on the last page
luke9511
beginner
Posts: 29
Joined: Sat Jun 30, 2012 11:48 pm
Has thanked: 13 times

Re: Star Wars The Old Republic gr2 Noesis plugin alpha relea

Post by luke9511 »

the noesis plugin works great, however i noticed when exporting a model if it has multiple meshes, it will say there are meshes with duplicate names and seems to mess up the texture coordinates, but other than that it works great
luke9511
beginner
Posts: 29
Joined: Sat Jun 30, 2012 11:48 pm
Has thanked: 13 times

Re: Star Wars The Old Republic gr2 Noesis plugin alpha relea

Post by luke9511 »

any updates?
swtor miner
beginner
Posts: 25
Joined: Tue Sep 10, 2013 12:05 am
Has thanked: 5 times
Been thanked: 42 times

Re: Star Wars The Old Republic gr2 Noesis plugin alpha relea

Post by swtor miner »

Small update, originally posted to the Tor archive thread, reposted here. You can find my other updates here: viewtopic.php?f=10&t=7186&p=88029#p88029

And, I know you guys will like this. Here's an updated version of Vindis's Noesis Plugin that now loads multiple meshes into one model: http://www.sendspace.com/file/u4ms5z - * fixed // instead of # *
1. Put it in the Noesis/plugins/python directory, and it will allow you to view .gr2 files.
2. Now put all the .gr2 files you want to view, and their associated textures (just the files ending in _d.dds) into a folder.
3. Create a file in that directory called model_list.txt, and put all but one of the names of those .gr2 files in that file. (Just the file name, one per line, no /'s)
4. Load up the one .gr2 you left off the list, and it will reassemble it for you.

I've left in/fixed support for the Specular Maps(_s.dds) and Normal Maps(_n.dds), and you can set Noesis to load these by enabling the loading non-diffuse textures in the Data Viewer. Unfortunately the Normal Maps seem to require tweaked lighting data to function properly, and loading of that data is not implemented yet.
Last edited by swtor miner on Sat Sep 14, 2013 12:50 am, edited 1 time in total.
vertalius
n00b
Posts: 12
Joined: Tue Mar 04, 2014 8:08 pm
Location: Kyiv, Ukraine
Has thanked: 3 times
Been thanked: 2 times

Re: Star Wars The Old Republic gr2 Noesis plugin alpha relea

Post by vertalius »

Hi there!

Is anyone know, why i'm getting an error, when i try to open some swtor .gr2 models with Noesis:
Traceback (most recent call last):
File "d:\noesis\plugins\python\Swtor_debug.py", line 342,
in noeplyLoadModel
rapi.rpgSetMaterial(matName[offsetMaterialUsageTexture[j][2]])
IndexError: list index out of range


If i comment this line with "#", Noesis loads model, but without mats/textures, but that's not a solution...

BTW, I know nothing about programming...
dynath
ultra-n00b
Posts: 2
Joined: Sat Sep 17, 2011 5:53 am

Re: Star Wars The Old Republic gr2 Noesis plugin alpha relea

Post by dynath »

Any idea what causes this error?

Code: Select all

mdl=rapi.rpgConstructModel() Runtime Error: failed to construct model from rpgeo context
It seems to happen with a decent handful of models for me at least.
swtor miner
beginner
Posts: 25
Joined: Tue Sep 10, 2013 12:05 am
Has thanked: 5 times
Been thanked: 42 times

Re: Star Wars The Old Republic gr2 Noesis plugin alpha relea

Post by swtor miner »

Attached is an updated Noesis GR2 plugin.

It'll now attempt to load textures from the material files directly, rather than searching for them in nearby folders. This means you'll likely have to extract all the swtor_main_art*.tor archives to a folder to ensure that the materials/textures are available for loading. And change the swtor-config.xml file to point to where the "resources" folder is.

To use it:
  1. Extract the zip file to your "Noesis/plugins/python" directory
  2. Extract the art asset tor archives to a folder
  3. Edit the swtor-config.xml in your "Noesis/plugins/python" directory to point to where you extracted the art assets.
Update Notes:
  1. Materials are parsed and textures loaded from them.
  2. Two-sided models now work.
  3. Opacity textures now work, and the alpha test value/type is parsed from the material file.
Known Issues:
  1. Reflections/Gloss textures don't work properly, and are turned off.
  2. Opacity doesn't work with materials that have rotation maps that are a different size from their diffuse maps. There is no way to properly combine them currently.
  3. The old texture search functionality has been removed. You will need the proper materials and textures in the proper location for the model you are viewing.
  4. The vast majority of dynamic models will not be textured properly. Many rely on having their default material overridden by the game engine to display properly. I added a function to attempt to guess the material names from the model name. This allowed some of the dynamic models to load.
  5. Most dynamic creature model's eyes are broken. This bug is linked to my hack to get some of the dynamic models to load properly by guessing their material names.
  6. Skeletal models will throw an error.
  7. Models with different sized diffuse and rotation maps may have opacity problems.
  8. Animated Textures do not work.
  9. Model Attachments are parsed, but not loaded.
  10. Bones/Animations are not loaded.
  11. Probably a few more that have slipped my mind right now.
You do not have the required permissions to view the files attached to this post.
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: Star Wars The Old Republic gr2 Noesis plugin alpha relea

Post by MrAdults »

I don't actually have any SWTOR data to test it, but it sounds like you're making a respectable effort here. You might be interested to know that you can add a "rapi.setPreviewOption("autoLoadNonDiffuse", "1")" call to your script (it will only affect the rapi instance the model is being applied to) instead of relying on the user to set the option in the data viewer.

If there's anything else you find yourself needing that Noesis doesn't seem to offer, feel free to let me know. Always happy to help people who are actually trying to accomplish things within the framework.

Edit: Oh, and you may have luck with lighting by unifying binormals, but since I haven't seen what's going on I can only speculate about what the problem is. There's example usage of the unify binormals functionality in the Gamebryo NIF script.
swtor miner
beginner
Posts: 25
Joined: Tue Sep 10, 2013 12:05 am
Has thanked: 5 times
Been thanked: 42 times

Re: Star Wars The Old Republic gr2 Noesis plugin alpha relea

Post by swtor miner »

MrAdults wrote:I don't actually have any SWTOR data to test it, but it sounds like you're making a respectable effort here. You might be interested to know that you can add a "rapi.setPreviewOption("autoLoadNonDiffuse", "1")" call to your script (it will only affect the rapi instance the model is being applied to) instead of relying on the user to set the option in the data viewer.
Added that. Thanks!

My problem with reflections/specular is a little complicated, and I'm not sure how to proceed. A good starting reference is SWTOR fan's post here. I'm not sure I implemented his normals/tangents properly.

There's only two things I'd like to add to it. First, is that the alpha channel of the DiffuseMap is a reflection map. But, only if the .mat file has reflections enabled, otherwise it's completely opaque and should be ignored. Second, all 3 textures can be different sizes on the same model (e.g. 1024x1024 diffuse, 512x512 rotation, 256x256 gloss). Which causes it's own issues into how to combine them.

Here's what a speeder model looks like in Noesis with Specular turned on, reflections are not implemented. (whoops had the wrong one at first)
Image

And the same model in-game with reflections. (Note: the lighting is intensely orange in this area.)
Image

edit: Nevermind, figured it out myself:
Image
I just created a next pass material that uses the DiffuseMap with it's alpha channel enabled the diffuse texture, kept the normal/specular maps, and added an environment map I threw together. Essentially texturing the reflections over top the non-reflective material.
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: Star Wars The Old Republic gr2 Noesis plugin alpha relea

Post by MrAdults »

That's not a bad approach. I think it has to be additive instead of alpha blended to give you the results you want, though. I can just add a 2D env map mask in Noesis if that's what you need, more über shader permutations is always fun. It sounds like then you'd just want to duplicate that diffuse alpha into the RGB for a new texture and use as both the spec texture and env mask texture.

Unless all you need to do already is just dup that alpha into a spec mask. Do they do real env map reflections? In that screenshot it really just looks like specular. You should give the diffuse alpha to spec texture RGB thing a shot, then you also don't need a nextpass.
swtor miner
beginner
Posts: 25
Joined: Tue Sep 10, 2013 12:05 am
Has thanked: 5 times
Been thanked: 42 times

Re: Star Wars The Old Republic gr2 Noesis plugin alpha relea

Post by swtor miner »

They definitely have both a specular mask, for specular highlights, and a reflection mask for reflection intensity (with a flag to turn it on/off). Then they load an environment cubemap to determine what's reflected. In addition to these textures I have values for: Reflection Intensity, Reflection Blur Intensity, Reflection Spec Influence, and Reflection Contrast.

Also I've been wondering how Opacity Textures work in Noesis. Do, I fill the RGB values with the alpha, and use that as the opacity texture? I've tried that and it didn't work. The only success I've had with applying opacity is copying the opacity map to the alpha channel of the diffuse texture. This isn't always very feasible though, as sometimes the opacity texture is a different size than the diffuse one. Also, running loops over the pixel data in python can be very slow.
Post Reply