View previous topic :: View next topic |
Author |
Message |
paul_nicholls DeleD PRO user
![](http://fpc4gp2x.eonclash.com/downloads/avatar_small.png)
Joined: 05 Dec 2007 Posts: 356 Location: Hobart, Tasmania, Australia
|
Posted: Fri Apr 16, 2010 3:23 am Post subject: DeleD path primitive - getting closer to reality :) |
|
|
Hi all,
I thought I'd do an update on the DeleD path primitive.
Chronozphere and I have been working on a completely new TPath class that will replace the simple (and not very good one I added) in DeleD.
This single path class fully supports linear paths (straight lines only), catmull-rom spline paths, cubic-bezier spline paths, and hermite spline paths!
I think we have the class working ok now, we just have to integrate it into DeleD now - a much bigger job than creating it! LOL
Here is a picture of our stand-alone Delphi program testing the path class:
The black lines are the original linear path between the red control points.
The red lines are the interpolated spline path.
The green lines (with T1/T2) are the red control points tangents that control the curve of the interpolated spline path (Cubic-Bezier and Hermite splines only).
That screenshot is of a catmull-rom spline path, but there are 3 other types as you can see.
Paths can also be open, or closed too
In DeleD, we aim to allow you to move any of these points around to control the final path.
Not sure how long the integration is going to take, but hopefully not too long
I just HAD to mention about this as I'm all excited about this LOL
cheers,
Paul _________________ Long live DeleD!
Hi ho...hi ho...it's off 3d modeling I go... |
|
Back to top |
|
![](templates/Delgine/images/spacer.gif) |
Jeroen Site Admin
![](http://www.delgine.com/images/avatar.jpg)
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Fri Apr 16, 2010 6:59 am Post subject: |
|
|
Whoa! Looking good! ![Very Happy](images/smiles/icon_biggrin.gif) _________________ Check out Figuro, our online 3D app! More powerful 3D tools for free. |
|
Back to top |
|
![](templates/Delgine/images/spacer.gif) |
moraldi DeleD PRO user
Joined: 08 Sep 2005 Posts: 112 Location: Hellas
|
Posted: Fri Apr 16, 2010 12:40 pm Post subject: |
|
|
This is going to be a very interesting addition to DeleD features. Keep up the good work! |
|
Back to top |
|
![](templates/Delgine/images/spacer.gif) |
AWM Mars Member
![](http://www.working.yourinside.com/worlds/ForumPics/awm_MARS2_80x80.jpg)
Joined: 06 Jan 2010 Posts: 1195 Location: Wilts England
|
|
Back to top |
|
![](templates/Delgine/images/spacer.gif) |
chronozphere DeleD PRO user
Joined: 20 Jun 2006 Posts: 1010 Location: Netherlands
|
Posted: Fri Apr 16, 2010 3:37 pm Post subject: |
|
|
Yeah.. We are making a lot of progress.
I'm looking forward to completing this.
(Hopefully within a month or so) |
|
Back to top |
|
![](templates/Delgine/images/spacer.gif) |
fik Member
Joined: 11 Oct 2006 Posts: 303
|
Posted: Fri Apr 16, 2010 9:25 pm Post subject: |
|
|
I like the look of this. Will be a great addition ![Very Happy](images/smiles/icon_biggrin.gif) |
|
Back to top |
|
![](templates/Delgine/images/spacer.gif) |
paul_nicholls DeleD PRO user
![](http://fpc4gp2x.eonclash.com/downloads/avatar_small.png)
Joined: 05 Dec 2007 Posts: 356 Location: Hobart, Tasmania, Australia
|
Posted: Thu Apr 29, 2010 2:11 am Post subject: |
|
|
Hi all,
I thought I'd do an update on this
As you already know, chronozphere and I have been working hard with trying to add in the path implementation into DeleD...
I have uploaded a screenshot:
Uploaded with ImageShack.us
and a youtube video
http://www.youtube.com/watch?v=ccGWPZmIk3I
of how it is coming along
I guess it is still probably at least a few weeks away, but it is a start LOL
PS. does anyone know how to upload youtube videos so they can be all under this URL?
http://www.youtube.com/delgine
cheers,
Paul _________________ Long live DeleD!
Hi ho...hi ho...it's off 3d modeling I go...
Last edited by paul_nicholls on Thu Apr 29, 2010 4:27 am; edited 1 time in total |
|
Back to top |
|
![](templates/Delgine/images/spacer.gif) |
moraldi DeleD PRO user
Joined: 08 Sep 2005 Posts: 112 Location: Hellas
|
Posted: Thu Apr 29, 2010 4:16 am Post subject: |
|
|
Good job, congratulations.
Could these curves to be used in 3D in any way? (lets say with an extrusion tool)? |
|
Back to top |
|
![](templates/Delgine/images/spacer.gif) |
paul_nicholls DeleD PRO user
![](http://fpc4gp2x.eonclash.com/downloads/avatar_small.png)
Joined: 05 Dec 2007 Posts: 356 Location: Hobart, Tasmania, Australia
|
Posted: Thu Apr 29, 2010 4:25 am Post subject: |
|
|
moraldi wrote: |
Good job, congratulations.
Could these curves to be used in 3D in any way? (lets say with an extrusion tool)? |
Most definitely! that is one of my future plans
I am planning on taking my extrude along path plugin, and add that functionality to DeleD to use with paths
So in the end, you should be able to select a path as the 'track', and some other 2d primitive (even another path), and move (extrude) that second primitive along the track to form a tube or other stuff...
cheers,
Paul _________________ Long live DeleD!
Hi ho...hi ho...it's off 3d modeling I go... |
|
Back to top |
|
![](templates/Delgine/images/spacer.gif) |
paul_nicholls DeleD PRO user
![](http://fpc4gp2x.eonclash.com/downloads/avatar_small.png)
Joined: 05 Dec 2007 Posts: 356 Location: Hobart, Tasmania, Australia
|
Posted: Thu Apr 29, 2010 6:00 am Post subject: |
|
|
If anyone wants (or feels brave enough LOL) to have a bit of a play with this very very early version of paths in DeleD, just update to the latest SVN code and apply the patch file below to allow the path interface stuff to work.
IMPORTANT NOTE: this only works using the top view at the moment, and not any of the other views!!
Code: |
Index: Forms/frmCreateEditForm.pas
===================================================================
--- Forms/frmCreateEditForm.pas (revision 76)
+++ Forms/frmCreateEditForm.pas (working copy)
@@ -479,8 +479,8 @@
else if Text = 'Polyline' then
SetPrimitive(otPolyline)
else if Text = 'Path' then
- Showmessage('This functionality is temporarily disabled!')
- //SetPrimitive(otPath)
+ {Showmessage('This functionality is temporarily disabled!')
+ //}SetPrimitive(otPath)
else if Text = 'Rectangle' then
SetPrimitive(otRectangle)
else if Text = 'Cube' then
@@ -659,10 +659,10 @@
LoadCreatePropFrame(TfraCreatePropGrid,panProperties);
end;
- {otPath:
+ otPath:
begin
LoadCreatePropFrame(TfraCreatePropPath,panProperties);
- end; }
+ end;
otPolyline:
begin
Index: Forms/frmSceneInspectorForm.pas
===================================================================
--- Forms/frmSceneInspectorForm.pas (revision 76)
+++ Forms/frmSceneInspectorForm.pas (working copy)
@@ -340,11 +340,11 @@
tviItem.ImageIndex := 35;
tviItem.SelectedIndex := 36;
end;
- {otPath:
+ otPath:
begin // path
tviItem.ImageIndex := 53;
tviItem.SelectedIndex := 54;
- end;}
+ end;
otUserdefined:
begin // user defined
tviItem.ImageIndex := 30;
|
creating paths work like this:
1. left-button click = create path control point.
2. left-button down + drag (no release) = create path control point & drag tangents around.
3. left-button down + alt + drag (no release) = create path control point & drag a single tangent around, not both (useful for sharp edges with Cubic Bezier paths).
NOTES: dragging tangents around only work on cubic-bezier and hermite paths as only those ones use tangents anyway. Nothing will happen if you try and drag tangents with linear or catmull-rom paths.
Once you create a path, you can't do anything with it except select it using shift+drag and delete it, but you can see roughly how the paths will work anyhow
enjoy!
Comments are welcome
cheers,
Paul _________________ Long live DeleD!
Hi ho...hi ho...it's off 3d modeling I go... |
|
Back to top |
|
![](templates/Delgine/images/spacer.gif) |
AWM Mars Member
![](http://www.working.yourinside.com/worlds/ForumPics/awm_MARS2_80x80.jpg)
Joined: 06 Jan 2010 Posts: 1195 Location: Wilts England
|
|
Back to top |
|
![](templates/Delgine/images/spacer.gif) |
paul_nicholls DeleD PRO user
![](http://fpc4gp2x.eonclash.com/downloads/avatar_small.png)
Joined: 05 Dec 2007 Posts: 356 Location: Hobart, Tasmania, Australia
|
Posted: Thu Apr 29, 2010 12:20 pm Post subject: |
|
|
AWM Mars wrote: |
This looks like another awesome tool for DeleD.
One query. With all these splines, paths and curves, won't that rack up the polygons, vertices etc bigtime? |
Not unless they get converted to plain lines, polygons, etc.
Untill then, they only have the control points and tangent points...the rest get generated during rendering of the paths.
cheers,
Paul _________________ Long live DeleD!
Hi ho...hi ho...it's off 3d modeling I go... |
|
Back to top |
|
![](templates/Delgine/images/spacer.gif) |
chronozphere DeleD PRO user
Joined: 20 Jun 2006 Posts: 1010 Location: Netherlands
|
Posted: Thu Apr 29, 2010 1:02 pm Post subject: |
|
|
I thought I should just share this picture with you.
Awesome isn't it? This is really going to help me with my next game project. I also have to thank paul for his work.
UPDATE: I just finished load/save functionality for paths. Using the paths with plugins should also be possible (not tested yet). Our main conern are now the path tools (moving controlpoints etc). ![Smile](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/Delgine/images/spacer.gif) |
Jeroen Site Admin
![](http://www.delgine.com/images/avatar.jpg)
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Thu Apr 29, 2010 3:54 pm Post subject: |
|
|
Awesome work guys - do continue! ![Very Happy](images/smiles/icon_biggrin.gif) _________________ Check out Figuro, our online 3D app! More powerful 3D tools for free. |
|
Back to top |
|
![](templates/Delgine/images/spacer.gif) |
AWM Mars Member
![](http://www.working.yourinside.com/worlds/ForumPics/awm_MARS2_80x80.jpg)
Joined: 06 Jan 2010 Posts: 1195 Location: Wilts England
|
|
Back to top |
|
![](templates/Delgine/images/spacer.gif) |
|