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

Heroes of Might and Magic 6

Post questions about game models here, or help out others!
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: Heroes of Might and Magic 6

Post by finale00 »

Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: Heroes of Might and Magic 6

Post by Demonsangel »

Karpati wrote:Demonsangel,

If you would you like, I can share the way how can I get the correct bone positions...
Seeing as how they don't seem to be in rad either, yes please. :D

Edit: I only now realised you're the creator of 3d Object Converter. (:
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: Heroes of Might and Magic 6

Post by Demonsangel »

Script updated for Emissive materials.

Todo:
fix bones
animations
normals
revert back to pre- rapi.imm code
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: Heroes of Might and Magic 6

Post by finale00 »

Hmm, seeing your imm code makes me want to go try it out again, since you got it work and all lol
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: Heroes of Might and Magic 6

Post by Demonsangel »

finale00 wrote:Hmm, seeing your imm code makes me want to go try it out again, since you got it work and all lol
It might just be me but it seems as if the imm code is 10-20 times slower than the rapi.rpgBind .
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: Heroes of Might and Magic 6

Post by finale00 »

Having to construct the buffers by taking the existing buffers and making it per-vert might also take up some time.
I'd prefer some C++ code take in some per-face buffers and convert it to per-vertex buffers though if they don't already exist!

But, 10-20x lol I didn't think python overhead would be that big.
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: Heroes of Might and Magic 6

Post by Demonsangel »

Yeah, but the only reason I was doing it was because, when I was messing with the emissive materials, I swapped from bindUV2 to immLMUV and I rewrote my script during that time so I rewrote it completely to imm.
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: Heroes of Might and Magic 6

Post by finale00 »

Oh I just realized you were using the new imm API that was added recently.
Gotta try that out lol

EDIT: oh, it looks like there's no bindLMUV function...

I think if you re-factored the create_model function you might be able to get more out of it. The triple for-loop would likely bog you down.
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: Heroes of Might and Magic 6

Post by Demonsangel »

finale00 wrote:Oh I just realized you were using the new imm API that was added recently.
Gotta try that out lol

EDIT: oh, it looks like there's no bindLMUV function...

I think if you re-factored the create_model function you might be able to get more out of it. The triple for-loop would likely bog you down.
Use "rpgBindUV2Buffer" for LMUV.

Those loops will vanish when I go back to the old method.
Antonkf
n00b
Posts: 15
Joined: Sat Feb 18, 2012 6:47 pm
Has thanked: 3 times

Re: Heroes of Might and Magic 6

Post by Antonkf »

The updated script generates an error in Noesis. I tried to open the same Sarah that the previous version of the script opened normally.
Karpati
ultra-veteran
ultra-veteran
Posts: 467
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 95 times

Re: Heroes of Might and Magic 6

Post by Karpati »

Demonsangel wrote:Seeing as how they don't seem to be in rad either, yes please. :D
Edit: I only now realised you're the creator of 3d Object Converter. (:
I returned to my home now.

The missing information:

10 bytes (unknown)
3x4 floats (X,Y,Z positions)
3x4 floats (scale factors ?; usually about 1.0; I don't use these values)
4x4 floats (Quarternion X,Y,Z,W values)
25 bytes (unknown)
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: Heroes of Might and Magic 6

Post by Demonsangel »

Antonkf wrote:The updated script generates an error in Noesis. I tried to open the same Sarah that the previous version of the script opened normally.
What error? The script runs fine for me.
Make sure your Noesis is up to date, there was a minor bugfix which was needed for the emissive materials.

@Karpati, ty I'll try it that way.
Antonkf
n00b
Posts: 15
Joined: Sat Feb 18, 2012 6:47 pm
Has thanked: 3 times

Re: Heroes of Might and Magic 6

Post by Antonkf »

Looks cool! Thanks for the explanation. With updated Noesis works fine :)
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: Heroes of Might and Magic 6

Post by Demonsangel »

Karpati wrote:
Demonsangel wrote:Seeing as how they don't seem to be in rad either, yes please. :D
Edit: I only now realised you're the creator of 3d Object Converter. (:
I returned to my home now.

The missing information:

10 bytes (unknown)
3x4 floats (X,Y,Z positions)
3x4 floats (scale factors ?; usually about 1.0; I don't use these values)
4x4 floats (Quarternion X,Y,Z,W values)
25 bytes (unknown)
How are you parenting your bones?
You are using the data which I first thought to be bonedata (I'm assuming this because of the extra 25 unknown bytes) but I couldn't find any parenting data for them and using these as absolute offsets didn't work either.
Atleast with the data I was using before I achieved something that looked like an armature.

I assume with 3x4 floats you mean 3 floats (length 4 bytes)

This is with first 3 floats = x,y,z
ignore next 3 floats
4 floats = noeQuat(x,y,z,w)
no parenting, absolute offsets
Image
Karpati
ultra-veteran
ultra-veteran
Posts: 467
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 95 times

Re: Heroes of Might and Magic 6

Post by Karpati »

You have right, when I wrote these lines I was tired.

The correct datas are the followings:

10 bytes (unknown)
3x4 bytes floats (X,Y,Z positions)
3x4 bytes floats (scale factors ?; usually about 1.0; I don't use these values)
4x4 bytes floats (Quarternion X,Y,Z,W values)
25 bytes (unknown)


I did not find the parent information yet.

I used the following procedure to get the bone position:

- I did put the X,Y,Z positions to Matrix_1
- I 'converted' the Quarternion X,Y,Z,W values to Matrix_2
- Bone matrix=MatrixMultiply(Matrix_1,Matrix_2)
- I ripped the X,Y,Z positions from the Bone matrix and multiplied these values by '-1'
Post Reply