Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Akow, 1 invisible), 1,417 guests, and 12 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: Terrain Shadows - is it possible? [Re: Shaque] #88018
09/03/06 16:55
09/03/06 16:55
Joined: Jun 2005
Posts: 4,875
broozar Offline
Expert
broozar  Offline
Expert

Joined: Jun 2005
Posts: 4,875
thanks a lot josiah.
is there a way to bake model shadows as well? as you can see here,



map ents and blocks are rendered fine, but models aren't. why? i cannot see an ignore_models-line in your trace. this is strange. please help me.

Re: Terrain Shadows - is it possible? [Re: broozar] #88019
09/03/06 17:29
09/03/06 17:29
Joined: Jun 2005
Posts: 4,875
broozar Offline
Expert
broozar  Offline
Expert

Joined: Jun 2005
Posts: 4,875
for simple shapes, like this snowy pine tree, i may rebuild it with inv. blocks



but this is not nice for a whole forest nor for more complex shapes.

Re: Terrain Shadows - is it possible? [Re: broozar] #88020
09/03/06 19:27
09/03/06 19:27
Joined: Jun 2005
Posts: 656
G
Grafton Offline
User
Grafton  Offline
User
G

Joined: Jun 2005
Posts: 656
You will need to set "polygon = on;" for models either by script or in WEDs
properties for the model, or else the bounding box will be rendered and not the
model! And if you forget to do this and then scale your model, the shadow of the
bounding box will be a small dot, since it dosent scale with the model.

Shadows of models with fine lines may be blurred out, so you may want to blur
them by hand in an image editing program. Also getting good results capturing
finer details like fence rails may reqire a higher resolution of your shadowmap.

To bake the shadows would depend on how you are texturing your terrain. If you
use one large texture per terrain, then in an image editor, you could invert
the shadowmap and use it as a mask on a black layer above your terrain layer.
Adjust the transparency of the layer, and then collapse them into a single image.

You could also use the existing ffp shader in the example or, modify it if you
are using a multi texture shader. The example shader tiles skin 1 but not skin 2
(the shadow map).

I have made fantastic results with sewn together terrains that each use just
one large texture that includes the shadowmap, and a detail mapping shader.

Sorry I didnt include better usage notes!




Re: Terrain Shadows - is it possible? [Re: Grafton] #88021
09/04/06 07:33
09/04/06 07:33
Joined: Jun 2005
Posts: 4,875
broozar Offline
Expert
broozar  Offline
Expert

Joined: Jun 2005
Posts: 4,875
excellent works fine, thanks a lot!

Re: Terrain Shadows - is it possible? [Re: broozar] #88022
09/04/06 11:47
09/04/06 11:47
Joined: Jul 2002
Posts: 2,002
Europe
ShoreVietam Offline
Expert
ShoreVietam  Offline
Expert

Joined: Jul 2002
Posts: 2,002
Europe
I modified the wiki terrain shader, I multiply the color result with the alpha map and disable alpha blending.

To create the alpha map I wrote a raytracing function that makes 4 traces per alpha-map pixel to get a rough "darkness factor" for the pixel.

The result looks like this, but is a static shadowmap because it takes ~3 minutes for 500.000 c_trace. O:-)




My project Schlacht um Kyoto - Das Samurai Browsergame! (sorry, german only)
Page 3 of 3 1 2 3

Moderated by  HeelX, rvL_eXile 

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