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

Updating 153600 spheres (GeometryModel3D) to display kinect depth data in real-time

Anonymous 10 years ago 0
This discussion was imported from CodePlex

pyrrhicpk wrote at 2012-11-04 13:05:

Hi,

I am using Helix 3D toolkit to display kinect depth data, an attempt to display the point cloud in the helix viewport3d. For this, I am creating spheres for each point as a GeometryModel3D and update their positions in the depthframe ready event. However, this method only works for upto 150 points. A depth format of 320x240 corresponds to 153600 points, and updating the positions of 153600 spheres freezes up the UI. In the depthframe ready event, I am simply updating the positions using

 geometryPoints[i].Transform = new TranslateTransform3D(x[i], y[i], z[i]);

where geometryPoints is an array of 153600 GeometryModel3D and x, y, z are the depth data from the depth stream.

Any suggestions to avoid the UI freezing. Or simply its not possible to update this amount of sphere geometries in helix viewport 3d at 30fps?

Please advise.

Thanks


objo wrote at 2012-11-06 19:36:

That sounds like millions of triangles. I don't think you can update that fast on the ui thread, even if you just update the transforms of the Model3Ds...

see also http://msdn.microsoft.com/en-us/library/bb613553.aspx


pyrrhicpk wrote at 2012-11-08 09:37:

Is it possible to do this using PointsVisual3D instead of adding spheres? I can draw the whole point cloud using PointsVisual3D containing a list of all the points, but I dont know how to update the points. Any idea?

Thanks

0

How to store 3d models aspecially STL files in database?

Ardahan 9 years ago updated 9 years ago 5

I'am reading an STL file in my WPF c# application. I want to store it to database. All database connections are done but I don't know how to store 3d model in database. What kind of converting needed for this purpose? And later similarly I want to get that information from database to turn it 3d models.Is there any basic function for STL converting to binaries then merging it again?

0

facematerial manipulator in code

Solutionideas mod 9 years ago 0

FaceMaterial default's color is blue , I need to change facematerial color by C#


I coding...

main.FaceMaterial = Materials.Red

and try to set transparent

main.FaceMaterial = nothing

it's not happen anything. 'main' it still 'Blue'


Please help. How can I change this property?

and Thanks to all answer and suggestion.

0

Apply Lights to HelixViewport3D ?

Anonymous 10 years ago 0
This discussion was imported from CodePlex

wa_dev wrote at 2012-12-26 21:00:


I'm trying to apply lights to an STL file I'm loading into the viewport, but all I get is black object. I've tried a few different things, and no luck so far. I saw a similar thread here ... 

wa_dev wrote at 2012-12-27 00:39:

Here is the code I got working (in my experimental code)... seems I'm am just a newb here

 

	private void Window_Loaded(object sender, RoutedEventArgs e)
        {

            this.SetHelixViewport();
            this.HelixViewport.Children.Add(new DefaultLights());
            this.HelixViewport.Children.Add(new ModelVisual3D() { Content = this.GetStlGeometryModel() });

        }


        private GeometryModel3D GetStlGeometryModel()
        {
            MeshBuilder builder = new MeshBuilder(true, true);
            this.GetStlReader().Meshes.ToList().ForEach(m => builder.Append(m));

            DiffuseMaterial dm = new DiffuseMaterial(Brushes.Red);

            GeometryModel3D gm3d = new GeometryModel3D();
            gm3d.Geometry = builder.ToMesh();
            gm3d.Material = dm;
            return gm3d;
        }

        private void SetHelixViewport()
        {

            this.HelixViewport.IsHeadLightEnabled = true;
            this.HelixViewport.CameraRotationMode = CameraRotationMode.Trackball;
            this.HelixViewport.ZoomExtentsWhenLoaded = true;
            this.HelixViewport.Children.Clear();
        
        }

        private StLReader GetStlReader()
        {

            StLReader reader = new StLReader();
            reader.Read(SAMPLE_STL_FILEPATH);

            return reader;
        }

0

Performance

Anonymous 10 years ago updated by anonymous 5 years ago 11
This discussion was imported from CodePlex

everytimer wrote at 2013-11-09 11:20:

Hello, I'm thinking of implementing 3D capabilities to my software. My aim is to include some modelling and simple animations. I've downloaded the examples and they are working really slow (slow rotations, zoom, etc; even with simple geometries) and my computer has VERY high specs. I don't understand why this is happening, is because of WPF or is a flaw of Helix?
Thanks.
P.D.: I wanted to use this library because I've used OxyPlot in the same application and it works marvelously.

a5r wrote at 2013-11-09 11:50:

What about your videocard?

everytimer wrote at 2013-11-09 11:56:

Latest drivers, outstanding performance in all games: Gigabyte GeForce GTX 670 OC WF2 2GB GDDR5

Other components:
i7-3820 (10MB Cache), 16GB DDR3 RAM, 250GB SDD SATA3

everytimer wrote at 2013-11-10 12:49:

Here is a video showing the lag. Is this normal or something is wrong?

