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

Problem uploading the texture of some .obj files

krobot 9 years ago 0

Hello,

Thanks for great library. During several past months I was working with your library and I was able to upload different object files and corresponding textures using objreader class.

However, when I try to load any .obj from Stanford Scene Database Helix cannot show the textures.


I tried different things but yet no success. Could you please help me?


Thanks

0

How to update ModelVIsual3d in runtime

LeonelC 9 years ago 0

Hi all!, i'm using HelixToolkit to show same result, but recibe a the result from other program. i need to show the result in runtime, but when i open it only show the last result. someone know how i can do to update modelVisual3d in runtime? thanks

0

NuGet - could not install 2015.1.698 with .NET 3.5: Necessary References

Andrew B 9 years ago 0

Hi All,

I need to target .Net 3.5. When I use NuGet, it says:

Severity

Code

Description

Project

File

Line

Suppression State

Error

Could not install package 'HelixToolkit 2015.1.698'. You are trying to install this package into a project that targets '.NETFramework,Version=v3.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

0

What packages do I need exactly?


Thanks!

Andrew

0

Help with data binding

OxD 9 years ago 0

Perhaps this is a dumb question - apologies in advance. I have followed the example program to plot a 3d point cloud in Viewport3DX control. Please can someone tell me how I can update the points such that new ones appear on the screen. I don't fully understand how these are bound? Many thanks in advance.

0

BindableTranslateManipulator

Fam Wired 9 years ago updated by Hypo Dyne 7 years ago 4

It's easy to reproduce this, just add two tabitems with different helixviewports.


xaml code:

        <TabControl>            <TabItem Header="Tab1">
                <h:HelixViewport3D>
                    <h:BoxVisual3D x:Name="box1" Center="-3.5,0,1" Height="3" Fill="Silver"/>
                    <h:TranslateManipulator Color="Blue" Position="-3.5,0,1" Offset="0,0,1.5" Length="1" Value="{Binding Height, ElementName=box1, Converter={StaticResource Multiplier}}" Direction="0,0,1"/>
                </h:HelixViewport3D>
            </TabItem>
            <TabItem Header="Tab2">
                <h:HelixViewport3D>
                    <h:BoxVisual3D x:Name="box2" Center="-3.5,0,1" Height="3" Fill="Silver"/>
                    <h:TranslateManipulator Color="Red" Position="-3.5,0,1" Offset="0,0,1.5" Length="1" Value="{Binding Height, ElementName=box2, Converter={StaticResource Multiplier}}" Direction="0,0,1"/>
                </h:HelixViewport3D>
            </TabItem>
        </TabControl>

It works perfect in the first tabitem, but in the second tabItem I got binding error:


Cannot find source for binding with reference 'ElementName=box1'. BindingExpression:Path=Height; DataItem=null; target element is 'TranslateManipulator' (HashCode=28505784); target property is 'Value' (type 'Double')


Does anyone have a workaround or solution for this issue??


Thanks!

F Wired


0

CombinedManipulator question

Anonymous 10 years ago 0
This discussion was imported from CodePlex

avgjoe wrote at 2012-03-11 18:39:

First off...Kick ass toolkit btw!  The examples gave me a good starting point.

The first thing I’m attempting to do is combine the ManipulatorDemo with the ModelViewer example.

I’ve added the following code to the ModelViewer to allow the model to be repositioned and rotated.  The visual rotate manipulators appear to grow in size but the translate manipulators do not.   Am I missing something here?

 

 private void ModelLoaded(object sender, RoutedEventArgs e)
{
view1.ZoomExtents();

CombinedManipulator manipulator = new CombinedManipulator();
Rect3D rect = Visual3DHelper.FindBounds(view1.Children);
manipulator.Diameter = rect.Y;
root1.Children.Add(manipulator);
manipulator.Bind(root1);
}

objo wrote at 2012-03-11 20:56:

To me it seems like the manipulation transform is applied twice to the manipulator. Adding the manipulator one level higher in the Visual3D tree should avoid it:

view1.Children.Add(manipulator);

Sorry the "ModelViewer" example is not in good shape, I am planning to improve it, hopefully this year :)


Mrme wrote at 2013-08-01 10:02:

I would like to know if you solved this problem

thebestgin wrote at 2014-08-05 15:32:

I have the same problem. The translate manipulator do not size.
The problem is the emty methode OnDiameterChanged() at line 404.

https://searchcode.com/codesearch/view/10564768/

Here my suggestion:
     /// <summary>
    /// The on diameter changed.
    /// </summary>
    protected virtual void OnDiameterChanged()
    {
        double radius = this.Diameter / 2;
        double newArrowLength = radius + radius * 0.4; 
        this.TranslateXManipulator.Length = newArrowLength;
        this.TranslateYManipulator.Length = newArrowLength;
        this.TranslateZManipulator.Length = newArrowLength;

        double newArrowDiameter = newArrowLength * 0.075;
        this.TranslateXManipulator.Diameter = newArrowDiameter;
        this.TranslateYManipulator.Diameter = newArrowDiameter;
        this.TranslateZManipulator.Diameter = newArrowDiameter;

        double newInnerDiameter = this.Diameter - this.Diameter * 0.12;
        this.RotateXManipulator.InnerDiameter = newInnerDiameter;
        this.RotateYManipulator.InnerDiameter = newInnerDiameter;
        this.RotateZManipulator.InnerDiameter = newInnerDiameter;
    }
