|
Flat shading for models!!!
#223597
08/25/08 11:03
08/25/08 11:03
|
Joined: Aug 2006
Posts: 128 Papua New Guinea
Impaler
OP
Member
|
OP
Member
Joined: Aug 2006
Posts: 128
Papua New Guinea
|
Hi all, being a game artist and not a shader programmer, I just want to make my models look good in the game, and often that requires them to be flat(solid) shaded. By default gamestudio blends the normal values to create a smooth shaded model, but for a vehicle or building, obviously you want to make it look like it's made of metal or cement, not jelly. The only way around this I have found is to seperate the desired face (so there are no normals around it to blend), but for a cube, this triples the amount of vertices besides being very time consuming. Do any of you have a shader/material(whatever!) that I can apply that will give me these hard edges?
Murphey's Law: << if anything can go wrong, it will >> (Murphey was an optimist).
|
|
|
Re: Flat shading for models!!!
[Re: Altimeter]
#223659
08/25/08 18:26
08/25/08 18:26
|
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B
Expert
|
Expert
Joined: Feb 2006
Posts: 2,185
|
you can apply a shader to only certain parts of a model, just use a seperate skin and apply the fx file to the skin in med. That way only certain parts would have gourad shading, but i'm not sure it would make the hard edges you want, it might even look a bit odd when rendered...
- aka Manslayer101
|
|
|
Re: Flat shading for models!!!
[Re: mpdeveloper_B]
#223706
08/26/08 06:05
08/26/08 06:05
|
Joined: Aug 2006
Posts: 128 Papua New Guinea
Impaler
OP
Member
|
OP
Member
Joined: Aug 2006
Posts: 128
Papua New Guinea
|
you can only enable or disable gouraud shading for the whole model.
Ventilator, how do you switch gouraud shading on or off for the whole model then? That's really all I'm interested in for now - I do use blender for all my models and if I need only parts of it smooth shaded I can seperate those manually, but it is much more vertex count intensive to separate every face of a complete model. Just knowing how to turn off gouraud shading for the whole model would be great.
Murphey's Law: << if anything can go wrong, it will >> (Murphey was an optimist).
|
|
|
Re: Flat shading for models!!!
[Re: Impaler]
#223778
08/26/08 17:07
08/26/08 17:07
|
Joined: Apr 2008
Posts: 2,488
ratchet
Expert
|
Expert
Joined: Apr 2008
Posts: 2,488
|
Under Blendre it's pretty simple : -Select your object - Enter in edit mode -Just select the faces you want to smooth - then having the mouse anywhere in the 3D view : press "Space" It will onpen the menu , then choose the submenus : - Edit -> Faces -> Set smooth or if you want some faces (or all) to be not smooth but solid: Choose - Edit -> Faces -> Set Solid
If you want a model to mix smooth and Hard edges in game, the way to go is like already said here: Apply one texture on the faces to be smooth and another on the face to keep solid, then apply two different shaders to the two textures.
Last edited by ratchet; 08/26/08 17:08.
|
|
|
Re: Flat shading for models!!!
[Re: ventilator]
#223807
08/26/08 19:24
08/26/08 19:24
|
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B
Expert
|
Expert
Joined: Feb 2006
Posts: 2,185
|
@ventilator: thanks, i couldn't remember it myself... @Impaler: so basically, put this in a fx file:
technique flatshade
{
pass p0
{
shademode = Flat;
}
}
then as before mentioned apply that fx file to a skin that is applied to the normals that you want to be flat shaded, or to the main skin of the model itself.
- aka Manslayer101
|
|
|
Re: Flat shading for models!!!
[Re: mpdeveloper_B]
#223891
08/27/08 03:52
08/27/08 03:52
|
Joined: Aug 2006
Posts: 128 Papua New Guinea
Impaler
OP
Member
|
OP
Member
Joined: Aug 2006
Posts: 128
Papua New Guinea
|
Thanks, mpdeveloper_B, that's exactly what I was looking for
Murphey's Law: << if anything can go wrong, it will >> (Murphey was an optimist).
|
|
|
|