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
1 registered members (AndrewAMD), 989 guests, and 2 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
Page 2 of 2 1 2
Re: The ultimate tree shader? [Re: Kartoffel] #426181
07/17/13 15:07
07/17/13 15:07
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
thanks too! Definitively those functions go to my shader function library grin

The blue channel of a normalmap can be easily computed based in the relation between sine and cosine or Pythagorean trigonometric identity:

Originally Posted By: Pythagoras

pow ( sin A, 2 ) + pow ( cos A, 2 ) == 1
sin A == sqrt ( 1 - pow ( cos A, 2 ) )
cos A == sqrt ( 1 - pow ( sin A, 2 ) )

Code:
normal.b = sqrt ( 1 - ( normal.r * normal.r ) - ( normal.g * normal.g ) );



Of course, it will be always positive.

Re: The ultimate tree shader? [Re: ] #426196
07/17/13 17:59
07/17/13 17:59
Joined: Jul 2013
Posts: 22
S
Stratego Offline OP
Newbie
Stratego  Offline OP
Newbie
S

Joined: Jul 2013
Posts: 22
@Malice

I didn't actually do too much in that thread, just took advice from others and tested stuff out. From now on I will post about my tree work here exclusively, and if I do come up with some good stuff, I'll share it with the community. But understand, it may take me a while because I'm just doing it for fun.

Re: The ultimate tree shader? [Re: Stratego] #426207
07/17/13 22:22
07/17/13 22:22
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
I like the tree, looks nice. I doubt it will look better with normal mapping.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: The ultimate tree shader? [Re: Superku] #426209
07/17/13 23:40
07/17/13 23:40
Joined: Jul 2013
Posts: 22
S
Stratego Offline OP
Newbie
Stratego  Offline OP
Newbie
S

Joined: Jul 2013
Posts: 22
Thanks!

We'll see. I'm going to finish up the tree. I still am not happy with it, and then start applying shaders. (The tree already is looking quite a bit better)

What I'd like to get out of normal bump with specular:

1. Bark always looks good with normal mapping.
2. I'd like to get a "wet look" with the specular applied to the leaves.

First I'm going to finish the tree and all the maps, so I can test the finished product.

Last edited by Stratego; 07/17/13 23:44.
Page 2 of 2 1 2

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