This is the discussion forum for Helix Toolkit.
For bugs and new features, use the issue tracker located at GitHub.
Also try the chat room!
0

How to apply a Matrix3D transform for MatrixCamera to the camera?

Anonymous 10 years ago updated by ไอยดา สุรีวงค์ 4 years ago 1
This discussion was imported from CodePlex

boyweb wrote at 2011-01-08 12:44:

We're using the Helix Toolkit to develop a application, and we've just met a problem, hope it can be solved.

We have used the ARToolkit to get the transform matrix of a model, and it gives us the Matrix3D which is for MatrixCamera. However, your camera is ProjectionCamera, we can't set the Matrix3D to it.

Do you have some way to solve it?

Sorry for my poor English.

:P 


objo wrote at 2011-01-10 07:59:

yes, the Helix Toolkit CameraController requires a ProjectionCamera for the transformations of the camera position. It would be interesting to include support for MatrixCameras too, but I have no solution to this right now. I guess it requires some math to find the right transformations for camera pan, rotate and zoom. I'll add it to the issue tracker!

0

Flights Demo - Rotate into View

Anonymous 10 years ago 0
This discussion was imported from CodePlex

crashedapp wrote at 2011-01-28 18:37:

Looking at the Flights Demo.

If I click on the model of earth - how would I go about moving the camera so it is directly looking at the point - giving the effect that the globe spun to that point etc...??

I tried view1.lookat... - it appears to just to pan.

-Great Project by the way!

 

