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 select models separately in HelixViewport3D while cameramode in walkaround?

Ardahan 9 years ago updated by anonymous 5 years ago 5

I want to move object in viewport separately but when I load two model while cameramode is "walkaround" it moves both objects together. How to move each model separately.

Note: I can select each model via hit testing method.

0

Cross sectional view in Cube using Helix in WPF

Anonymous 10 years ago 0
This discussion was imported from CodePlex

terry_513 wrote at 2014-02-06 15:30:

We have structure of our three dimensional view as combination of a solid rectangle and a cylindrical pipe penetrating it in between. Both pipe and rectangle has different color and we want a way with which we can cut its slice at any depth and able to see the view of the combined structure of pipe and solid rectangle at that point.

Please suggest a way to implement the above.
0

Polygon3D

Anonymous 10 years ago 0
This discussion was imported from CodePlex

behnam263 wrote at 2014-07-01 21:31:

Drawing quad with 4 point is in your library but how to draw a polygon with more than that.
for example a hexagon

objo wrote at 2014-07-02 13:08:

Polygons need triangulation. See MeshBuilder.AddPolygon for a method that tries to do this for simple polygons!
0

Zoom issue

Anonymous 10 years ago 0
This discussion was imported from CodePlex

scadavid wrote at 2012-06-28 23:15:

Thanks for this great tool.

I am having a zoom issue with the DepthSensorDemo. Whenever the camera position is set to a new location it is not possible to zoom in to the full extent. For instance, when setting the DefaultCamera in code behind as such:

Viewport.DefaultCamera = new PerspectiveCamera(new Point3D(0, -10, 0), new Vector3D(0, 6, 0), new Vector3D(0, 0, 1), 57);

One will notice that upon resetting the camera view it is not possible to zoom in to the full extent. It appears to me as if the zoom delta does not update upon setting a new camera position. Am I missing something?

 

Thanks in advance!

 

Steven


objo wrote at 2012-07-07 01:37:

In the "Inspect" zoom mode you will move the camera towards the target point (CameraPosition+LookDirection), is your target point correct?


scadavid wrote at 2012-07-10 22:56:

Hello objo,

If what you mean by target point is CameraTarget then yes, CameraTarget = CameraPosition+LookDirection

But I am unable to advance with the zoom towards the target point/surface.

 

Thanks,

 

Steven


scadavid wrote at 2012-07-10 23:15:

Hi Objo. Okay, I set CameraTarget to the target point position (!= CameraPosition+LookDirection) and that seems to work. So should I set CameraTarget to the intersection of the target surface and CameraPosition+LookDirection whenever I move the camera? Thanks 

0

Database view at run time

Anonymous 10 years ago 0
This discussion was imported from CodePlex

mateovidro wrote at 2012-04-13 22:48:

Hi all,

  Good job, I am new to the development and started with WPF in C #, I can create a small application and export .obj files but:

  1. When loading a file. obj will change the texture Helixviewport3d blue. Where I can change to white by default?

  2. When I load the obj. of Viewport3D. What is the best way to save the file, some text and some trace of the line? (Access, SQL, compact, etc)

3. Where do I get an example to make this data link (code) ?



  Thanks for the help

  Novice


objo wrote at 2012-04-14 00:23:

1. The ObjReader class has a property DefaultColor where you can set the color of elements that don't have materials assigned.

The ObjExporter should export the materials defined in your Model3D. I think it supports all kinds of materials, for complex materials (e.g. gradients) it will export an image file.

2. Currently the ObjExporter only supports writing to files (the .obj itself could be written to a stream, but it also needs to write material files...) If you just need to persist your model - try serializing the Xaml of the Viewport3D (see the XamlExporter class).

3. Sorry, I have not planned examples with databases in this library.


mateovidro wrote at 2012-04-14 14:20:

Thanks Objo i'm really grateful
for your help


mateovidro wrote at 2012-12-07 00:59:

Hi, objo

I already Viewport3D serialize XAML at runtime. I try to show my models in a simple application,

 I just want to save and load models with some additional text. This is my code :(btn events)

 

 

and load with this code:
 
private void button1_Click(object sender, RoutedEventArgs e)
{
    Viewport3D viewport = this.view1.Viewport;
    object obj = viewport;

    FileStream fs = new FileStream(@"C:\test.txt", FileMode.Create, FileAccess.Write);
    string savedview = XamlWriter.Save(obj);

    byte[] byts = System.Text.ASCIIEncoding.ASCII.GetBytes(savedview);

    fs.Write(byts,0 ,byts.Length);

    fs.Close();
   
}
private void button2_Click(object sender, RoutedEventArgs e)
{
    FileStream fs = new FileStream(@"C:\Users\MateoLab\Documents\test.txt", FileMode.Open, FileAccess.Read);
   
    Viewport3D vp = XamlReader.Load(fs) as Viewport3D;
    //Move the child visuals to a temporary collection.
    List<Visual3D> items = new List<Visual3D>();
    foreach (Visual3D visual in vp.Children)
    {
        items.Add(visual);
    }

    //"Detach" the visuals from the original parent.
    vp.Children.Clear();

    //Now, put it in the destination viewport.
    foreach (var item in items)
    {
        view1.Children.Add(item);
    }
    
    }
