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

Helix3D + WPF + SharpDX

Anonymous 11 years ago 0
This discussion was imported from CodePlex

luca82 wrote at 2013-04-09 11:56:

Hello!

A simple question...

I read that you are trying to use SharpDX with Helix3D... Does it mean that only the rendering engine will change, or we''l have to use classes other than Model3DGroup, Geometry3DGroup?

And it will embeddable inside WPF?

Thanks in advance for your answers

objo wrote at 2013-04-15 12:16:

The SharpDX fork is under development and the goal is to have a similar model structure as WPF 3D. It can of course not use the WPF3D classes, and the geometry classes will also be based on SharpDX structures for performance reasons.

Yes, it is embeddable in WPF (using D3DImage). See the demos!

luca82 wrote at 2013-04-15 14:08:

Thank you very much!

I'll look forward to it :D

very very good news :D

cedrelo wrote at 2013-04-16 08:35:

Hi,


Where are the demos ?


Cedre

luca82 wrote at 2013-04-16 12:53:

They are in the sharpdx fork, but I cannot compile them :(
0

Accessing 3d elements in XAML binding/code-behind...

Anonymous 11 years ago 0
This discussion was imported from CodePlex

BogusException wrote at 2014-07-02 20:23:

This looks really promising! I have a simple, simple project:

-Create a globe of earth, with countries that can be bound & animated in code-behind.

It really is that simple. i can buy a 3d model of earth in all kinds of formats, but I have no clue which format(s) will allow me to (after conversion to XAML), say, turn England bright green, or make the USA blue, etc. in normal animation...

What file format(s) and conversions are possible to allow accessing/binding each individual (country, in this case) element with XAML/WPF?

I have 3ds max experience (don't run it any more), so I understand the concept of multiple objects, and there are many models available that have this structure.

Your feedback appreciated! TIA!

pat
:)

objo wrote at 2014-07-11 21:52:

I would try using an SVG file, triangulate the country polygons, transform from 2D lat/lon to a 3D mesh on a sphere.
For SVG maps, see wikipedia or http://kartograph.org/
0
Under review

How to limit rotation

Anonymous 11 years ago updated by Øystein Bjørke 11 years ago 2
This discussion was imported from CodePlex

ejleigh wrote at 2012-06-12 03:28:

I have a terrain model with objects on top and I'm trying to find a good way to prevent the user from rotaing the scene such that he can look underneath the terrrain model. It seemed like the best way would be to derive a new class from CameraController and override the OnManipulationDelta method, but unfortunately you cannot set the camera contoller in the HelixViewPort3D. At the moment I'm setting the RotationSensitivity to a low value when the camera Up vector approaches level, but that only kindof works. It's not ideal. Is there a better way?

 


objo wrote at 2012-06-15 06:38:

The CameraController is created in the control template of the HelixViewport3D, so you have to override the control template. http://wpftutorial.net/templates.html

Or, use the Camera's Position and LookDirection coerce value callbacks, and enforce the Z values to to be positive and negative, respectively.

http://msdn.microsoft.com/en-us/library/ms754209.aspx
http://msdn.microsoft.com/en-us/library/system.windows.coercevaluecallback.aspx

I have not tried this, but I think it should work.


lightxx wrote at 2013-02-26 10:11:

objo, could you please provide a simple example on how to do this? I guess limiting the rotation is quite a frequent requirement.
thank you very much!

objo wrote at 2013-03-13 07:12:

0
Under review

How do I display pipe properties?

Mark4965 9 years ago updated by anonymous 5 years ago 3

Good Afternoon,


First off, I've really enjoyed using Helix and as a new user of WPF and graphical programming, I have found Helix very easy to use as well a aid during my learning process. The work put into this project is much appreciated!


I am currently working on a program where the user can create various elements (pipes, spheres, etc.) by inputting the appropriate inputs and graphically display them in the viewport.


Up to now everything has been pretty straight forward. Where I've been hung up the last several days is how to display the properties of the elements once selected with the mouse. For example, if user creates a pipe and then selects it a window would display the diameter, inner diameter, and Point1/2 coordinates. From what I can tell the BuildingDemo might provide a good example as to how this is accomplished however the PropertyGrid remains blank when I select something.


If anyone could provide some insight or some example code I would be extremely grateful. If you need more information please let me know.

0

Middle mouse button

Anonymous 11 years ago 0
This discussion was imported from CodePlex

jst7 wrote at 2012-03-27 12:57:

Hey,

I'm succesfully catching the doubleclick event from the helixview BUT this event is not triggered when double clicking the middlemousebutton.

Any thoughts on what i could be missing?

p.s. same story when overriding the previewmouseevent!


objo wrote at 2012-04-05 01:35:

I guess this behaviour is caused by the ResetCameraGesture property being set to "MiddleDoubleClick". Try to change it to "None" or some other MouseAction!


jst7 wrote at 2012-04-05 10:05:

No results yet, but thanks for the reply

0

Bug in CameraController.AddRotateForce(double dx, double dy)

Anonymous 11 years ago 0
This discussion was imported from CodePlex

Elemental wrote at 2012-02-19 11:16:

Hello,

the method CameraController.AddRotateForce(double dx, double dy) always works as CameraMode.Inspect.

In my case, I have CameraMode set to WalkAround, which works fine for mouse controls, but keyboard control is wrong in that case.

 

I changed the method to

        public void AddRotateForce(double dx, double dy)
        {
            if (!this.IsRotationEnabled)
            {
                return;
            }

            this.PushCameraSetting();

            if (this.CameraMode == CameraMode.WalkAround)
            {
                this.rotationPoint3D = this.CameraPosition;
            }
            else
            {
                this.rotationPoint3D = this.CameraTarget;
            }
            this.rotationPosition = new Point(this.ActualWidth / 2, this.ActualHeight / 2);
            this.rotationSpeed.X += dx * 40;
            this.rotationSpeed.Y += dy * 40;
        }

 

which does kind of work, but rotating left/right via keyboard is inverted compared to mouse control.

What is the reason for the inverted controls?

 

Best Regards

Bernd

 

btw: Just downloaded the latest source code and changing the CameraMode in CameraControlDemo does not work anymore.


objo wrote at 2012-02-21 20:59:

thanks for the feedback! I have only used the "Inspect" mode recently, it seems like the "Walkaround" mode is not working properly. I added it as issue 9949!


Elemental wrote at 2012-02-22 08:08:

Thank you.

0

Question about the FPS calculation

Anonymous 11 years ago 0
This discussion was imported from CodePlex

Elemental wrote at 2011-12-12 08:10:

I am running the CameraControlDemo and have activated the FPS counter. The FPS stays around 55FPS when I do nothing. When I rotate via mouse, it rises to about 110-120FPS. When I rotate via keyboard, it goes down to about 40FPS.

My question is:

Why do FPS rise when rotating via mouse, but go down when rotating via keyboard?

 

Best Regards

Bernd


objo wrote at 2011-12-12 20:40:

hi Bernd, the fps counter is counting frames by the CompositionTarget.Rendering event, which should fire at around 60Hz when the model is not too big. I think the mouse events have higher frequency and will force more frequent updates of the model, but I have not investigated how this works. I don't know why it goes down when using the keyboard, could it have something to do with the keyboard repetition rate?

http://msdn.microsoft.com/en-us/library/system.windows.media.compositiontarget.rendering.aspx 


Elemental wrote at 2011-12-13 08:33:

The background of my question is that FPS calculation seems to be wrong for larger objects.

When I have objects with like 200 000 triangles, the FPS when rotating via keyboard is like 5 FPS.

The FPS when rotating via mouse is like 80 FPS. The 80 FPS cannot be true, because it does not look smooth anymore.

 

I was just wondering why there is this difference in FPS calculation, but it is not really a problem...

 

Best Regards

Bernd


objo wrote at 2011-12-13 18:42:

Right, using the CompositionTarget.Rendering event is probably not an accurate method of calculate the frame rate.

Let us know if you find a better way to achieve this! (is there some other event in the WPF3D render loop that could be used?)

0

get normal associated to point

Anonymous 11 years ago 0
This discussion was imported from CodePlex

lioneloddo wrote at 2014-03-30 14:07:

I was wondering how it would be possible to get the normal associated to point determined such as in the FlightsDemo. In this demo, a method called "findnearestpoint" is used.
I don't know how this method works, but it would be very useful (at least for me) to know the normal at this point.

Thank you in advance for help.

objo wrote at 2014-04-29 10:37:

The Viewport3D.FindHits extension method in this library returns HitResults that contains normal vectors!
0

kinect integration

Anonymous 11 years ago 0
This discussion was imported from CodePlex

sandualbu wrote at 2011-12-15 22:36:

This is a really cool project, i like it. I'm thinking about integration with kinect SDK.  Wouldn't it be nice to zoom in/out and rotate objects using only hands movement?


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

Yes, a demo using the Kinect SDK would be very interesting! Are you only thinking manipulating objects or also manipulating the camera? Which gestures could be used? Do you have links to some good kinect demos of 3D interaction?


sandualbu wrote at 2011-12-19 14:22:

i'm thinking about both..camera and object rotation... you can take a look at kinesis project. it performs zooming/scrolling and chart rotation (not on 3d objects, of course, but the idea can be developed more). Kinesis works with menus, but something which combine several movements can be built for manipulating 3d objects.

you can perform the rotatation operation as a real time rendering, depending on distance / elevation between hands, and not composed from multiple oprations (up/down/right/left), like kinesis is doing.

The most significant aspect i can think now, is to make kinect interaction as a kind of plugin, and not make helix dependent of it.


objo wrote at 2011-12-19 14:35:

Have a look at the SpaceNavigator implementation. Maybe the Kinect implementation can be done in a similar way (I don't think it should be handled as mouse/touch events).

I agree, a Kinect implementation should be in a separate assembly - suggesting the name HelixToolkit.Kinect.

I'll add the kinect sensor to my xmas wish list, so I can test this :)


sandualbu wrote at 2011-12-19 14:49:

is too hard what the space navigator is doing...I mean he wants to construct something....i think you want just to present 3dobjects, not build them with hands. I'm thinking more like what the guy is doing when presenting the universe with kinect (http://www.youtube.com/watch?v=GMZcz_tlGqw)



sandualbu wrote at 2011-12-22 07:49:

thta's just amazing. The only disadvantage is the red-cyan glasses. But the gestures used are pretty much like what I was thinking about your project. Of course, making the application render on 120hz display and a pair of active glasses will improve a lot the quality of image.


MrNikito wrote at 2013-09-12 17:33:

Hi, sorry for the question, but...

Where I could see th SpaceNavigator implementation?

Thanks

objo wrote at 2013-09-29 09:07:

You find the space navigator decorator in the HelixToolkit.Wpf.Input project and an example "Viewport features" in the example browser.
Tip: seach for "spacenavigator" in the solution and you will find all usages.
0

Setting material property to a jpeg does not work

Anonymous 11 years ago 0
This discussion was imported from CodePlex

jeeva_sjce wrote at 2013-09-03 06:12:

Hi, I am using the earth demo to wrap a jpg/png image to a pipe3d but it just does not seem to work. I have also tried using the ImageMaterial property within the xaml but it does not work too. Any help will be appreciated.

Thanks,
Jeevan

objo wrote at 2013-09-05 07:56:

Is the pipe including texture coordinates?

jeeva_sjce wrote at 2013-09-06 11:50:

How do we set the texture coordinates?

jeeva_sjce wrote at 2013-09-30 10:20:

I was able to solve this problem by using the 3DToolsTEXT from codeplex api to generate the texture coordinates for a cylinder. One thing that I experienced is larger azimuths the image was distorted. Any particular reason for this?

But, I must say this piece of software is mind blowing with the kind of capabiliites is has on offer! Kudos to you for such a fine job. :)