Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: Some .X Files question (animation between files + Mesh Changing)  (Read 4395 times)

0 Members and 1 Guest are viewing this topic.

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Some .X Files question (animation between files + Mesh Changing)
« on: December 27, 2008, 02:37:55 AM »

Hi...

A couple of questions about .X file use.

1)

I know that you are able to change textures on a .X file in a live scene. So for example you can put on a new shirt and the script changes the png that is loaded on the .X file and it will instantly change in front of the players eye.

I was wondering can you do this for actors themselves. As in is there a way, with out changing the scene, to have a new Actor load onto screen in the exact same position as the old one....

EG:- You are wearing Pants and a Shirt and boots. You then put on a dress. A dress needs a different 3D model to pants.

I know though scripting that you can get actor position and direction. So it shouldn't be hard to load a new actor into the correct position for when you put on the dress, but as far as I know you need to load all the actors when the scene loads. If you can load a 2nd actor file but not have it display in the scene, and then remove one and activate the other.. maybe it could be done that way..., but can it be done in front of the players eye?

If you can not get the model to change in front of the user, could you do it with say, something like the character goes behind an object (for modesty sake) to change, then when you walk back out you are seeing the new model?.. the point is can you change the model with out re-loading the scene.

Any ideas?

2)

You know how you can load different animations though separate .X files onto a main actor .X file. How exactly dose this work? I assume it simply takes the transform information on the bones and applies it to the .X file you have loaded.

Would this mean that if I had different models, that used the same rig, so all the bones are exactly the same, but use a different Skin set up on the mesh itself... would these all still be transferable?

EG:- Pants vs Dress. You could build a skeleton rig that is exactly the same that would drive both models even though they are different meshes. But the Dress would have a very different vertex weighting skin to that of the pants.... if only the transform data is shared this should not be a problem. (dose this make sense?)


Thanks in advance.
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe

Silverbristle

  • Supporter
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 9
    • View Profile
    • Wisdomspiral
Re: Some .X Files question (animation between files + Mesh Changing)
« Reply #1 on: December 27, 2008, 06:25:40 AM »

I have wondered about many of the same questions you have asked about.

What you can do in terms on changeing an actors appearance depends entirely upon what the particular game engine supports.

The simplest way may be to model a character and then use an image map that uses the alpha channel. For example you have a character
with pants and a long dress mesh over the top that reaches the ankles, but the dress mesh part is totally invisible because of the alpha channel. Then when you change
clothes you simply change to a texture that has a long dress drawn in.

If you were planning to use seperate mesh parts to add to the original mesh this would be more difficult as you would need to have support for parenting meshes at the very least. I don't know if wintermute engine supports that someone else might know.
Logged

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: Some .X Files question (animation between files + Mesh Changing)
« Reply #2 on: December 27, 2008, 09:01:41 AM »

Yea. This is an option, for the example i stated above.... but what if you wanted to turn your character into a bear or a chicken or something? Also there are still some problems with using opacity maps. The example I stated was only a theoretical question... in my game (it is a magic kind of game I suppose similar to kings quest) I will be running the game toon into totally diffrent toons - eg.. human woman into a big troll...

If you were planning to use seperate mesh parts to add to the original mesh this would be more difficult as you would need to have support for parenting meshes at the very least. I don't know if wintermute engine supports that someone else might know.

WME supports having seperated meshg object in the .X file with diffrent texture maps on them, even if they are grouped inot teh same skin deformation set...eg.. a body, and a seperate object for hair)
« Last Edit: December 27, 2008, 09:04:59 AM by Jyujinkai »
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Some .X Files question (animation between files + Mesh Changing)
« Reply #3 on: December 27, 2008, 10:04:32 AM »

I was wondering can you do this for actors themselves. As in is there a way, with out changing the scene, to have a new Actor load onto screen in the exact same position as the old one....
Yes, you can load and unload actors at any time (using Game.LoadActor3D(), Game.DeleteObject()). It's not related to scenes at all. Remember, though, that depending on complexity loading an actor can take some time.

You know how you can load different animations though separate .X files onto a main actor .X file. How exactly dose this work? I assume it simply takes the transform information on the bones and applies it to the .X file you have loaded.
Yes, that's exactly how it works. One X file defines the mesh(es), all the additional X files only contribute animations.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: Some .X Files question (animation between files + Mesh Changing)
« Reply #4 on: December 27, 2008, 05:59:42 PM »

The simplest way may be to model a character and then use an image map that uses the alpha channel. For example you have a character
with pants and a long dress mesh over the top that reaches the ankles, but the dress mesh part is totally invisible because of the alpha channel. Then when you change
clothes you simply change to a texture that has a long dress drawn in.

just tested this.. works fine.
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe
 

Page created in 0.083 seconds with 23 queries.