helix-toolkit / helix-toolkit

Helix Toolkit is a collection of 3D components for .NET.
http://helix-toolkit.org/
MIT License
1.78k stars 653 forks source link

use PostEffectMeshBorderHighlight zoom delay #2202

Closed lif-enable closed 5 days ago

lif-enable commented 3 weeks ago

I use PostEffectMeshBorderHighlight display mesh outline, meshnode count >1000, There is a significant delay when zoom scene code `<hx:Viewport3DX Grid.Column="0" Grid.Row="0"

        x:Name="view1"
        Camera="{Binding Camera}"
        EffectsManager="{Binding EffectsManager}"
        Title="{Binding Title}"
        SubTitle="{Binding SubTitle}"
            InfoForeground="Blue"

        ShowCoordinateSystem="True"

        EnableDesignModeRendering="true"
            IsInertiaEnabled="True"

        EnableRenderOrder="True"
        EnableMouseButtonHitTest="True"
         IsManipulationEnabled="False"
            ShowCameraInfo="False"
            ShowCameraTarget="False"
       MSAA="Disable" 
                 EnableSwapChainRendering="True"
        FXAALevel="Low" 
        FixedRotationPoint="{Binding ModelCentroid}"
        FixedRotationPointEnabled="True" 
            EnableRenderFrustum="True"
            UseDefaultGestures="False"  
                >

                <hx:Viewport3DX.InputBindings>
                    <KeyBinding Key="B" Command="hx:ViewportCommands.BackView" />
                    <KeyBinding Key="F" Command="hx:ViewportCommands.FrontView" />
                    <KeyBinding Key="U" Command="hx:ViewportCommands.TopView" />
                    <KeyBinding Key="D" Command="hx:ViewportCommands.BottomView" />
                    <KeyBinding Key="L" Command="hx:ViewportCommands.LeftView" />
                    <KeyBinding Key="R" Command="hx:ViewportCommands.RightView" />
                    <KeyBinding Command="hx:ViewportCommands.ZoomExtents" Gesture="Control+E" />
                    <MouseBinding Command="hx:ViewportCommands.Rotate" Gesture="RightClick" />
                    <MouseBinding Command="hx:ViewportCommands.Zoom" Gesture="MiddleClick" />
                    <MouseBinding Command="hx:ViewportCommands.Pan" Gesture="LeftClick" />
                </hx:Viewport3DX.InputBindings>

                <hx:AmbientLight3D Color="White" /> 

                <hx:PostEffectMeshBorderHighlight
                        DrawMode="Separated"

                        EffectName="highlight"
                        IsHitTestVisible="False"   />
                <hx:PostEffectMeshOutlineBlur

                        NumberOfBlurPass="2"
                        EffectName="blur"
                        IsHitTestVisible="False"   />
                <hx:Element3DPresenter    Content="{Binding GroupModel}"   >

                </hx:Element3DPresenter>

            </hx:Viewport3DX>

`

holance commented 3 weeks ago

You need to reduce number of mesh nodes. No sure why you need to highlight so many of them. Could you provide more context of what you are trying to do?

lif-enable commented 3 weeks ago

model is a machine with shell 、parts 。。。。,and user need click some inner face to set params 。

lif-enable commented 3 weeks ago

I use material opacity + border help user find face

holance commented 3 weeks ago

What's the graphics card are you using?

lif-enable commented 3 weeks ago

NV T600 Laptop

holance commented 3 weeks ago

Make sure your program is running on the external graphics card.

holance commented 3 weeks ago

Also if you set draw mode to separate, it's gonna be much slower.

lif-enable commented 3 weeks ago

Make sure your program is running on the external graphics card.

yes,i disabled inter graphics card

lif-enable commented 3 weeks ago

Also if you set draw mode to separate, it's gonna be much slower. if I create some groupnode , how to display groupnode border?

holance commented 3 weeks ago

Group border is not supported at this moment.