How do I get Light and shadow effect in 3D

Get help using Construct 2

Post » Fri Nov 28, 2014 10:51 am

I am trying to get a light and shadow effect in 3D ( something similar to shadows using Paster plugin like in this post ...viewtopic.php?f=153&t=88750&p=843287&hilit=shadows+with+paster#p843287) .

Please see the image of what I am trying to achieve...

As you could see from the image, the light source lits up the object in the middle ( please visualize this as a 3D system). Now when I move the light source around the middle object, the lighted / shadow part of the middle object should change accordingly in this view. May be something to do with textured quads using @R0J0hound 's Paster plugin ? May be @R0J0hound or @Lof could help as to how I can go about doing this? Though I have purchased Q3D plugin, at the moment it looks tough for me to accomplish the same using Q3D plugin...If someone has ideas as to how this can be done using Q3D plugin, please let me know...I have done this pretty easily in blender3D tool...Thanks.
You do not have the required permissions to view the files attached to this post.
For game development / IT services contact - [email protected]

List of published iOS apps -
https://itunes.apple.com/us/artist/ravi ... d693234511
B
84
S
20
G
3
Posts: 337
Reputation: 7,368

Post » Sat Nov 29, 2014 6:40 pm

For that you could make a semicircle sprite as in the image and set it's angle to the light?
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Sun Nov 30, 2014 2:51 am

Thanks very much @R0J0hound. I used that technique earlier. The way I did was - Have 2 semicircle sprites (one dark and another one for lighted portion) and accordingly scale the widths of the semicircle sprites depending on the angle of the light source. I hope this is what you meant. This works but the effect wasn't all that realistic. If you meant a different approach then please let me know.

I was wondering if using one of the approaches below might give it a more realistic effect -
1. Use C2 inbuilt shadow caster/Shadow light behavior OR
2. Paster plugin and textured quads
3. Q3D plugin
For game development / IT services contact - [email protected]

List of published iOS apps -
https://itunes.apple.com/us/artist/ravi ... d693234511
B
84
S
20
G
3
Posts: 337
Reputation: 7,368

Post » Sun Nov 30, 2014 6:36 am

Q3D would give the most realistic results by far since you wouldn't be faking it.

Textured quads with paster is an interesting idea but it will likely be more complicated than q3d since you have to define all the verticie positions of the sphere, calculate the shading of each face, and zsort the faces so it draws right.

The shadow caster behavior isn't really useful for shading as its for casting 2d shadows.
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Sun Nov 30, 2014 8:46 am

https://dl.dropboxusercontent.com/u/829 ... %20cap.png

I made a small example for you. I'm not sure if you'll be able to get it to work cause i used a new version of the Q3D plugin which i've been working on (whoops) so i made a screenshot just in case. It should run though since this component of the plugin wasn't heavily modified. you might get a warning about versions or whatever.

https://dl.dropboxusercontent.com/u/829 ... ample.capx
B
77
S
13
G
8
Posts: 1,974
Reputation: 9,893

Post » Sun Nov 30, 2014 9:16 am

Thanks @R0j0hound for making it clear to me.

@QuaziFNRLnose, That is perfect! It works with the previous version of the plugin as well. I will see if I can add the ability to move the light source by touch rather than auto revolution. Great! thank you.
For game development / IT services contact - [email protected]

List of published iOS apps -
https://itunes.apple.com/us/artist/ravi ... d693234511
B
84
S
20
G
3
Posts: 337
Reputation: 7,368

Post » Sun Nov 30, 2014 7:26 pm

@ kmsravindra

No problem! thanks for buying Q3D, the new updates should be a bit easier to use :)
B
77
S
13
G
8
Posts: 1,974
Reputation: 9,893


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 27 guests