Aller au contenu

Photo

Announcement: Model scaling tool now available


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

#1
Adinos

Adinos
  • Members
  • 341 messages
Unlike for example the NWN2 toolset, the DA toolset does not support model scaling - that is, you cannot for example take a treasure chest and create an instance of it that looks identical, but is only 10% of the original size for use as a jewelry box.

To get model scaling, you have to create a new version of the model, and I have now added model scaling ability to DATool, allowing you to do just that.

Posted Image

DATool 0.4 can be found here: http://social.bioware.com/project/41/

Note that you can of course combine the scaling with the model retexturing already offered in DATool.

There is a catch (or two), however.

First, I have no idea what will happen in-game if you attempt to scale skinned/animated models this way - turn a bear into a bear cub, for example.   I only know the scaling should work just fine for static models (props, placeables and such).

Second, this is not quite finished - I need to update some collision data in the model PHY files, and until that is done, any rescaled model wil show the same collision behaviour as the original.   This will get fixed in version 0.5.

Modifié par Adinos, 04 décembre 2009 - 01:20 .


#2
JasonNH

JasonNH
  • Members
  • 237 messages
Awesome Adinos!! Thank you, this is a huge advancement for the toolset.

#3
nicethugbert

nicethugbert
  • Members
  • 5 209 messages
NEAT!

#4
Adinos

Adinos
  • Members
  • 341 messages
So....uhm....has anyone tried putting a rescaled model into the game yet?

#5
mikemike37

mikemike37
  • Members
  • 669 messages
Yes, static items worked a charm (rescale and retexture)! As you suspected though, animated models were not a simple case of rescaling the model - looks like work would have to be done on the animation also. I used a bear in a simple override (ignore the wierd colours and bad textures - just see how the bear's shape is warping to meet its animation keyframes):

http://public.mike.f...r-misshapen.jpg

http://public.mike.f...-misshapen2.jpg


#6
Adinos

Adinos
  • Members
  • 341 messages
Yeah...that was kind-of like what I expected...

Posted Image

...but as I said, I had not even tried it - the code was not supposed to handle that. Anyhow, I'll have a new version of my tool out soon - it has some minor changes, like saving all the texture files, not just the diffuse one, and it should also scale the collision info in the phy file.

As for scaling of skinned/animated models....I'll see what I can do.

Modifié par Adinos, 11 décembre 2009 - 03:11 .


#7
TimelordDC

TimelordDC
  • Members
  • 923 messages
This is a great tool, Adinos.



I suggest making a post in the Toolset Custom Content and/or Toolset General Discussion for visibility and also adding this to the list of player-made tools in the wiki.

#8
Adaram

Adaram
  • Members
  • 464 messages
Awesome job Adinos! Superb initiative!! This will be much appreciated by the modding community!

#9
Jain-Mor

Jain-Mor
  • Members
  • 21 messages
Am I missing something?? I can rescale a prop fine, but I don't know how to get it into the area editor in the toolset to place it in my mod. Do I have to save in a certain place? Certain way to import it with in the toolset (the only one i can see is "import selected")? Or do you have to change the format of the files to .SEL as that seems to be what all the models are made from



Anyhelp would be great, thanks

#10
Adinos

Adinos
  • Members
  • 341 messages
See this thread: http://social.biowar...72/index/320619 - start at step 4.

However, it would be really, really nice if someone would write up a nice tutorial on how to make new models accessible in the toolset - regardless of whether those new models are made by importing them from some 3D program, or by retexturing or scaling existing models with DATool.

I'm not very good at writing tutorials myself.

Modifié par Adinos, 12 décembre 2009 - 10:08 .


#11
Adinos

Adinos
  • Members
  • 341 messages
I just released version 0.5. It fixes the issue I mentioned above - collision shapes in the .PHY file will now get scaled as well...



...well, almost - there is one exception. Collision shapes are generally of a simple shape (box, sphere and so on), but there is one shape that is irregular, and in that case the PHY file includes a "cooked data stream" describing the shape. I am ignoring that for now.



As for scaling skinned/animated models - I am working on that, and I have already made some changes which should make at least some models behave a bit better than before. If anyone wants to help, try scaling some creatures and tell me what happens - even if it is just funny, misshapen and stretched creatures.

#12
Jain-Mor

Jain-Mor
  • Members
  • 21 messages
Thanks :) great tool!

#13
Primogenitor

Primogenitor
  • Members
  • 24 messages
Has anyone tried items? If a sword is super-sized, does the animation respect that?

