Jump to content

real curve or beizer spline support


photo

Recommended Posts

I think many customer might need this, real curve support, currently, unigine only have a world transform works partly like a spline, but it have many restrictions, like can not get the tangent vector on any percentage position.

 

I think modify the world transform or add a beizer spline is very urgent for us, a spline can do much more than worldtransfrom. I have mailed the support system

 

Both Spline and WorldTransfrom are very good at transform animation, What I need is a real spline, like Bezier spline or B-spline or TCBSpline(tension, continuous, bias) spline, this kind of spline will have more feature, like get position at some value, and normal, tangent, bi-normal and spline's length.

 

 

I think this spline feature is very important to virutal realty applications.

Link to comment

Hello,

Thanks for your ideas.

 

Are you planning this thing in near future? We are also trying to put animations with the same functions and with proper curve editing with cubic and hermite interpolations too. It will be helpful if you plan about this feature in next to next update.

 

Thanks

Rohit Gonsalves.

Link to comment
  • 1 year later...

seems this suggestion has been forgotten for more than a year, I've partly finished a TCB-Spline class, with WorldCurveKey class and WorldCurve class you can create a TCB style curve.

 

But I don't know how to make the curve interpolated with arc-length. so the moving speed is not at constant.

 

I hope frustum will take some time to integrate this into unigine.

 

I also created a ugly editor, not finished, but with basic function to edit the curve.

engine-curve.rar

core-scripts.rar

Link to comment

Thanks Steve3d. Actually I'm working on tracker system right now (kind of Unreal Matinee). It will support splines for almost all engine parameters. This system is based on script only.

Link to comment
  • 7 months later...

After playing with the tracker for while, Ive found the keyframed splines are not going to fully address the issue of needing a spline system based on distance rather than time so that we can change the speed along the spline and move back and forward etc.

Link to comment

The purpose of my Spline is to create a path system, which will make objects moving along the spline with a constant speed, but current tracker also have a spline, but making objects moving with the tracker spline at a constant speed is a nightmare editing...

 

 

Tracker's spline is important to make complex animation, but in Virtual Reality, you'll really need a real 3d spline, to use as a moving path, like create a road lane for cars.

 

 

So use tracker can not solve this request. my request is just like SplineActor in UDK not a spline used by Matinee

Link to comment

We have added this functionality a month or so ago for our version of the editor - it was not too hard to do considering the time it took which was about a week for one of our software engineers - please see attached screenshot. Currently it works by importing Polylines in DXF format, you can then edit, clone, drop to terrain surface etc. We use these for generating mesh cluster scenery along them as paths.

 

Next we are adding the ability to draw splines directly in the editor. This has been a powerful feature for building corridor based content quickly.

Link to comment
  • 3 weeks later...

well, seems frustum still don't get what I want, I just need a curve/spline which don't need tracker system at all.

 

But if you really don't want to add this, never mind, I just finished my spline coding, it's working as I want.

Link to comment

Steve,

Ah, now it's more clear. What about WorldTransform object? You can add keys to it, though it doesn't have visual editing or a constant speed option. Of course, your own implementation will still be the best choice since it will have all custom features you need.

Link to comment

Thanks, worldtransform doesn't suite my needs, my class almost finished, after I finished it, I would like to share with you and the community.

Link to comment

Ok, finally finished the editor code:

 

Screenshot of what it look like in scene:

post-49-0-25477500-1342089338_thumb.jpg

 

and it's editor:

post-49-0-11416300-1342089347_thumb.jpg

 

PS, I'm just a coder, not UI Designer, so the editor might looks a little ugly..

Link to comment

Finally, as I promised:

 

curve patch to users who have source version of engine:

curve-patch.rar

 

Caution: there is some code in the editor part which I can not remove easily to maintain the correct patch format, which is OBJECT_TREE or tree things, just one or two lines. read it before use editor_load.

 

 

 

curve-class.rar

the curve class in c++, for users don't have source version, you might be able to create a script version based on this.

 

Limitation:

  1. closed curve don't work now, but I believe opened curve are more common for anyone of us
  2. there are a lot more can be optimized for better performance
  3. only works with single precision version of engine, because the double version matrix has no forth row and column of data that meets the hermit polymal matrix format, so if you created a more than 200k unit length curve, you'll have a shaking position due to the float limitation
  4. the map_t_to_u are using a not so good version of algorithm but it have good performance, and I think you won't mind if current frame's position have about 0.015 unit difference between next frame for a 10 step curve.

and I would like you English math masters can help me make this better, reading English math theory really cause me headache.

Link to comment
×
×
  • Create New...