turn off shading

Posted By: Blattsalat

turn off shading - 02/01/07 14:27

Hi,

I have encountered a problem when trying to align models to each other. In some cases the shading of the single models dont match their neighbours and in my case (a terrain made out of 16mdl files), this leads to this:



Is there any way to fix this or manipulate it?
or is there any way to display models without the shading (like in WED) ingame?

Any help or hint would be great.

cheers
Posted By: jcl

Re: turn off shading - 02/01/07 14:36

Obviously, my first suggestion is not to patch a terrain from 16 models, but use a single terrain instead.

If you need the 16 models for some reason: Setting the ambient, diffuse, and specular colors to zero and emissive to nonzero removes any shading.
Posted By: HeelX

Re: turn off shading - 02/01/07 14:49

@Blattsalat:

I guess you are trying a tredmill approach (otherwise I would advice you as well to use a large (chunked) terrain.

If you would stitch both terrains in MED, the gouraud shading would do the right shading. Now, lets take that hill on your image and slice it: there are two models, forming a hill from the left with this slope _/ and from the right with this slope: \_ Obviously, the shading in the concave section of this slope is correct, but you the real slope of 45 degrees or so the one side is shadowed and the other side bright. There is no smooth transition.. but this is right: the gouraud shading doesnt know the continues way the slope would go from one model to another. So there is only a sharp edge. And so, there are no information to argue a smooth transition. The normals of the _vertices_ arent right because you cut the important ones.

How to cirumvent this:

Option A: use a large (maybe chunked) terrain
Option B: instead of slicing the terrain 100% accurately, add some "frame" around each tile, so that follow-up vertices are know so that you deliver these information. The additional vertices are hided by transparent skin parts or a tricky UV mapping
Option C: do it the way JCL mentioned: disable ANY gouraud shading and add a _precalculated_ shadow map instead. Then, you have no shading issues anymore.

I hope, you have got the clue..

Cheers
Christian
Posted By: Blattsalat

Re: turn off shading - 02/01/07 14:51

Hi,

thanks a lot! it looks like it works now.

cheers and have a nice one
Posted By: HeelX

Re: turn off shading - 02/01/07 18:14

What method did you used?
Posted By: Blattsalat

Re: turn off shading - 02/01/07 21:23

Hi,

i used jcl´s instruction how to turn off the shading.

cheers
Posted By: Joey

Re: turn off shading - 02/03/07 18:08

but doesn't the terrain look very clumsy then?
Posted By: Blattsalat

Re: turn off shading - 02/03/07 22:00

no. of course the quality is better with the new gs shading system. But if turned off like jcl mentioned the terrain looks quite like in the wed preview window.
I can repaint the shadows onto the skin to minimze the effect of just "plain" models. so its quite a good sollution for my case (special one)

cheers
Posted By: Joey

Re: turn off shading - 02/06/07 10:55

ah ok i see, if you add the shadows manually you should get a nice shading.
© 2024 lite-C Forums