Page 41 of 74

Re: [WIP] Grimrock Model Tookit

Posted: Fri Nov 02, 2012 1:45 am
by Neikun
Juicy.
Thanks, John!

Re: [WIP] Grimrock Model Tookit

Posted: Fri Nov 02, 2012 1:50 am
by JohnWordsworth
Quickest release bump ever... Have just released 0.4.0.1 which actually draws the axis in the colours that are displayed in the status bar! Just to confirm, Y is up!

Re: [WIP] Grimrock Model Tookit

Posted: Fri Nov 02, 2012 3:06 am
by Komag
nice update! I'll use it a lot tomorrow, headed to bed now

Re: [WIP] Grimrock Model Tookit

Posted: Fri Nov 02, 2012 1:16 pm
by Phitt
Hey, it's me again. And I have problems! Yay!

Seems like the tangent space updating is still messed up (for me and my models that is). After updating all models with the new tangent space calculation I noticed that the normal maps face in the wrong direction, as can be seen here:
SpoilerShow
Image
Normally the dots should face outwards, like on the floor tile directly in front of me (the one I outlined with a red line). I imported and calculated tangent space on that one with the Assimp importer. The other floor tiles have the dots facing inwards though.

I can only assume it has something to do with the object export settings I used since from all I can tell it doesn't happen if you calculate tangent space on the original models. Any ideas what might be wrong? It would really be a painful experience if I had to export (and find...) all the 40+ models again, so if there is a chance you could fix it somehow I would be glad. It didn't happen with the old tangent space calculation.

On a side note, I tried to install one of the earlier GMT versions to try the old tangent calculation to have a comparison between the three (old/new/Assimp), but apparently the uninstaller doesn't uninstall the toolkit properly. Whenever I try to install a version below ~3.0 I get an error that says the toolkit is still installed. I uninstalled it using the uninstaller and made sure the 'John Wordsworth' folder is deleted. Guess there is something left in the registry or somewhere else?

Re: [WIP] Grimrock Model Tookit

Posted: Fri Nov 02, 2012 2:30 pm
by JohnWordsworth
I've just noticed that the Assimp Calculate Tangents code is exceptionally documented. I should be able to essentially re-write it in C# in no time. Lets see if that fixes the problem :).

Edit: Mind you - I'm sitting at my desk with a runny nose and a headache - so it might not be today!

Re: [WIP] Grimrock Model Tookit

Posted: Fri Nov 02, 2012 2:37 pm
by Phitt
JohnWordsworth wrote:I've just noticed that the Assimp Calculate Tangents code is exceptionally documented. I should be able to essentially re-write it in C# in no time. Lets see if that fixes the problem :).

Edit: Mind you - I'm sitting at my desk with a runny nose and a headache - so it might not be today!
What? Not today? You're fired! :lol:

Sounds great (the part about the Assimp code, not the headache), hope you get better soon!

EDIT: Just recalculated tangents on the Assimp imported model and the normal map flipped as well, so it doesn't happen with the object imported models only. But I guess that doesn't matter anymore.

Re: [WIP] Grimrock Model Tookit

Posted: Fri Nov 02, 2012 3:26 pm
by JohnWordsworth
Of course, it's all about managing expectations... I've updated the tangent generation code with an additional 'direction check' that I pinched from the Assimp code. Please let me know how you get on with this for tangent generation: GMT Download Page.

Ah yeah, about going back and installing old versions - I'm using the free version of the Install Shield (LE), so I expect I've not put some settings in there correctly, or Install Shield is leaving some mess in the registry :-s.

Re: [WIP] Grimrock Model Tookit

Posted: Fri Nov 02, 2012 3:38 pm
by Phitt
JohnWordsworth wrote:Of course, it's all about managing expectations... I've updated the tangent generation code with an additional 'direction check' that I pinched from the Assimp code. Please let me know how you get on with this for tangent generation: GMT Download Page.

Ah yeah, about going back and installing old versions - I'm using the free version of the Install Shield (LE), so I expect I've not put some settings in there correctly, or Install Shield is leaving some mess in the registry :-s.
Hehe, thanks.

Unfortunately it doesn't work. Still flipped normal maps. :(

EDIT: I could prepare a package with a 'wrong' floor tile, a correct one and the texture I use for testing if that helps.

Re: [WIP] Grimrock Model Tookit

Posted: Fri Nov 02, 2012 3:43 pm
by JohnWordsworth
Sorry, just to be clear - is the 'Calculating Tangents and Bitangents' option flipping the normal map? Or is this a problem with newly imported or old files you are loading back into the GMT? It would be easy for me to add a 'Flip All Normals' button to the editor if that's the only apparent problem?

EDIT: Oh, hang on - I've been an idiot (told you I was ill ;)). I've not written back the new tangent/bitangent data to the mesh at the end of my new routine. Doh!

Re: [WIP] Grimrock Model Tookit

Posted: Fri Nov 02, 2012 3:47 pm
by Phitt
JohnWordsworth wrote:Sorry, just to be clear - is the 'Calculating Tangents and Bitangents' option flipping the normal map? Or is this a problem with newly imported or old files you are loading back into the GMT? It would be easy for me to add a 'Flip All Normals' button to the editor if that's the only apparent problem?
It's apparently a problem with the 'calculating tangents and bitangents' option. Object models I imported had correct normals with the old tangent space calculation (apart from not being 100% perfect, but they were facing in the right direction), Assimp models imported using the Assimp tangent calculation option also have correct normals. But when I run the new tangent space calculation of the toolkit on any of them the normal maps get flipped.