0

Context menu

Anonymous 10 years ago 0
This discussion was imported from CodePlex

ddklo wrote at 2012-03-03 00:06:

Hi.

I was wondering if there were a recommended way of showing a context menu when the user rights clicks in the HelixViewport3D? Currently we are subscribing to the mouse down event, but there are some problems relating to the mouse being capture and not released (maybe because the right mouse button is also used to move). Is there a way to add a ShowContextMenu Command/Gesture?

Regards Dagfinn


objo wrote at 2012-03-10 16:14:

I have used a standard wpf context menu on a HelixViewport3D in an application that shows a list of selectable items on left mouse clicks, but I have not tried it on the right mouse button. Should add an example that opens a context menu on both left and right clicks. For the left click context menu I had to open the context menu manually by setting IsOpen=true. 


davidop wrote at 2013-05-28 14:53:

Could you give some examples? I have a HelixViewport3D with multiples ModelVisual3D and I would like that when you click with the right mouse button a contextual menu appear.
0

Change model3dgroup associated to model3d

Anonymous 10 years ago 0
This discussion was imported from CodePlex

AlexanderPD wrote at 2013-03-26 20:49:

Hi, my project started from your kinect example. I'm trying to do a kinect recorder and player.

all is going well but now i need to reproduce my video, obj after obj.
in public MainWindow() i do this:
this.KinectGroup = new Model3DGroup();
Model = KinectGroup;
and the rendered model is the kinectGroup i set. All fine!
but now i need to unbind that KinectGroup and use another group, the one i'm using to reproduce the "video"

This is my try:
Model3DGroup group = HelixToolkit.Wpf.ModelImporter.Load(extractPath + @"\model1.obj");
Model = new GeometryModel3D();
Model = group;
i tried to reinitialize the model and associate my group to it.. but this seems to do nothing! I still see the older group (my 2 kinects input) while it still refresh itself :(

how i can do this? thank you!

AlexanderPD wrote at 2013-03-29 14:29:

Solved by removing kinectGroup's children and adding the new ones. Maybe not optimal solution but it works :\
0

How to Enable Touch?

Anonymous 10 years ago 0
This discussion was imported from CodePlex

cmouritsen wrote at 2014-01-29 16:14:

Hello.

Is there an example for enabling Touch? Is all I need to do set IsManipulationEnabled to true on the Helix3DViewPort?

Thanks!

objo wrote at 2014-01-29 19:44:

Touch should be enabled by default. The CameraController class sets IsManipulationEnabled = true

cmouritsen wrote at 2014-01-29 19:50:

OK. It didn't seem to be for me. Here's my code:
<StackPanel Name="previewPanel" Margin="450,0,0,0" Width="430" Height="580">
     <HelixToolkit:HelixViewport3D x:Name="modelPreview" Width="430" Height="580" ZoomExtentsWhenLoaded="True" ModelUpDirection="0,1,0">
                        <HelixToolkit:HelixViewport3D.Camera>
                            <PerspectiveCamera LookDirection="0,0,-1" UpDirection="0,1,0"/>
                        </HelixToolkit:HelixViewport3D.Camera>
                        <HelixToolkit:DefaultLights />
                        <ModelVisual3D x:Name="model3D"/>                                                
     </HelixToolkit:HelixViewport3D>
</StackPanel>
This didn't respond to Touch at all. Then I tried setting IsManipulationEnabled="True" on the HelixViewport3D and that caused it to have some response to Touch, but it still wasn't usable. I'm sure I'm doing something wrong, but I have no idea what. I'm testing the Touch on a Windows 8.1 Touchscreen laptop.

objo wrote at 2014-01-29 19:59:

Is touch event handling working in the examples? Try the "SimpleDemo".
The examples are working with touch events on my Windows 8.1 machine (one finger to rotate, two fingers to pan and pinch to zoom).
Your code looks ok. Are you loading a really big model? Try to replace the ModelVisual3D with a simple cube visual.

cmouritsen wrote at 2014-01-29 20:07:

I will try the SimpleDemo and replacing the ModelVisual3D. In this case it is a fairly big model. Will it not work with big models?

cmouritsen wrote at 2014-01-29 21:54:

I replaced my ModelVisual3D with a Teapot and the Touch worked great. Will Touch not work on bigger models?

objo wrote at 2014-02-02 12:14:

I have seen similar behaviour, but don't know what causes this.
The ManipulationStarted and ManipulationDelta events are used the same way as MouseDown and MouseMove.
0

ModelViewer code doesn't recognize materials

Anonymous 10 years ago 0
This discussion was imported from CodePlex

pggarland wrote at 2013-02-08 04:43:

ModelImporter.Load, invoked from the ModelViewer source, doesn't seem to recognize material definitions. All models are either green (no material definition) or Yellow (there is a material definition that references a .MTL file, but the material info is ignored). Am I missing something, or is ModelViewer not meant to recognize different colored material in OBJ files?

objo wrote at 2013-02-10 16:16:

The Obj reader should support materials (diffuse, ambient, specular, textures and opacity). You should try to debug the import of the .mtl file. Set a breakpoint in the LoadMaterialLib method. Let us know if there is a bug in the code, and we will correct it.

pggarland wrote at 2013-02-12 04:09:

My bad. Stepping into the code, I saw that there were tabs in the materials file. Still working on lighting, but this problem is solved. Thanks!