Page 1 of 1

Player model, shine, glow and cloth tutorials?

Posted: Sat Apr 12, 2008 4:11 am
by Apocalypse_GOD_Radu
Apparently the Universe hates me. I can’t find a good st8 forward tutorial on anything related to BF2, or is it just me?

The doc’s that come with ModTools don’t have many examples.

For example:

1. Unit Tutorial. A tutorial that assumes you have your models, textures, tools and you’re ready to get them into BF2. If I simply export my model to a .msh file. How would I know if the mesh it’s animated and stuff like that.

2. Shine and Glow Tutorial. How do I make my unit Shine/Reflect/Glow?

3. Cloth Tutorial. How do I make a part of the mesh (any part I want) behave like cloth, without going through my mesh and reacting to wind in game?

Please help cause all other major BF2 forums appear dead. You people are my only hope.
I guess if this post doesn’t work I just star emailing every person good in moding. :cpu:

Re: Let’s make the World better!

Posted: Sat Apr 12, 2008 4:44 am
by Fingerfood
I'd suggest posting this in the SWBF2 Modding section, but here goes.


1. There is a tutorial on this I believe. Try searching (with the Search button :roll:) and see what you can find.

2. I believe this has something to do with the Alpha Channel. I've never modelled anything, but that should work.

3. I believe it's impossible to make cloth behave like that. And why would you want it to be cloth if not for that? :?


Hope this helps! And we are one of the only real SWBF2 modding sites that still thrives. :D
And welcome to GT! gtpwn

Re: Let’s make the World better!

Posted: Sat Apr 12, 2008 8:20 am
by Apocalypse_GOD_Radu
Sorry about posting in the wrong place but my main question was about modeling especially about XSI to BF2, any way sorry … :bowdown:

1. Searching…

2. THX

3. I meant cloth that reacts to motion and weather. The thing I had in mind was a dress, like Revan’s. Is there a way to simulate that?


All the points (2-7) depend on no.1. If I can’t get a st8 forward way to get the models into the game all the rest don’t matter… So I better start searching.

KOTOR would look cool played in an Action game play stile.

Re: Let’s make the World better!

Posted: Sat Apr 12, 2008 11:21 am
by Maveritchell
1. Unit Tutorial. A tutorial that assumes you have your models, textures, tools and you’re ready to get them into BF2. If I simply export my model to a .msh file. How would I know if the mesh it’s animated and stuff like that.
There are varying degrees of "ready-" you're going to have to be more clear on this one. It sounds like you might have a new model you're trying to get ingame? Let us know.
2. Shine and Glow Tutorial. How do I make my unit Shine/Reflect/Glow?
This you'll need to add environmental mapping to your model - in XSI, if it's new, if it's not, it might be easier to hexedit this on. RepSharpshooter's your man in that case, he's already got a set of models with the envmaps hex'd on.
3. Cloth Tutorial. How do I make a part of the mesh (any part I want) behave like cloth, without going through my mesh and reacting to wind in game?
You're gonna need to change the properties of the mesh part in XSI and then reexport if you're hung up on doing this with a part of a mesh you've already made. If you're looking for a quicker, dirtier way, you can use preexisting BF2 cloth pieces and just hexedit them on.


Welcome to GT. A note for the future, it'll probably be easier for you if you address individual issues one or two at a time, instead of seven at a time.

Re: Let’s make the World better!

Posted: Sat Apr 12, 2008 11:33 am
by AceMastermind
1. How to get a player model from XSI to BF2:
Hidden/Spoiler:
[quote="Vyse"]Here is my tutorial on how to get your mesh into SWBF2. Remember you will need to download pysch0fred's bones first! Please post any questions or answers that I can add to the tutorial. I think you need MSWord to open it... I have no clue what you will have if you open it with Word Pad.

DOWNLOAD UNIT TUTORIAL
Tutorial Link

DOWNLOAD BONES
http://www.secretsociety.com/forum/down ... e_Beta.zip[/quote]
2. Applying specular lighting to models (for shine/reflection):
Hidden/Spoiler:
[quote="Vyse"]Here is a quick tutorial on how to apply specular lighting to your models. It adds a real time light glare onto your models. This really makes your models look great!

I have not tested the flag on a object, just a player model and weapon.

Before starting the steps what I have found so far is that it appears you can't have the mesh have more than 1 texture on it. The mesh can only pull from 1 texture. However, I'm still testing this so maybe there can be more. Also I havn't removed the sun flare from my .fx file so I don't know if there has to be a flare or not but right now I have a sun in the map and it works.

Instructions:

1)Make sure your global lighting placed in Zero Editor has the "Cast Specular" on yes

2)Using the Battlefront 1 edit flag, select your polygons with the U key, (Basicly just ctrl+A to select all the polys) then open the edit flag dialog box. Scroll down to Render Specular under the Render Types and hit ok. You do not need to call out a texture or anything.

3)Munge the map and your done.

Options:
You can adjust the angle of your placed light in Zero Editor to change when the light hits on the mesh.

The ending effect is below. The pic are from looking in different directions, you can see the lighting has changed.

Image[/quote]

3. How to setup cloth in XSI:
Hidden/Spoiler:
[quote="AceMastermind"]First off create your character and cloth object and texture them or do whatever you have to do.
Make your cloth object a child of "dummyroot".
Then envelope your character mesh to the bones and edit the weights.

Now envelope your cloth object.
If you made a cape and it drapes down from the neck area just envelope the cape object to both left and right clavicle bones or maybe just the neck bone, play around with it to get the best results ingame.
If you made a kama then just envelope it to the pelvis bone.
This is so the cape object will follow your unit properly, such as when jumping, rolling, crouching and so on.

