Sign in to follow this  
simple1900

Using Ogre::RibbonTrail to create blade trail

Recommended Posts

[color=#333333]Hey guys,I am using the Ogre::RibbonTrail to create the trails of a weapon blade.<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">These artists require a trail when the character wields his blade on the hand ,leaving a nice tail behind the blade.Coz we are using PU as the gfx plugin so we thought the RibbonTrailRenderer would be a nice solution ,we attach the gfx to the hand bone,but it's terriblelly ugly,so we add Bezier interpolation to the trial in Ogre::RibbonTrail,but the effect is not so good because of this:[/color]
[color=#333333]
[/color]
[color=#333333]we attach the blade to hand bone so when the Ogre::RibbonTrail _update(),the position and orientation of the tagPoint's node would be transfomed to the RibbonTrail,and we use the node's position(position is the world pos) as the trail's basic position,and we add a width[PosExtra = tagNode->worldPos + tagNode->Orientation * (0,width,0)](we dont align camera), and if the character's hand move too quick the node would be interpolated by the animation pos of the character,while the time between these two points are short but the orientation changes suddenly,the face would be ugly coz the different segments have diffrent orientation,so I just add an interpolation to the Oreintation by the element step,so it would be like this [PosExtra = tagNode->worldPos + tagNode->Ogre::quteration(srcQ,desQ,elemStepIt)* (0,width,0)] [/color]
[color=#333333]
[/color]
[color=#333333]Everything seems ok but!!!!!!! when the animation goes,if the hand bone's orientation have large changes in a short time, the the first point need to reach the sceond point's orientation in a short distance,the trail need just have a WRINKLE(pucker?sorry for my english) between the two points....so it is very very ugly.[/color]
[color=#333333]
[/color]
[color=#333333]Any good solution for this or if a better idea to do this?[/color]

Share this post


Link to post
Share on other sites
I've not used Ogre, so really don't know how applicable it would be, but it sounds like you want to do sort of the opposite. i.e.:

Render the trail in world space (don't move the points at all, just fade out gradually over time), adding points from the blade position and transforming them to world space as the animation progresses.

Share this post


Link to post
Share on other sites
[quote name='__sprite' timestamp='1312802388' post='4846131']
I've not used Ogre, so really don't know how applicable it would be, but it sounds like you want to do sort of the opposite. i.e.:

Render the trail in world space (don't move the points at all, just fade out gradually over time), adding points from the blade position and transforming them to world space as the animation progresses.
[/quote]

yes,Ogre sucks somehow in doing this,I check my code and it seems ok if an animation's quteration goes soothly but when an pose changes suddenly in quteration, the trail would be not so nice.We had even
tried to create vertices directly but the problem still exists.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this