#14
ChewyGumball

ChewyGumball
  • Members
  • 282 messages
The item is not animated, the thing holding it is.

#15
FalloutBoy

FalloutBoy
  • Members
  • 580 messages

mikemike37 wrote...

Yes, static items worked a charm (rescale and retexture)! As you suspected though, animated models were not a simple case of rescaling the model - looks like work would have to be done on the animation also. I used a bear in a simple override (ignore the wierd colours and bad textures - just see how the bear's shape is warping to meet its animation keyframes):
http://public.mike.f...r-misshapen.jpg
http://public.mike.f...-misshapen2.jpg


It is possible that all you need to do is rescale the skeleton to the same proportion as the model. If the skin weights stay the same, then it is possible that it may just work. As long as the animation only has rotation information, they may work fine with a rescaled skeleton.

#16
ChewyGumball

ChewyGumball
  • Members
  • 282 messages
Skeletons are stored using relative coordinates. It is harder to scale than the verts of the model. Also, the quaternions for rotation are also based on relative coordinates, so they would need to be recalculated as well :(((

#17
Adinos

Adinos
  • Members
  • 341 messages
quaternions are a pain in the ****



Anyhow, I am on vacation at the moment - just logged in briefly from an internet cafe on the beach...so I am not doing any development at the moment. I am, however, wondering how DATool 0.5 works (the screenshot of the "stretched" bear were created with a model scaled with 0.4, but I made some changes in 0.5 which might change things.



So, if anyone is willing to scale a creature or two and share the experience, it should help me figure out what I need to to once I get back home.

#18
mikemike37

mikemike37
  • Members
  • 669 messages
Apologies for the delay in testing this (been very busy lately), but I am the bearer of largely excellent news... whatever youve done in 0.5 has fixed scaling creatures and their animations tremendously!

One slight gripe, however - and this may be something I'm doing wrong if i need to replace some low-LOD model or something... but what I've done is scaled down the shriek's body, head and eyes models and placed them in a large room. from a distance, there seemed to be no difference (had i done something wrong?) however, when the player gets close, they switch to their correct size. any ideas whats causing this?

picture shows shriek with head and eyes all moving together as one miniature form (yay!) alongside a slightly further away shriek whose size *should* be smaller, but isnt.

Posted Image

#19
tmp7704

tmp7704
  • Members
  • 11 156 messages

mikemike37 wrote...

One slight gripe, however - and this may be something I'm doing wrong if i need to replace some low-LOD model or something... but what I've done is scaled down the shriek's body, head and eyes models and placed them in a large room. from a distance, there seemed to be no difference (had i done something wrong?) however, when the player gets close, they switch to their correct size. any ideas whats causing this?

The LoD could be explanation for that, yes. The models come in 2-3 versions, the closest/highest LoD mesh has "_0" at the end of the name, the versions intended for farther distances tend to have "_2" and "_3" at the end.

Modifié par tmp7704, 31 décembre 2009 - 01:21 .


#20
Adinos

Adinos
  • Members
  • 341 messages
Indeed - seems you need to scale all the different LOD version - as I said before, I'm on vacation at the moment, but in my tool you can switch"LOD mode" on or off, and that controls whether you see just the highest LOD version or all of them.



If you scale all the versions identically, the above problem should go away....



And yes - thanks for testing this....I'm unable to do that at the moment, as I mentioned.

#21
Lotion Soronarr

Lotion Soronarr
  • Members
  • 14 481 messages
You what this tool needs? Scaling on a per axis basis.

I want to make the axes and swords less thick and broad, but leave their current length.

#22
Adinos

Adinos
  • Members
  • 341 messages
Ah, yes...I had planned that, and even (partially) implemented, but there is a bit of a problem. I would need to recalculate the normals, tangents and binormals. Now, the math for that isn't too bad, but I also need to recalculate the quternions, and when I tried to figure that out, my head just started spinning.



For now you will have to export to a 3D tool, do non-uniform scaling there and re-import.

#23
mikemike37

mikemike37
  • Members
  • 669 messages

Adinos wrote...

Indeed - seems you need to scale all the different LOD version - as I said before, I'm on vacation at the moment, but in my tool you can switch"LOD mode" on or off, and that controls whether you see just the highest LOD version or all of them.

If you scale all the versions identically, the above problem should go away....

And yes - thanks for testing this....I'm unable to do that at the moment, as I mentioned.


awesome, ill try that. and thanks again for the great tool!