Any suggestions to compress the data,add some text (textbox.text), or other. ().
thanks

 

0

use CuttingPlanes but completely

Anonymous 10 years ago 0
This discussion was imported from CodePlex

zbw911 wrote at 2013-08-21 11:01:

   <h:HelixViewport3D x:Name="view1" CameraMode="Inspect" CameraRotationMode="Trackball" ModelUpDirection="0,1,0">
    <h:DefaultLights/>
    <h:CuttingPlaneGroup x:Name="cuttingGroup1" IsEnabled="True">
        <h:CuttingPlaneGroup.CuttingPlanes>
            <!--<h:Plane3D Normal="-1,-1,0"/>-->
            <h:Plane3D Normal="0.6149556716972341,-0.6228702238113956,-0.48359301704692287"/>                                <!--</h:CuttingPlaneGroup.CuttingPlanes>-->
        <h:FileModelVisual3D x:Name="model1" Source="Source/HelixToolkit.Wpf.Tests/Models/obj/cornell_box.obj"/>

    </h:CuttingPlaneGroup>
   </h:HelixViewport3D>



zbw911 wrote at 2013-08-23 02:59:


objo wrote at 2013-09-05 08:08:

Thanks for the example, it should be fixed now.
0

SharpDX container structure

Anonymous 10 years ago 0
This discussion was imported from CodePlex

eonxxx wrote at 2014-03-06 22:48:

hi objo,

in sharpDX, is there a container structure, like <ModelVisual3D> in Media3D or >SortingVisual3D> in HelixWPF?
i would like to be able to layer/switch on off groups of MeshModels and maybe lights, etc.

something like:

<layer1>
    <model1/>
    <model2/>
    <model3/>
</layer1>
<layer2>
    <model4/>
    <model5/>
    <model6/>
</layer2>
<layer3>
    <model7/>
    <model8/>
    <model9/>
</layer3>
maybe am I'm too blind to see?
bye
eonxxx

Lolipedobear wrote at 2014-03-07 07:09:

Hi, try CompositeModel3D.

eonxxx wrote at 2014-03-07 19:57:

Thank you!
Gonna check it.
0

Adding thickness to a PieSliceVisual3D

Anonymous 10 years ago 0
This discussion was imported from CodePlex

caffeine31 wrote at 2014-08-17 03:29:

I've been using Helix3D for my project to show pie charts and they work well for when the camera is looking directly at it. But when the camera is looking at one from the side, the PieSliceVisual3D doesn't have any thickness and can't be easily seen.

What I need is a PieSliceVisual3D with some sort of thickness or depth to it. I was looking around and it seems like MeshBuilder has something for extruding shapes, but I couldn't find anything else.

How would I thicken or extrude a PieSliceVisual3D? Are there any examples for doing this?

objo wrote at 2014-08-18 13:26:

There is some extrusion functionality in the MeshBuilder. I don't think there is an example so I have added https://helixtoolkit.codeplex.com/workitem/10069
0

About AntiAliasing

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

lizichao wrote at 2011-12-14 03:02:

Hello,I wonder how set antialiasing effect of the ScreenSpaceLines3D object.Thanks for your time and Helix 3D Toolkit is so great!


objo wrote at 2011-12-14 08:39:

We cannot set antialiasing hints in WPF3D as far as I know (I guess you compare to GL_POLYGON_SMOOTH/GL_LINE_SMOOTH in OpenGL or D3D multi-sampling) 


Elemental wrote at 2011-12-15 14:25:

AntiAliasing gets activated automatically if you have proper hardware and Vista or Win 7.

As far as I know, there is no WPF AntiAliasing on WindowsXP.

 

Have a look at this post:

http://geekswithblogs.net/JeffFerguson/archive/2010/02/05/wpf-rendering-tier-requirements-and-capabilities.aspx


lizichao wrote at 2011-12-16 00:44:

Elemental wrote:

AntiAliasing gets activated automatically if you have proper hardware and Vista or Win 7.

As far as I know, there is no WPF AntiAliasing on WindowsXP.

 

Have a look at this post:

http://geekswithblogs.net/JeffFerguson/archive/2010/02/05/wpf-rendering-tier-requirements-and-capabilities.aspx


Ok, thanks.We cannot decide the hardware of other computer so i give up.


objo wrote at 2011-12-19 09:20:

I have used the following registry setting to enable antialiasing in XP

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Avalon.Graphics]
"MaxMultisampleType"=dword:00000004

Maybe the same setting can be used to disable antialiasing in Vista/7 (not tested)

0

Rectangular box with different picture on each face

JohnK 9 years ago updated 9 years ago 1
I'm trying to create a rectangular box visual with a different picture on each face, representing a piece moving around a board.
I currently use a 2D rectangle, but I'd like it to have some width so it doesn't disappear at the wrong angle. I've tried using two rectangles with some filler, but the pieces separate oddly when the movement animation begins.
The front and back faces would be the same (a piece portrait) and the filler is unimportant. The picture can widely vary, as the size of the piece is scaled to the picture's ratio.
What visual should I use? How would I set this up?