Now we need to make some cloth collision, go to:
Get>Primitive>Polygon mesh>sphere or cylinder(i've seen both used by Pandemic)
and scale it down with the PPG to keep the primitive properties then translate it into place, do not freeze their transforms, add as many spheres/cylinders as you think you need to keep the cloth from flowing through the legs, body, and torso.
Rename your cloth collision spheres c_somename, c_somename1 and so on or whatever and make them a child to the bone that you want them to move with.
Most of the shipped cloth collision primitives made by Pandemic were named after the bone that they move with, such as:
c_ribcage, c_l_thigh, etc....

Now select your cloth object and go to the "Pandemic Tools" and click on "Create Cloth".
A property page(ppg) will come up.
At the top of the ppg you will see a section titled "Collision", in that section you will also see a button that says "Select Collision Objects", press that button and a picking session will begin.
Select all of your cloth collision primtives(ex: c_whatever) then right click to end the picking session.

Now with the ppg still open you will see another section titled "Fixed Points".
Fixed points are the vertices on the cloth object that will attach to the player model, in other words these are the vertices that will ignore the cloth properties(deformation) making it look like the cloth is attached to the player.
For example, if you're making a cape that starts around the neck just select the top row of vertices on the cape object and that will be the fixed portion of the cape.

Close the ppg and you're done, hide(press H on your keyboard) your hp_weapons, bones, dummyroot, sv model, and collision primitives then branch select(middle mouse click) dummyroot and export your model giving it a name and save destination.

Now you need to set up the cloth ODF, just copy one from the assets and rename it to whatever the name of your cloth object was in XSI.
Inside that cloth ODF enter the mesh name of your exported unit:
attachedmesh = "name_of_exported_mesh " (without the ".msh" part appended)

Don't forget to enter the code in the unit's ODF to enable the cloth ingame:
ClothODF = "name_of_your_cloth_ODF"

I also noticed that the more polygons that your cape has then the better it will deform ingame, but there are a few properties you can add to the cloth ODF to make it deform how you want.

From the docs:

There are other properties that you may have in a cloth ODF – we have rarely had occasion to use them, but they are:
(Note that [parameter] means a number, like 20.4, not [20.4])

// ---list of optional cloth parameters---

// Angle of the wind, phi and theta
WindDirection = “[angle1 in degrees] [angle2 in degrees]”

// Wind speed, in m/s
WindSpeed = [speed]

// Dampening coefficient – in some unit or other :^) Default is 0.5
Dampening = [number]

// Drag coefficient, also in some unit – default is -2.0
Drag = [number]

// Mass of each cloth “particle” (in Kg?) – default is 1.0
ParticleMass = [number]

// Maximum world acceleration, in m/s/s – default is 20
MaxAcceleration = [number]

// Priority – cloth with lower priority is skipped,
// if not enough time is left this frame – used for the Emperor
// Default is 0
Priority = [number]

// Does this cloth have an alpha channel? 1 or 0, Default is 0
Transparent = [value]

// BF2 has 3 different types of constraints it satisfies each frame
// when computing the cloth:
// “Bend” constraints keep the cloth’s shape.
// “Stretch” constraints keep the cloth’s size.
// “Cross” constraints keep individual pieces of cloth from shearing.
// You can turn these on or off individually by specifying a
// zero for the constraint.
// For example, if you turn off “stretch” constraints the cloth
// can grow longer or shorter…
CrossConstraint = [zero or one]
BendConstraint = [zero or one]
StretchConstraint = [zero or one][/quote]

Re: Let’s make the World better!

Posted: Sat Apr 12, 2008 12:12 pm
by Apocalypse_GOD_Radu
Thank You! :bowdown:

Re: Let’s make the World better! (XSI related questions)

Posted: Sat Apr 12, 2008 12:29 pm
by MandeRek
Welcome to GT :)

It seems you must have some modding experience, or moddeling, since you've stated some questions there, which also took this community some time to find out! If you need ANYTHING about XSI, you can always ask us, also me, but unfortunately Ace(the)Mastermind was just before me :P

My inbox is open ;)

Re: Let’s make the World better! (XSI related questions)

Posted: Sat Apr 12, 2008 3:21 pm
by FragMe!
For item 3, making any part of you model react like cloth here is one thing the tutorial doesn't mention.

When you set polies to cloth via the pandemic cloth flags it removes them (visibly) from the model which means if you do not set up a cloth for the model in all the proper odfs etc all those cloth bits won't be seen.

Example for any clone that has a skirt on it if you remove the cloth line from the units odf the skirt will go away even though it is still part of the units msh it is just not visible.

Re: Let’s make the World better! (XSI related questions)

Posted: Sat Apr 12, 2008 3:33 pm
by AceMastermind
FragMe! wrote:For item 3, making any part of you model react like cloth here is one thing the tutorial doesn't mention.

When you set polies to cloth via the pandemic cloth flags it removes them (visibly) from the model which means if you do not set up a cloth for the model in all the proper odfs etc all those cloth bits won't be seen.

Example for any clone that has a skirt on it if you remove the cloth line from the units odf the skirt will go away even though it is still part of the units msh it is just not visible.
AceMastermind wrote:Don't forget to enter the code in the unit's ODF to enable the cloth ingame:
ClothODF = "name_of_your_cloth_ODF"

Re: Let’s make the World better! (XSI related questions)

Posted: Sat Apr 12, 2008 4:39 pm
by FragMe!
^^ Yup I was just saying if he decided not to use cloth those bits would disappear, which is not a big deal for just a cape, but it sounded like he wanted to do more than a cape.