Offtopic: Into Commodore 64 (6502) coding, pixeling or music?
Xentax is looking for new members for the C64 activities!
Just drop us a message at forum@xentax.com and join the Scene Team!

Forum rules: Click here

Star Wars The Old Republic gr2 Noesis plugin alpha release

Post questions about game models here, or help out others!
User avatar
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 498 times

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

Post by MrAdults » Sat May 24, 2014 1:51 am

Yeah, you have to put the opacity in the diffuse alpha. You can do it pretty quickly by using rapi.imageResample to resize to the target dimensions, then you just have to copy the channel. You may find that for that purpose using rapi.imageKernelProcess with a Python kernel that simply does the copy into the alpha channel is significantly faster than looping through pixels in Python.

It's long been on the Noesis todo list to make a Noesis Shading Language that allows shaders to be written in a renderer/API-agnostic way and interpreted to the target platform (which would solve all of these pipeline limitations), but doing such a thing nicely and future-proofing it requires more effort than I've had lying around.

swtor miner
beginner
Posts: 23
Joined: Tue Sep 10, 2013 12:05 am
Has thanked: 5 times
Been thanked: 35 times

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

Post by swtor miner » Sat May 24, 2014 9:34 am

While I waited for your response on reflections I looked into how the Scrolling UVs were implemented. I discovered that when the meshname is "multiUvExtraction" it changes how you read the last twelve bytes of vertex data. Normally a 32-byte vertex, the last twelve bytes are formatted in the following way:

Code: Select all

Last 12 bytes:
byte[3]: Three Bytes containing the (x,y,z) normal data
byte: always +1 or -1, unknown function
byte[3]: Three Bytes containing the (x,y,z) tangent data
byte: always +1 or -1, unknown function
float16: specifying the u coordinate for the texture
float16: specifying the v coordinate for the texture
What's different about a multiUvExtraction mesh is that there are 3 sets of UV coordinates for every vertex:

Code: Select all

Last 12 bytes:
float16: specifying the u coordinate for the first texture
float16: specifying the v coordinate for the first texture
float16: specifying the u coordinate for the second texture
float16: specifying the v coordinate for the second texture
float16: specifying the u coordinate for the third texture
float16: specifying the v coordinate for the third texture
The first UV coordinate is for the diffuse texture, the second for animatedTexture1, and the third for animatedTexture2. I dug deeper, and I believe the 16-bit value before the vertexSize in the meshHeader appears to be a bit flag, but I haven't figured it all out yet.

Code: Select all

Bit 1 - Has Vertex Coordinates?
Bit 2 - Has normals/tangent values?
Bit 3 - ??? Only set on non-animated meshes without SUVs
Bit 4 - ??? Only set on SUV meshes

Bit 5 - ??? Only set on SUV meshes
Bit 6 - ??? Only set on SUV meshes
Bit 7 - ???Only set on non-animated meshes without SUVs
Bit 8 - ???

Bit 9 - Dynamic?
Bit 10 - ??? Set on Dynamic and SUV meshes
Bit 11 - ???
Bit 12 - ???

Bit 13 - Placeholder?
Bit 14 - Placeholder?
Bit 15 - Placeholder?
Bit 16 - Placeholder?

303 - Dynamic mesh, bone data, no scrolling UV - 32byte vertex
0000 0011 0000 0011
239 - Scrolling UV mesh no normals or tangents - 32byte vertex
0000 0010 0011 1001
47 - Static mesh w/UV, normals, and tangents no bones - 24byte vertex
0000 0000 0100 0111
1 - collision mesh - 12byte vertex
0000 0000 0000 0001
Here's a low quality video of working Scrolling UVs.
Right now I'm only displaying/animating two out of the three textures, as Noesis only allows 2 UV coordinates to be stored per vertex (regular and lightmap UVs). Can I get a third UV binding per mesh, and a flag to set a material to use it? I'm also having issues getting some of the SUVs to work as they rely on bloom to cover up their texture color it seems. Though the ones that do work, look gorgeous!

ImageImage
ImageImage
You do not have the required permissions to view the files attached to this post.

User avatar
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 498 times

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

Post by MrAdults » Sat May 24, 2014 8:26 pm

You can certainly bind the things as user streams, but Noesis won't actually do anything with them other than pass them through to the exporter in case it wants to do something with them. If/when Noesis gets its own shading language, user stream names will act as potential binding semantics so you can do whatever you want with them regarding vertex/pixel shader effects. Until then, all you get is fixed UV sets and crappy expression evaluators.

swtor miner
beginner
Posts: 23
Joined: Tue Sep 10, 2013 12:05 am
Has thanked: 5 times
Been thanked: 35 times

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

Post by swtor miner » Mon May 26, 2014 12:41 am

I confirmed that the second animated UV texture is a Scrolling UV Mask for the first two textures, and does use the third set of UV coordinates for the Vertex.

Changes:
Fixed Normals and Tangents (I think)
Scrolling UVs are 2/3rds working, only UV masking doesn't work.
SUV's 3rd set of UV coordinates passed through when exporting.
You do not have the required permissions to view the files attached to this post.

TRDaz
mega-veteran
mega-veteran
Posts: 203
Joined: Sat Sep 24, 2011 7:06 pm
Has thanked: 67 times
Been thanked: 24 times

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

Post by TRDaz » Sun Oct 19, 2014 11:02 am

Thanks for the plugin, very helpful, but I was trying to get the textures to load on the models in Noesis, but for some reason it won't. The file path in the xml is correct, ive tried different variants for the file path but still nothing. Any help? :/

swtor miner
beginner
Posts: 23
Joined: Tue Sep 10, 2013 12:05 am
Has thanked: 5 times
Been thanked: 35 times

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

Post by swtor miner » Sun Oct 19, 2014 2:23 pm

TRDaz wrote:Thanks for the plugin, very helpful, but I was trying to get the textures to load on the models in Noesis, but for some reason it won't. The file path in the xml is correct, ive tried different variants for the file path but still nothing. Any help? :/
There's not enough information in the extracted output from EasyMyp to properly reassemble all models. I put in a few hacks that allowed loading of a large portion of the models, but it's never going to work anywhere near 100%.

For this reason, I've also stopped updating this plugin. Work is ongoing on my new modelviewer, but it's not ready for release.

TRDaz
mega-veteran
mega-veteran
Posts: 203
Joined: Sat Sep 24, 2011 7:06 pm
Has thanked: 67 times
Been thanked: 24 times

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

Post by TRDaz » Sun Oct 19, 2014 5:14 pm

Ah ok I see, that's fine then :) Thanks for replying.

User avatar
CriticalError
double-veteran
double-veteran
Posts: 647
Joined: Sun Jul 05, 2009 2:03 am
Has thanked: 85 times
Been thanked: 36 times

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

Post by CriticalError » Sat May 09, 2015 12:43 am

ummm very interesting, any chance to support Metin2 GR2 files? really would be awesome, many thanks buddy.

vertalius
n00b
Posts: 12
Joined: Tue Mar 04, 2014 8:08 pm
Location: Kiev, Ukraine
Has thanked: 3 times
Been thanked: 2 times

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

Post by vertalius » Sat Oct 03, 2015 3:50 pm

Hi there swtor miner!

Any news with your new modelviewer? Or is it dead? I'm waiting for it since you've announced it ))

Post Reply