http://www.youtube.com/watch?v=U0nASDcXJoY&feature=youtu.be

a5r wrote at 2013-11-10 13:38:

For the car contour example I don't experience lag. In the video you posted I don't see too much problems either with the car contour example. In the second example, the background worker example I can confirm having more or less of the same lag (with my pc having lower specs compared to yours). But in the case of the background worker example my cpu usage is constantly 80 %. I guess this example does not exactly count for a simple geometry because it is constantly recreating countless ModelVisual3D objects. Is zooming and rotating also slow for the rest of the examples?

objo wrote at 2013-11-11 12:37:

I have not seen much lag in the contour example on my hardware (much lower specs than yours).
Are you rotating with touch or mouse gestures?
  1. Do you see this lag in other WPF3D applications? Try https://3dmoleculeviewer.codeplex.com/
  2. Have you tried to run the example applications outside Visual Studio?
0

3d model light problem?

Anonymous 10 years ago 0
This discussion was imported from CodePlex

pertican2010 wrote at 2014-08-10 14:41:

hi to all
I open my 3d model created by 3dmax in helixviewport3d all thing good but the lighting is high.

how I can low it?

my original model photo
http://www.uploadax.com/images/12976526694693013660.png

my 3dmax model
http://www.uploadax.com/images/36200050022924773294.png

helixviewport3d
http://www.uploadax.com/images/55643347555770947663.png

best regards

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

is this a problem with the 3ds loader or with the light setup of your scene?
0

Mouse Move Performance

Anonymous 10 years ago 0
This discussion was imported from CodePlex

BCBlanka wrote at 2014-01-10 13:42:

I am trying to improve the speed of my viewport (containing around 100 models) and I cannot figure out why the processor spikes when I am moving the mouse over the viewport.
https://www.youtube.com/watch?v=QysWHudOvdQ

I would like to be able to add more 3D models to my viewport and I am looking for a way of reducing the CPU load. Is there some functionality which can be "sacrificed" to get better performance?

Thanks,
Blanka

govert wrote at 2014-01-17 13:15:

WPF might be doing hit-testing while you move the mouse. There is some way to disable this, and then only do hist testing when you need to, or on a timer. See: http://blogs.msdn.com/b/wpf3d/archive/2009/05/18/3d-hit-testing.aspx

-Govert
0

SharpDX fork compilation error: Missing PepitaGet.Targets

Anonymous 10 years ago 0
This discussion was imported from CodePlex

luca82 wrote at 2013-04-16 09:29:

Hello!

I downloaded the SharpDX fork and launched HelixToolkit.SharpDX.Wpf_NET40.sln

But when I compile, I receive these errors:

E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\HelixToolkit.SharpDX.Wpf\HelixToolkit.SharpDX.Wpf_NET40.csproj : error : The imported project "E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Tools\Pepita\PepitaGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\HelixToolkit.SharpDX.Wpf\HelixToolkit.SharpDX.Wpf_NET40.csproj

E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\SimpleDemo\SimpleDemo.csproj : error : The imported project "E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Tools\Pepita\PepitaGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\SimpleDemo\SimpleDemo.csproj

E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\LightingDemo.SharpDX\LightingDemo.SharpDX.csproj : error : The imported project "E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Tools\Pepita\PepitaGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\LightingDemo.SharpDX\LightingDemo.SharpDX.csproj

E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\EnvironmentMapDemo\EnvironmentMapDemo.csproj : error : The imported project "E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Tools\Pepita\PepitaGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\EnvironmentMapDemo\EnvironmentMapDemo.csproj

E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\LineShadingDemo\LineShadingDemo.csproj : error : The imported project "E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Tools\Pepita\PepitaGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\LineShadingDemo\LineShadingDemo.csproj

E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\TemplateDemo\TemplateDemo.csproj : error : The imported project "E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Tools\Pepita\PepitaGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\TemplateDemo\TemplateDemo.csproj

E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\ManipulatorDemo\ManipulatorDemo.csproj : error : The imported project "E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Tools\Pepita\PepitaGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\ManipulatorDemo\ManipulatorDemo.csproj

E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\InstancingDemo\InstancingDemo.csproj : error : The imported project "E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Tools\Pepita\PepitaGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\InstancingDemo\InstancingDemo.csproj

E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\ShadowMapDemo\ShadowMapDemo.csproj : error : The imported project "E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Tools\Pepita\PepitaGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\ShadowMapDemo\ShadowMapDemo.csproj

E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\DeferredShadingDemo\DeferredShadingDemo.csproj : error : The imported project "E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Tools\Pepita\PepitaGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\DeferredShadingDemo\DeferredShadingDemo.csproj

E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\ImageViewDemo\ImageViewDemo.csproj : error : The imported project "E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Tools\Pepita\PepitaGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Examples\SharpDX.Wpf\ImageViewDemo\ImageViewDemo.csproj