private void OnMouseDown(object sender, MouseButtonEventArgs e) {

 var pt = view1.FindNearestPoint(e.GetPosition(view1));

 

if (pt.HasValue) {//todo rotate to clicked point}

 }

 

 

 

 

 

// Flights Demo window.xaml.cs - modify to sping glope so click point is centered in view


objo wrote at 2011-01-28 18:58:

I would like to get a Google Earth camera behaviour in that demo, but I'm not sure how to do this yet. Camera position and direction should be defined by lat, lon, altitude, heading and tilt...

The LookAt method changes the position of the camera and keeps the direction fixed.

0

Customizing the transform and manipulate UI elements

Anonymous 10 years ago 0
This discussion was imported from CodePlex

TsitsiIsabel wrote at 2011-11-15 23:51:

Hi.

Thanks for this awesome 3d tookit.

I'm playing around with it, and I've been trying to create a quick prototype for touch manipulation. Is there any way to customize the look-and-feel of the manipulation UI elements that come with each of the manipulators... e.g. <h:CombinedManipulator TargetTransform="{Binding Transform, ElementName =cube1}"/>.

2. Is there a way to create or apply some custom styling to these transform / manipulation arrows etc....

3. And is there a way to make the manipulators come up "on selecting" each solid. E.g. a single click does object selection and then you get the transform controls to show up after selection...

Thanks!

 


objo wrote at 2011-11-16 18:56:

1&2: Only a few properties on these manipulators can be styled (like length, diameter, position etc.) The CombinedManipulator can only enable/disable the different manipulator modes. Look at the implementation, it should not be difficult to start from UIElement3D and create a custom manipulator.

3: you could add the manipulator to your visual tree after selection, or detach/attach the geometry when you want it to be visible. You could also share the same manipulator with many different objects!

Good luck with the touch prototyping! It would be interesting to hear if you find some good gestures for manipulation!

0

Can I use SubdivisionDemo with other files???

Anonymous 10 years ago 0
This discussion was imported from CodePlex

mateovidro wrote at 2012-12-13 12:04:

Hi all, nice tool<

1.Can I use other extension (eg. Obj,. Stl) in SubdivisionDemo or need to create a specific class for each extention??

2. How can I apply the CombinedManipulator to a FileModelVisual. It's posible??

Thanks


objo wrote at 2012-12-13 23:20:

1. The LoopSubdivision class works on MeshGeometry3D objects. If you want to subdivide the meshes in the imported model you need to traverse the model graph.

2. It should be possible to apply it to the Transform. I also think you need to scale the size of the manipulator relative to the bounding box of the model.

0

Other Headlight

Anonymous 10 years ago 0
This discussion was imported from CodePlex

egse wrote at 2014-02-25 16:28:

I am using an other headlight. I think it's less dazzling if a surface is normal to the direction:

``` ` var lights = new Model3DGroup();
        SpotLight spot = new SpotLight(Colors.LightGray, new Point3D(), new Vector3D(), 180, 0);          

        lights.Children.Add(spot);
        Binding b = new Binding("Camera.LookDirection");
        b.Source = _myViewPort;
        BindingOperations.SetBinding(spot, SpotLight.DirectionProperty, b);


        Binding bnd = new Binding("Camera.Position") ;
        bnd.Source = _myViewPort;
        BindingOperations.SetBinding(spot, SpotLight.PositionProperty, bnd);


        _myViewPort.Children.Add(new ModelVisual3D { Content = lights });``

objo wrote at 2014-02-27 22:59:

Nice approach, but isn´t the result the same?

This is an interesting topic, I have been thinking about adding some properties to control the relative position of the headlight to avoid specular reflections on such surfaces.

Also, could multiple headlights give a better lighting model?

objo wrote at 2014-02-27 23:00:


egse wrote at 2014-03-04 08:04:

Yeah, nearly the same. But I like it more. Thought I share it. Your approach with an other relative position sounds very interesting
0

3D Text Rendering Sample for Helix SharpDX

Anonymous 10 years ago 0
This discussion was imported from CodePlex

VishwaPrasad wrote at 2014-07-25 13:43:

Hi,

I am using the Helix SharpDX, I have not found the text rendering sample for SharDX,

Can any one provide the sample application.

Thanks
Vishwa
0
Under review

Please help with vectorfieldvisual3D

rich 10 years ago updated by anonymous 5 years ago 3
i have this:
HelixToolkit.Wpf.HelixViewport3D viewport = new HelixToolkit.Wpf.HelixViewport3D();
HelixToolkit.Wpf.DefaultLights light = new HelixToolkit.Wpf.DefaultLights();
viewport.Children.Add(light);
viewport.ShowCameraInfo = true;
this.grid.Children.Add(viewport);
Vector3DCollection vectors=new Vector3DCollection();
Point3DCollection points= new Point3DCollection();
HelixToolkit.Wpf.VectorFieldVisual3D vfield = new HelixToolkit.Wpf.VectorFieldVisual3D();

//then the calculations of the vector field
while(i<=niterx)
{
j=0;
while(j<=nitery)
{
k=0;
while(k<niterz)
{
//caculations of a vector function go here. xvalue,yvalue,zvalue are spaced on a grid, and the functions give vectorvalx,vectorvaly, etc
points.Add(new Point3D(xvalue[i], yvalue[j], zvalue[k]));
vectors.Add(new Vector3D(vectorvalx[i, j, k], vectorvaly[i, j, k], vectorvalz[i, j, k]));
k++;
}
j++;
}
i++;
}

vfield.Positions = points;
vfield.Directions = vectors;


vfield.Diameter = 5;
vfield.HeadLength = 2;
vfield.Fill = new SolidColorBrush(Colors.Black);


viewport.Children.Add(vfield);



i cant figure out why its not working. the vectorfieldvisual3d doesnt render. What am i missing?
please help and merry xmas
0

Click Event not working anymore when using Helixtoolkit.SortingVisual3D

HI_ 9 years ago updated 9 years ago 0

I want to add transparency to Objects (without loosing the Click-Event). Google told me to try SortingVisual3D. Without SortingVisual3D everything (except transparency) worked well, Click-Events also.Now i tried to implement it (simplified code):

Public SV3d As New HelixToolkit.Wpf.SortingVisual3DPublic 
Model3DUI As New ModelUIElement3D

'Apply geometry
    Model3DUI.Model = geometry 'skipped geometry code in this post
'Add Click Event
    AddHandler Model3DUI.MouseLeftButtonUp, AddressOf ClickEvent
'Add to SortingVisual3D
    SV3d.Children.Add(Model3DUI)
'Add to ViewPort
    Viewport.Children.Add(SV3d)
'Setup SortingVisual3D
    SV3d.SortingFrequency = 2
    SV3d.Method = HelixToolkit.Wpf.SortingMethod.BoundingBoxCorners
    SV3d.IsSorting = True
Basically it works fine, everything renders as it should and transparency is working too. But for some reason now the Click Event doesn't work. Anybody has an idea what i'm doing wrong?

I'm not very experienced with Helixtoolkit, so it could be that my way is completely wrong.

0

Missing File: Plückers conoid.txt build error

Anonymous 10 years ago 0
This discussion was imported from CodePlex

kwcoffee1 wrote at 2014-02-10 15:13:

First, A very good toolkit for Wpf.... just what I'm looking for. However, I wanted to learn more about Wpf 3d graphical UIs so I download the Helix source for this purpose. But upon building the project, I get a file error: Error 1 File 'Expressions\Plückers conoid.txt' cannot be found. in project: SurfaceDemo.

How such I workaround this error?

King
0

question about walk around mode

Anonymous 10 years ago 0
This discussion was imported from CodePlex

behnam263 wrote at 2014-08-10 08:21:

I need to know how zooming and moving by mouse scroll or mouse pan works.
I mean if i zoom with scroll in walkaround mode which parameter changes by this(FOV or CameraPoszition.z or cameratarget.z or ....)