Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11855 Posts in 1569 Topics- by 3045 Members - Latest Member: lensreslai

10. February 2012, 05:28:10 AM
Xith3D CommunityGeneral CategoryFeature Requests & Brilliant Ideas (Moderators: Marvin Fröhlich, 'n ddrylliog)Integration with Qt Jambi GUI
Pages: 1 2 [3] 4
Print
Author Topic: Integration with Qt Jambi GUI  (Read 21601 times)
Ludovic Marcé
Enjoying the stay
*
Offline Offline

Posts: 60


ludo123456@jabber.fr
View Profile
« Reply #30 on: 28. August 2007, 09:33:01 AM »

Thanks for this.
I have already planned to record a flight with the CameraFlightRecorder.
But i like also to create a flight from a list of points that i "click" in the 3d view.
The points are takken from picked objects, and the orientation of the camera is computed from the list of points. The camera will be always directed in the flight direction.


The arrows represent the camera flight i would like to make for example.
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #31 on: 28. August 2007, 10:27:57 AM »

The camera will be always directed in the flight direction.

So you will see hard orientation changeovers, won't you?

Marvin
Logged
Ludovic Marcé
Enjoying the stay
*
Offline Offline

Posts: 60


ludo123456@jabber.fr
View Profile
« Reply #32 on: 28. August 2007, 11:07:15 AM »

Yes, i know. Undecided
I should find a way to "round" the trajectory.
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #33 on: 28. August 2007, 02:54:00 PM »

Yes, i know. Undecided
I should find a way to "round" the trajectory.
Splines.
Logged
Ludovic Marcé
Enjoying the stay
*
Offline Offline

Posts: 60


ludo123456@jabber.fr
View Profile
« Reply #34 on: 28. August 2007, 05:30:39 PM »

Ok thanks, i will watch these splines.

But, i have just finished what i wanted to do with the list of points and the result sounds really good for me.
I would like also to "export" this animation in a video format like mpeg or avi.
Is there already an easy way to do this from xith ? (I know, i'm lazy ! Roll Eyes )

If not, i think i will use a specialized tool like Fraps or another clone on Linux(if it exists).
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #35 on: 28. August 2007, 05:37:15 PM »

Splines are definitely overkill here. The InterpolationPoints in the CameraFlight are also only linearly interpolated. Just have a look at how I interpolated between two "points". Then you would simply interpolate two points near the base points and then interpolate between them. This should result in a quite smooth movement at the base points.

btw. Why do you need the list of InterpolationPoints publicy? You could simply type the values to a flight-file, and load it. This should be much more convenient than holding the values inlined in the code.

There's nothing in xith to capture a video. But I know, there are tools to do this. Just search google Wink.

Marvin
Logged
hawkwind
Getting respectable
***
Offline Offline

Posts: 363



View Profile Email
« Reply #36 on: 29. August 2007, 12:54:23 AM »

I have been using the PointFocusser (thanx marvin) to move arbitrarily through my scene.  If a user selects a shape with the middle mouse button, I grab the center point of the bounding sphere and use that as a destination point.  You need to figure out a reasonable view coordinates though to focus on the target shape.
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #37 on: 29. August 2007, 05:41:57 AM »

Ludo : try that : http://xvidcap.sourceforge.net/
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #38 on: 29. August 2007, 10:41:06 AM »


Things like this should be collected on a "tips and tricks" page on xith.org.

Marvin
Logged
Ludovic Marcé
Enjoying the stay
*
Offline Offline

Posts: 60


ludo123456@jabber.fr
View Profile
« Reply #39 on: 29. August 2007, 12:48:09 PM »

Thanks, it looks fine. Smiley
I've not tested it yet at work because it needs at least GTK v2 and i'm working on an old machine with Red hat 8. But i 'll use it ASAP.
Google has found for me wink also. I don't know which tool is the best.
Unfortunely, these tools don't seem to capture only the opengl canvas as Fraps does. Undecided
Correct me if i'm wrong.

Quote
Things like this should be collected on a "tips and tricks" page on xith.org.

Marvin
Or maybe on the wiki ?

I have been using the PointFocusser (thanx marvin) to move arbitrarily through my scene.  If a user selects a shape with the middle mouse button, I grab the center point of the bounding sphere and use that as a destination point.  You need to figure out a reasonable view coordinates though to focus on the target shape.
Yes, I'm also using the center of the bounding spheres of picked buildings to add points to the flight.

btw. Why do you need the list of InterpolationPoints publicy? You could simply type the values to a flight-file, and load it. This should be much more convenient than holding the values inlined in the code.
I want to let the user create a new flight by selecting(picking) few shapes in the 3d view. So the flight will be created dynamically.
Furthermore, I'll add a ListWidget(Qt) in the application to edit or remove the interpolation points. The user will be able to changes the coords of points, the deltaTime and also the angle of the camera relatively to the "ground" (plane XY for me).
Therefore, i think it's best for me to use only one interpolationPoints list. But I could also use later a flight-file to save or load a flight. Smiley
Logged
Ludovic Marcé
Enjoying the stay
*
Offline Offline

Posts: 60


ludo123456@jabber.fr
View Profile
« Reply #40 on: 03. September 2007, 05:08:22 PM »

Yes, i know. Undecided
I should find a way to "round" the trajectory.
Splines.
I've searched informations about splines and Bezier curves, but i've not found an easy way to implement it.
I'm not a maths specialist! Tongue
Is there something already implemented in Xith-tk or in any third-party libraries ?
And exactly, which type of spline should i use, by knowing that the spline should be created from 3 points ?

I 'd like a class Spline that should work like this:
Code:
List<Point3f> controlPoints = new ArrayList<Point3f>();
controlPoints.add(point0);
controlPoints.add(point1);
controlPoints.add(point2);

// Creates the spline from 3 points:
Spline spline = new Spline(controlPoints);
// or directly:  new Spline(point0, point1, point2);

// I want 10 equidistants points from this spline
List<Point3f> splinePoints = spline.getPoints(10);

// Then I can make pass the camera by these points
...

Attached: a picture of points i'd like to get.

Thanks you! Smiley


Edit: I should have posted this question to Support category. My bad ! Roll Eyes
« Last Edit: 03. September 2007, 05:11:37 PM by Ludovic Marcé » Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #41 on: 03. September 2007, 06:02:13 PM »

Well, there is something in the xith3d (core) project about bezier curves. But I didn't have a closer look at it so far. Maybe it serves your needs.

For your project you don'T need splines, but bezier curves. A Spline is a list of bezier curves.

Marvin
Logged
hawkwind
Getting respectable
***
Offline Offline

Posts: 363



View Profile Email
« Reply #42 on: 03. September 2007, 08:11:57 PM »

Would the PositionPathInterpolatorImpl work for you?? Huh
Logged
kukanani
Fierce Warrior
****
Offline Offline

Posts: 504


My game is coming along fairly smoothly...


View Profile WWW
« Reply #43 on: 04. September 2007, 03:42:30 PM »

Your curve is a quadratic Bezier curve, not a cubic Bezier, this may present some problems...we should make a distinction in Xith.
Logged

xith.setCoolnessLevel(10);
jMe.setCoolnessLevel(0);
xith.rock();
Ludovic Marcé
Enjoying the stay
*
Offline Offline

Posts: 60


ludo123456@jabber.fr
View Profile
« Reply #44 on: 04. September 2007, 04:31:12 PM »

Well, there is something in the xith3d (core) project about bezier curves. But I didn't have a closer look at it so far. Maybe it serves your needs.

For your project you don'T need splines, but bezier curves. A Spline is a list of bezier curves.

Marvin
Your curve is a quadratic Bezier curve, not a cubic Bezier, this may present some problems...we should make a distinction in Xith.
I think you talk about the BezierSolver class (even if it's not exactly a class Roll Eyes). And indeed, it's not exactly what i was looking for.

Would the PositionPathInterpolatorImpl work for you?? Huh
I don't think.
It seems to be a linear movement.

But i'm working on a BezierCurve2 class which makes what i want, a quadratic Bézier curve.
I'm using the equation that i've found here: http://en.wikipedia.org/wiki/Bézier_curve
« Last Edit: 04. September 2007, 04:53:16 PM by Amos Wenger » Logged
Pages: 1 2 [3] 4
Print
Jump to:  

Theme orange-lt created by panic