Reputation: 11
I am trying to get make an effect with sprite kit on Mac on SKShapeNodes ( a normal Node would be fine too ) to like something like this: http://firewall.com.pl/wp-content/uploads/2013/05/mailstore-cloud-edition-en.png
a circular node surrounded by a rather glow effect, not fully opaque. Any ideas? I also want the "glow" to get different colors. The only idea right now would be an round, white image as png with "fade out" intensity on the edges until it is completely transparent. Then cover that with an blend factor. But I wonder, if there is an simpler way to do this.
If any of you have an good idea, I would be very grateful.
Regards Thomas
Upvotes: 1
Views: 1379
Reputation:
That looks like more of a lens flare. but here is something that may get you started: try this code then fill with black, of course you will have to adjust the glow and circle to fit your needs.
-(void) CreateGlowingCircles {
SKShapeNode *ball = [[SKShapeNode alloc] init];
CGMutablePathRef myPath = CGPathCreateMutable();
CGPathAddArc(myPath, NULL, 0,0, 20, 0, M_PI*2, YES);
ball.path = myPath;
ball.lineWidth =0.1;
ball.glowWidth = 15.5;//adjust for more glow effect
//add fill and stock for the black dot inside the glow
ball.position = CGPointMake(200, 200);
[self addChild:ball];
}
This is a piece of code from a example project i did... from there you could add a filter! I hope this gets you started. for the lines that connect the black spots you could figure out some advanced physics magic. look up SKPhysicsJointFixed etc.. good luck!
Upvotes: 0