Model shading

Posted By: Otsego

Model shading - 07/12/05 19:15

Hello,
I have a question concerning the shading of models. I don't know if this is possible with shaders or if this is possible at all. Well, first of all here's a picture:

In picture no. 1 you can see three spheres belonging to one model with gouraud shading (the red cross is the model origin).
But what i want to achieve is an effect as it is shown in the second picture.
Well, it's similar to the shading of clouds: Light will be reduced permenantly as long as it shines through a cloud.
Sorry, i don't know a better way to explain it in english .

Is this possible with a shader? Does anybody wrote such a shader already?
Thanks!
Posted By: Matt_Aufderheide

Re: Model shading - 07/12/05 19:29

you picture isnt very clear..im not sure what you want exactly..can you try to find a better picture, one that looks more like what you want? Have you seen this efect in any other game?

That said, if you want to model clouds realistically, here are some general ideas..of course, in the real world clouds are indeed volumes, but they are also very irregular and partially transparent.. this is very difficult to achieve in 3d. You could use volumetric textures, but this probably not really a possibility in A6 right now, also they would be very slow.

The easiest way to make clouds is to make several spherical cloud sprites and arrange them in groups, this can look remarkably realistic if done correctly.

As far as somehow changing the lighting in the model to look like a cloud.. this is hard to say.. there are certain generally known lighting formulae...to do what you want, you have to search the various papers and shaders repositiories. Just do a search on the web for 'cloud shader' or something..you really need to know exactly what you want before you can ask for help on it
Posted By: Otsego

Re: Model shading - 07/12/05 20:51

Thank you for this information, Matt!
Hm, i know what i want but as it seems i'm pretty bad in explaining it.
The clouds were only an example of how this 'effect' looks like.

Quote:

can you try to find a better picture, one that looks more like what you want?



Ok, this one is better, i think: (click to enlarge)

Probably this one is an good example too:

Imagine this tree was a model with leaves made out of many meshes. With gouraud shading every mesh would have a light and a dark side but in this picture the hole tree (model) has only one light and only one dark side!
I hope this was clear!
Posted By: Matt_Aufderheide

Re: Model shading - 07/12/05 22:24

the leaves in the back of the tree are darker because they shadowed by the leaves in front...this kind of self shadowing is only possible by using stencil shadows(not usually very pretty looking) or shadow mapping. if you want to shade a tree, using the normal gauraud shading is still the best option for realtime.. no one will notice the shadowing issue. your diagram still makes little sense.. show me a screenshot of your model with the current lighitng..

Using standard lighting models, each polygon is shaded according to the dot product of its surface normal and the light vector. Using stencil shadows or shadow mapping can overlay a cast shadow on certain polygons that are hidden from the light. There are however more advanced lighting models that can simulate the kind of effects i think you are referring to..one is called Precomputed Radiance Transfer or PRT. This requires however more than just a shader, it would need to be done in a fairly sophisticated DLL.

I think your best bet to is to forget about these advanced effects for now however. Just have to live with the fact that lighting in a computer game is simply not like the real world, and try to compensate for it in your artwork

If anyone else has a better idea I'd be interested to hear it tho
Posted By: Otsego

Re: Model shading - 07/13/05 00:46

Well, that's ok! I didn't know that this would be such a big scaled effect. Perhaps this can be achieved with different ways of modeling or even different textures but it isn't a must-have effect anyway.
Thank you for yor help, Matt
Posted By: Anonymous

Re: Model shading - 07/13/05 00:51

I think you should make the parts that have that highlight all into one model, then use a texture to create your lighting effect since I think it will be more difficult with lights and shaders.
Posted By: Matt_Aufderheide

Re: Model shading - 07/13/05 03:08

Yes, this is probably the best way to go.
© 2024 lite-C Forums