[Effect] Normal Map Extended 1.01 (Updated -13 Jul)

Share your Construct 2 effect files

Post » Fri Jul 10, 2015 10:23 pm

@matriax
a nice tuto on glsl light shader, might be interesting (i was looking for the spotlight ^-^)
But no idea how to make it in C2 by now...
Like you, i'm really not experienced in shader :)

http://www.tomdalling.com/blog/modern-opengl/08-even-more-lighting-directional-lights-spotlights-multiple-lights/

and a second tuto :
http://www.ozone3d.net/tutorials/glsl_lighting_phong_p3.php
B
6
Posts: 25
Reputation: 300

Post » Sat Jul 11, 2015 6:28 am

they are interesting but as you said seems complicated, maybe an expert can do all that, but i will give a try this weekend when i finish other things just for fun :P .
B
24
S
10
G
3
Posts: 557
Reputation: 4,491

Post » Sat Jul 11, 2015 7:17 am

matriax complicated, maybe an expert can do all that. Wrong anyone can do it if they want to learn. Young peron like you should not give up that easy matriax
B
252
S
39
G
15
Posts: 1,965
Reputation: 40,785

Post » Sat Jul 11, 2015 7:44 am

@Lordshiva1948 Come on! :P , also i can learn to code in C and develop my game in 3D, i can learn Blender, Photoshop and develop an AAA game, but this cost me a lot of years that i not have :P .

Already there is a lot people that in some time learned shaders or they actually work with that and can do in short time.

For example, discover how apply the alpha in NormalMaps took me 2 days, and the solution was simply add "* front.a" at the end of the shader output ¿You think spend 2 days for that is give up easy?. An expert or somebody that already release effects and works with that can discovered/did it in seconds. If this took me two days imagine apply all this things of the tutorial, at the end i not will work nothing in the game.

And for end, as i said: "i will give a try this weekend when i finish other things". BTW, for my game i not need this last things, with the actual NormalMaps effects i have just i need now, for that, apply all in this tutorial with spotlights,etc... maybe an expert with time can do that but with my skills on C2(I started a few days ago) and shaders, well , apologize me if i actually prefer invest the most part working in the game.
B
24
S
10
G
3
Posts: 557
Reputation: 4,491

Post » Sat Jul 11, 2015 9:41 am

AS you wish I did not meant to waste your time. If you think I did than so sorry
B
252
S
39
G
15
Posts: 1,965
Reputation: 40,785

Post » Sat Jul 11, 2015 2:01 pm

I'm liking the possibilities that this could open up.... Especially if you can achieve more than one light source - good luck!!
A big fan of JavaScript.
B
74
S
20
G
71
Posts: 2,230
Reputation: 44,892

Post » Sat Jul 11, 2015 4:33 pm

Colludium wrote:I'm liking the possibilities that this could open up.... Especially if you can achieve more than one light source - good luck!!


To add multiple lights seems is:

Code: Select all
vec3 Sum = vec3(0.0);
for (... each light ...) {
    ... calculate light using our illumination model ...
    Sum += FinalColor;
}
gl_FragColor = vec4(Sum, DiffuseColor.a);


I will try to do tonight, but i don't know how the hell pass the variables for every light to C2, i guess for every light i will have to create their own float uniform and ther own variable and pass like LightA, LightB, LightC for each one :roll: , this mean a lot of work XD
B
24
S
10
G
3
Posts: 557
Reputation: 4,491

Post » Sat Jul 11, 2015 7:16 pm

BAM! Multiple Lights!

Here the video:
https://instagram.com/p/5Ac5TUALyb/

Used one for the player and other for the mouse as lantern.

Stucked more than an hour in the fucking "for" after get one light working was simple touching some variables until get the second light working.

Only passed 3 variables for the light2 X/Y/Z for the rest uses the same atributes than the light1. Tomorrow with time and calm i will organize the .fx and .xml to add 3 lights that i think will be enough for now. If i discover how the "for" works and the xml allows maybe i can give the decision to the user how many lights use.
B
24
S
10
G
3
Posts: 557
Reputation: 4,491

Post » Sun Jul 12, 2015 8:53 am

Ok, i get 3 lights working, in total about 40 variables to adjust XD

Image

Here an image of 3 lights wotking at the same time:
Image

I have to organize to see all correct and the people can understand all well. Also i have to find some way in the .xml and .fx to set active what lights the user want and make it individual for each texture to get maximun personalization, but still i don't know, actually the three lights are always activated :S .

Yes, everyboy can set to 0 all the properties of the other lights and done, but if you want to test and enable/disable a light can be frustrating. The idea is made something in the .xml/.fx , if not i guess i can add a parameter with nothing to add whathever and from C2 simple say: Is Parameter X set "yes" ? set effect bla bla bla...
B
24
S
10
G
3
Posts: 557
Reputation: 4,491

Post » Sun Jul 12, 2015 10:45 am

really nice job
Image Image
B
25
S
14
G
137
Posts: 876
Reputation: 71,510

PreviousNext

Return to Effects

Who is online

Users browsing this forum: No registered users and 1 guest