Aller au contenu

Photo

[dev request] .msh files in DA2 -- change to format of normal/tangent vectors?


  • Veuillez vous connecter pour répondre
11 réponses à ce sujet

#1
tmp7704

tmp7704
  • Members
  • 11 156 messages
Well, the last request didn't quite work, let's try another Posted Image

There seems to be some changes in how the normal and tangent vectors are stored in DA2 .msh files:

* the binormal vector data is no longer present. This ain't a biggie, but the other one can be:
* the normal vectors appear to be compressed into 0-1 range, meaning the actual vector is: source_vector * 2 + (-1, -1, -1) and when producing a mesh it's the opposite: vector_in_file = original_vector / 2 + (0.5, 0.5, 0.5)
* the tangent vectors are compressed like the normal vectors

is this correct?

#2
daywalker03

daywalker03
  • Members
  • 357 messages
Compressed, you say? Interesting. The mesh version number is also different; DA2 meshes are Version 1.0, whereas DAO meshes were Version 0.1.

#3
tmp7704

tmp7704
  • Members
  • 11 156 messages
Well, compressed in the sense the vector component values cover smaller range. I'd guess it has to do with getting higher precision for the float numbers this way.

Modifié par tmp7704, 14 mars 2011 - 12:33 .


#4
Thought Process

Thought Process
  • Members
  • 191 messages
The correct term is normalized, not compressed.

#5
tmp7704

tmp7704
  • Members
  • 11 156 messages
That's bit tricky when it comes to vectors, since normalized vector means vector with length of one unit, and you can have easily normalized vectors with negative components :) DAO is example of that actually, since both the normal and tangent vectors in DAO meshes are also normalized, but use different storage scheme.

Modifié par tmp7704, 14 mars 2011 - 12:43 .


#6
Thought Process

Thought Process
  • Members
  • 191 messages
No, the value itself is normalized, not the vector.

(I'll be honest here: I know little of model data formats, I just know the term is 'normalized <data type>' from DirectX docs, ie D3DDECLTYPE_SHORT4N) from my experience with shader hacking. :)

Modifié par Thought Process, 14 mars 2011 - 12:45 .


#7
tmp7704

tmp7704
  • Members
  • 11 156 messages
Ahh; okay if you put it this way yes, this can work.

#8
daywalker03

daywalker03
  • Members
  • 357 messages
I'm trying to figure out how NewByPower's Python scripts work so I can update DragonBlender to work with the DA2 mesh format. I'll see what they use for the vectors and work from there; hopefully I can get them to play nice.

#9
Dishwasha

Dishwasha
  • Members
  • 1 messages
Does anyone know what kind of professional modeling tools were made to make the DA2 models?

#10
daywalker03

daywalker03
  • Members
  • 357 messages

Dishwasha wrote...

Does anyone know what kind of professional modeling tools were made to make the DA2 models?


3DS Max or Autodesk Maya, with proprietary plugins that Bioware can't release for us to use. The community has made custom versions that work for DAO, but those don't yet work for DA2.

#11
tmp7704

tmp7704
  • Members
  • 11 156 messages
From the glimpses in various trailers (as well as what the artists working on ME said in some technical interviews) bulk of detail work seems to be done in ZBrush or similar tool.

#12
daywalker03

daywalker03
  • Members
  • 357 messages

tmp7704 wrote...

From the glimpses in various trailers (as well as what the artists working on ME said in some technical interviews) bulk of detail work seems to be done in ZBrush or similar tool.


Yes; zBrush is ideal for making decent normal maps, and the exported obj file can be imported into Max for export into the xml format that is converted to the actual mesh.