E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\HelixToolkit.SharpDX.Wpf\HelixToolkit.SharpDX.Wpf_NET40.csproj : error : The imported project "E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\Tools\Pepita\PepitaGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. E:\helixtoolkit\forks_objo_sharpdx_f924bc5e5a58\Source\HelixToolkit.SharpDX.Wpf\HelixToolkit.SharpDX.Wpf_NET40.csproj

I think I'm missing PepitaGet.Targets... where can I get it?

Thanks in advance!

objo wrote at 2013-04-18 09:45:

It seems like the build in the sharpdx fork is broken at the moment.
(I think there is a .. missing in the path for the pepitaget target. There may also be a problem with the weaving task target.)

przem321 wrote at 2013-04-25 23:26:

Yes, its broken, there are Pepita and Weaver missing in the right place. I can't push at the moment due to several re-factoring reasons. Just copy the folder

from

..\forks_objo_sharpdx_f924bc5e5a58\Tools\NotifyPropertyWeaver
..\forks_objo_sharpdx_f924bc5e5a58\Tools\NuGet
..\forks_objo_sharpdx_f924bc5e5a58\Tools\Pepita

to

..\forks_objo_sharpdx_f924bc5e5a58\Source\Tools\NotifyPropertyWeaver
..\forks_objo_sharpdx_f924bc5e5a58\Source\Tools\NuGet
..\forks_objo_sharpdx_f924bc5e5a58\Source\Tools\Pepita

that should to it for the moment.

luca82 wrote at 2013-04-26 09:49:

thank you very much!

It did compile like a charm!

I only received these warning, but i suppose you ust know it :)

D:\helix\forks_objo_sharpdx_f924bc5e5a58\Source\HelixToolkit.SharpDX.Wpf\Controls\ViewportExtensions.cs(368,24,368,29): warning CS0618: 'HelixToolkit.SharpDX.Wpf.Ray3D' is obsolete: 'We do not need own structures, since SharpDX does it all for us.'
0

Do you have a Visual Basic 2005/2008 Sample Code?

Anonymous 10 years ago updated by anonymous 5 years ago 1
This discussion was imported from CodePlex

ermnet wrote at 2012-08-31 01:04:

Great project, the sample code looks great!

Do you have a sample written in Visual Basic 2008. I am a VB developer and have a hard time undestanding the WPF sample CS code and how it works.

Best Regards,

Edwin


objo wrote at 2012-08-31 07:00:

Sorry, I do not have any VB examples.


rocheey wrote at 2012-09-07 11:17:

Ive got some done in VB 2010 .....


ermnet wrote at 2012-09-28 16:35:

rocheey can you provide some sample VB code?


rocheey wrote at 2012-09-28 21:02:

Sure.... I put it aside for a little while, cause of one bug I ran into... but plan on getting back into this project soon.

The zip file is VB2010. Im using the express edition.

My mail server was flagging the zip file for having executables in them ... so I renamed the .zip file to .jpg

Just rename and unzip .....

Have fun!





On Fri, Sep 28, 2012 at 10:35 AM, ermnet <notifications@codeplex.com> wrote:

From: ermnet

rocheey can you provide some sample VB code?

Read the full discussion online.

To add a post to this discussion, reply to this email (helixToolkit@discussions.codeplex.com)

To start a new discussion for this project, email helixToolkit@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com



killtherisk wrote at 2012-12-23 16:43:

hi,
i'm interested too into VB examples.
Where can i find your VB2010.jpg file?
thanks in advance

rocheey wrote:
Sure.... I put it aside for a little while, cause of one bug I ran into... but plan on getting back into this project soon.
The zip file is VB2010. Im using the express edition.
My mail server was flagging the zip file for having executables in them ... so I renamed the .zip file to .jpg
Just rename and unzip .....
Have fun!

rocheey wrote at 2012-12-29 14:24:



On Sun, Dec 23, 2012 at 11:43 AM, killtherisk <notifications@codeplex.com> wrote:

From: killtherisk

hi,
i'm interested too into VB examples.
Where can i find your VB2010.jpg file?
thanks in advance

rocheey wrote:
Sure.... I put it aside for a little while, cause of one bug I ran into... but plan on getting back into this project soon.
The zip file is VB2010. Im using the express edition.
My mail server was flagging the zip file for having executables in them ... so I renamed the .zip file to .jpg
Just rename and unzip .....
Have fun!

Read the full discussion online.

To add a post to this discussion, reply to this email (helixToolkit@discussions.codeplex.com)

To start a new discussion for this project, email helixToolkit@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com



Lainy wrote at 2013-10-26 11:55:

Hi
Anyone able to post rocheey's VB source somewhere we can download it? It would be invaluable for me as I'm struggling to get Helix working at all in VB......

Thanks

rocheey wrote at 2013-10-26 17:39:

hey, this is rocheey. Im on my way out the door at work, but will send it your way monday morning (I'm east coast USA)
cheers


0

How to access different component from .3ds file

Anonymous 10 years ago 0
This discussion was imported from CodePlex

GhufranZahidi wrote at 2012-11-20 10:04:

Hi 

I want to access multiple component from .3ds file by name and try to move particular component, is it possible if yes then give method name, please reply