Pre loader

How to Compile a 3D model(like obj model) to a DLL?

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

Closed
0
0

Hello, I am looking for a solution about how to get a 3D model DLL, like Schichart did in the example:SciChart_AddObjectsToa3DChart, and the name of DLL is: SciChart.Examples.ExternalDependencies.
I wish I can also compile a 3d model into DLL, because if I import directly an Obj model, it will become a huge burden for WPF.
Please help me if you have some ideas. Thanks!

Version
v5.4
  • You must to post comments
1
0

Hi Jong Ming

This should be apparent from our WPF Examples source code for ‘Add Objects to a 3D Chart

enter image description here

In this example, we include an object in th application like this

<UserControl 
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:local="clr-namespace:SciChart.Examples.Examples.Charts3D.Customize3DChart"
     xmlns:object="clr-namespace:SciChart.Charting3D.Visuals.Object;assembly=SciChart.Charting3D"
     ...>

    <UserControl.Resources>

        <object:ObjectModelSource x:Key="PawnLowObj3DSource" Source="pack://application:,,,/SciChart.Examples.ExternalDependencies;component/Resources/Objects/Pawn_Low.obj"/>

    </UserControl.Resources>

    <s3D:SciChart3DSurface>

       ... 
        <s3D:SciChart3DSurface.SceneObjects>

            <object:ObjectModel3D TextureSource="{StaticResource BlackTexture}" Source="{StaticResource PawnLowObj3DSource}" Position="0.1875, 0.6, 0.8125" CoordinateMode="Relative" Scale="0.2, 0.2, 0.2"/>
        </s3D:SciChart3DSurface.SceneObjects>
    </s3D:SciChart3DSurface>

</UserControl>

The actual Obj files are included as Resource in the project properties:
enter image description here

Please let me know if this helps

Best regards,
Andrew

  • Jong Ming
    Thank you so much for your answer! It helps a lot!
  • You must to post comments
Showing 1 result

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies