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.

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

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.

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:

Extract the zip file to your "Noesis/plugins/python" directory

Extract the art asset tor archives to a folder

Edit the swtor-config.xml in your "Noesis/plugins/python" directory to point to where you extracted the art assets.

Update Notes:

Materials are parsed and textures loaded from them.

Two-sided models now work.

Opacity textures now work, and the alpha test value/type is parsed from the material file.

Known Issues:

Reflections/Gloss textures don't work properly, and are turned off.

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.

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.

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.

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.

Skeletal models will throw an error.

Models with different sized diffuse and rotation maps may have opacity problems.

Animated Textures do not work.

Model Attachments are parsed, but not loaded.

Bones/Animations are not loaded.

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.

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.

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)

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

edit: Nevermind, figured it out myself:
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.

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.

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.