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

Apply Lights to HelixViewport3D ?

Anonymous 11 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 11 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 11 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 11 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 11 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 11 years ago updated by anonymous 6 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 11 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

0

Is there a method to reset viewport to fit all the model?

Anonymous 11 years ago 0
This discussion was imported from CodePlex

chinh_nguyen wrote at 2013-01-10 15:35:

Hi,

I have with me all the Points3D's min, max X,Y,Z value. Is there a method to reset viewport to fit all the model?

0

Need help to set CuttingPlane group to cut models

Anonymous 11 years ago 0
This discussion was imported from CodePlex

terry_513 wrote at 2014-03-29 08:01:

In my Model I have N number of pipes attached one after other. Model is in CuttingPlaneGroup. All pipes are of same width, but of different length and drawn in an angle - i.e. all may not be in a straight line vertically. When I apply the cuttingPlane, I want all pipes to be cut from middle into halfs' vertically. MY cuttingPlane code is :
                <helix:CuttingPlaneGroup x:Name="cuttingGroup1">
                    <helix:CuttingPlaneGroup.CuttingPlanes>
                        <helix:Plane3D Normal="1,0,4" />                        
                    </helix:CuttingPlaneGroup.CuttingPlanes>
                    
                    <ModelVisual3D x:Name="model"  >
                    </ModelVisual3D>
            </helix:CuttingPlaneGroup>
With above code, 1st pipe cuts properly, but then other pipes are not cut properly from center and possibly last pipe may not be cut at all. The below image shows the output result of the code and what I am trying to explain :
https://drive.google.com/file/d/0B60M7Kj_SwHZS2ZFTXVqNHhoMGc/edit?usp=sharing



Can anyone help me know, how can I make all pipes cut from center. In the above case, their are 4 pipes, do I need to add 4 CuttingPlanes in the group ? If so, then how do I specify the x, y and the angle in which it has to cut ?

I searched a lot for the above problem on net, but couldn't find any solution or way for the same. Can you please help or guide me know how can I achieve what I am looking for ? I believe it should be possible, just that don't know how !!!

Any help is highly appreciated. Thanks.

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

This may be a bug or limitation in the CuttingPlaneGroup element. Can you create a simple example that we can use to debug? This should probably be added to the issues list.
0

Camera LookDirection Automatically

Ardahan 10 years ago updated by anonymous 8 years ago 2

I adding to my viewport3d a model (STL file) using ModelImport function but first nothing show up. To see added 3DModel I have to do zoom out. My question is, are there any way to do dynamically/programmatically zoom out or rotate camera to the newly added model or anything needed to show it immediately.

I am using C# WPF.