@manucorporat I agree with Stepan. The community will improve it ;)
New AWMotionStreak. 10x faster, one draw call, no artifacts
(114 posts) (47 voices)-
Posted 11 months ago #
-
Anyone know how to add catmull rom to this? So we can draw smoother lines? I've been trying for ages but im missing something in the update. Cause when drawing, it'll have a "delay" (you draw, but the points being drawn appear later).
Posted 11 months ago # -
@manu, the motion streak is somehow rendered not like the original streak texture. In the original CCMotionStreak I can render streak look exactly like the origin using color:ccc4(255,255,255,255) but I can't get same effect with color:ccc3(255,255,255) in your version, any trick here?
BTW: your version cause crash if a CCMotionStreak is made child of a node and later on the node is release on the fly. I don't know exactly what it is but when I change the way you schedule update callback it works fine again. Below is the original schedule:
// update ribbon position. Use schedule:interval and not scheduleUpdated. issue #1075 [self schedule:@selector(update:) interval:0];Posted 11 months ago # -
Hi,
The github link isn't working for me?
Regards
i
Posted 10 months ago # -
Thanks manu!
New motion streak integrated into gles20 branch!
https://github.com/cocos2d/cocos2d-iphone/tree/gles20Posted 9 months ago # -
how i can install this?
i try uninstall cocos2d ->
download from https://github.com/cocos2d/cocos2d-iphone/tree/gles20 ->
and install -f-u ->create new project cocos2d i.0.0 ->
but error spot !!
error: 'shaderProgram_' undeclared (first use in this function)
error: /kazmath/GL/matrix.h: No such file or directoryand more error!!! CCMotionStreak.h.m not changed.....
i use xcode 3 and cocos2d 1.0.0 plz help mePosted 8 months ago # -
oh no..........
manucorporat's New AWMotionStreak support Xcode 3?
Posted 8 months ago # -
You can compile cocos2d with Xcode 3, but the gles20's templates only support Xcode 4
Posted 8 months ago # -
thx..
i use manu's with xcode 3
but how to explain LAZER? like manu's screen shout?
is it need special image??
where is awVertexLinesToPolygons()? i cant find it!!
Posted 8 months ago # -
wow........
the page 2 link is wrong file......i download from manu's github page....
and add more 2 files and delete 2 file... then build success!!
somebody be careful it..
Posted 8 months ago # -
How to use ccVertexesLineToPolygon()?
its just use only in CCMotionStreak.m?
we just use like that?
CCMotionStreak *streak = [CCMotionStreak streakWithFade:0.5 minSeg:3 width:10 color:ccc3(255, 255, 255) image:@"whiteDot.png"];
[self addChild:streak];i wanna LAZER like a manus image...
Posted 8 months ago # -
I'm also having the same problem as others in the thread and I didn't see a solution. I'm only seeing one segment rendering at a time. So basically a one pixel tall line of my image.
I noticed this implementation doesn't have a length property. So is this not possible with this implementation?
Posted 4 months ago # -
@blackmouth: what problem are you referring to ?
Posted 4 months ago # -
@riq
On page3 @juulie mentions only drawing one line segment which sounds related.With my tests it seems to just streak the image and doesn't seem to support the length implementation used in cocos 1.0 where it shows more of the image and allows for a distance before the image is drawn again.
Posted 4 months ago # -
This is the file I'm trying to use
Posted 4 months ago # -
Hi
Just saw this thread, and I would really like to try out this "new" motionstreak class. What I can understand is that it can make many different types of streaks, including streaks that have no gap between the textures and it is faster, but I kind of got lost in this thread and can not figure out what the status of this class is.
Is it committed to cocos2d-iphone version what? Or do I have to get it separately? Does it only support OpenGL ES 2.0 and thus not the cocos2d v1 branch?
Thank you
SørenPosted 3 months ago # -
manu,
I'd like to confirm... The glowing-line effect seen in the screenshot of the first post is a result of just a specific texture, or do you have more going on than the default
CCMotionStreakakaAWMotionStreak? For example, different blending options, a different fragment shader, etc?I've been messing around with trying to create a similar glow-effect (different purpose), and haven't come close to anything that looks acceptable. If I layer three streaks ontop of each other with an additive blend, you get an okay-ish looking glow effect, but it's not nearly as nice as the one in your screenshot.
I've also noticed that on sharp(ish) corners the streak looks awfuly bad, and when a streak crosses over itself it's blended into a very ugly intersection, unlike in your image where it's clearly layered.
-robodude666
Posted 3 months ago # -
How do you define a repeating texture?
color:ccWHITE image:@"trail.png" - only adds the image once at the start, no repeat
streak.texture = newTexture; - same result here.Posted 2 months ago # -
From my experience, small textures don't appear to work. 64x64px sized textures seem to work the best, like the built-in streak.png texture.
Posted 2 months ago # -
I also have the same problem, just one segment is added, and the rest is rendered with the configured color. Hope this bug is fixed in the final version!
Posted 2 months ago # -
Hi @riq:
Here is the link of the new topic.
http://www.cocos2d-iphone.org/forum/topic/30438?replies=1#post-149498I´m very interested to get the streak working properly for the game that I´ve been developing.
Regards.
Carlos.
Posted 2 months ago # -
@caferlop, @all:
fixed.
https://github.com/cocos2d/cocos2d-iphone/commit/97e0cd8a33af89a8933911fc453cb825a612fed8Posted 1 month ago #
Reply
You must log in to post.