Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (dr_panther, AndrewAMD, TedMar), 1,371 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Model shading #49087
07/12/05 19:15
07/12/05 19:15
Joined: Jul 2004
Posts: 262
O
Otsego Offline OP
Member
Otsego  Offline OP
Member
O

Joined: Jul 2004
Posts: 262
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!

Re: Model shading [Re: Otsego] #49088
07/12/05 19:29
07/12/05 19:29
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
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

Re: Model shading [Re: Matt_Aufderheide] #49089
07/12/05 20:51
07/12/05 20:51
Joined: Jul 2004
Posts: 262
O
Otsego Offline OP
Member
Otsego  Offline OP
Member
O

Joined: Jul 2004
Posts: 262
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!

Re: Model shading [Re: Otsego] #49090
07/12/05 22:24
07/12/05 22:24
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
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

Re: Model shading [Re: Matt_Aufderheide] #49091
07/13/05 00:46
07/13/05 00:46
Joined: Jul 2004
Posts: 262
O
Otsego Offline OP
Member
Otsego  Offline OP
Member
O

Joined: Jul 2004
Posts: 262
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

Re: Model shading [Re: Otsego] #49092
07/13/05 00:51
07/13/05 00:51

A
Anonymous
Unregistered
Anonymous
Unregistered
A



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.

Re: Model shading [Re: ] #49093
07/13/05 03:08
07/13/05 03:08
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
Yes, this is probably the best way to go.


Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1