summaryrefslogtreecommitdiffstats
path: root/examples/3dstudioruntime2/simplewidget
diff options
context:
space:
mode:
Diffstat (limited to 'examples/3dstudioruntime2/simplewidget')
-rw-r--r--examples/3dstudioruntime2/simplewidget/doc/images/simplewidget.pngbin0 -> 233143 bytes
-rw-r--r--examples/3dstudioruntime2/simplewidget/doc/src/simplewidget.qdoc48
-rw-r--r--examples/3dstudioruntime2/simplewidget/main.cpp12
-rw-r--r--examples/3dstudioruntime2/simplewidget/presentation/SampleProject.uia16
-rw-r--r--examples/3dstudioruntime2/simplewidget/presentation/SampleProject.uip77
-rw-r--r--examples/3dstudioruntime2/simplewidget/presentation/maps/materials/shadow.pngbin0 -> 334 bytes
-rw-r--r--examples/3dstudioruntime2/simplewidget/presentation/maps/materials/spherical_checker.pngbin0 -> 11066 bytes
-rw-r--r--examples/3dstudioruntime2/simplewidget/presentation/materials/simple_glass.material197
-rw-r--r--examples/3dstudioruntime2/simplewidget/presentation/models/Speedometer/Speedometer.import39
-rw-r--r--examples/3dstudioruntime2/simplewidget/presentation/models/Speedometer/maps/Speed.pngbin0 -> 485677 bytes
-rw-r--r--examples/3dstudioruntime2/simplewidget/presentation/models/Speedometer/meshes/NeedleSpeed.meshbin0 -> 10880 bytes
-rw-r--r--examples/3dstudioruntime2/simplewidget/presentation/models/Speedometer/meshes/Speedometer.meshbin0 -> 484416 bytes
-rw-r--r--examples/3dstudioruntime2/simplewidget/simplewidget.qrc16
13 files changed, 386 insertions, 19 deletions
diff --git a/examples/3dstudioruntime2/simplewidget/doc/images/simplewidget.png b/examples/3dstudioruntime2/simplewidget/doc/images/simplewidget.png
new file mode 100644
index 0000000..a975c73
--- /dev/null
+++ b/examples/3dstudioruntime2/simplewidget/doc/images/simplewidget.png
Binary files differ
diff --git a/examples/3dstudioruntime2/simplewidget/doc/src/simplewidget.qdoc b/examples/3dstudioruntime2/simplewidget/doc/src/simplewidget.qdoc
new file mode 100644
index 0000000..ab02d59
--- /dev/null
+++ b/examples/3dstudioruntime2/simplewidget/doc/src/simplewidget.qdoc
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt 3D Studio.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example simplewidget
+ \title Qt 3D Studio Runtime: Simple Widget Example
+ \ingroup qt3dstudioruntime2-examples-cpp
+ \brief Demonstrates using the Q3DSWidget widget in a Qt C++ application
+
+ \image simplewidget.png
+
+ \e {This example demonstrates basic usage of the Q3DSWidget class}
+
+ \include examples-run.qdocinc
+
+ \section1 Description
+
+ This example consists of a simple widget UI that includes a
+ Q3DSWidget. This QOpenGLWidget subclass displays and controls Qt
+ 3D Studio presentations. Changing the value of a text node via
+ data input, basic error handling, and the means of reloading or
+ opening presentations, as well as toggling the in-scene profiling
+ pane are also demonstrated.
+*/
diff --git a/examples/3dstudioruntime2/simplewidget/main.cpp b/examples/3dstudioruntime2/simplewidget/main.cpp
index 50b3fac..6d02374 100644
--- a/examples/3dstudioruntime2/simplewidget/main.cpp
+++ b/examples/3dstudioruntime2/simplewidget/main.cpp
@@ -59,7 +59,6 @@
#include <q3dsruntimeglobal.h>
#include <Q3DSWidget>
#include <Q3DSPresentation>
-#include <Q3DSDataInput>
int main(int argc, char *argv[])
{
@@ -81,17 +80,8 @@ int main(int argc, char *argv[])
QMessageBox::critical(&w, QLatin1String("Failed to load presentation"), msg, QLatin1String("Ok"));
});
- // The presentation has a data input entry "di_text" for the textstring
- // property of one of the Text nodes. Provide a custom value. Do this in a
- // manner so that the value is set even when doing a Reload or changing the
- // presentation object's source.
- Q3DSDataInput dataInput(w3DS->presentation(), QLatin1String("di_text"));
- QObject::connect(w3DS, &Q3DSWidget::presentationLoaded, w3DS, [&dataInput] {
- dataInput.setValue(QLatin1String("Hello world"));
- });
-
w3DS->presentation()->setProfilingEnabled(true);
- w3DS->presentation()->setSource(QUrl(QLatin1String("qrc:/barrel.uip")));
+ w3DS->presentation()->setSource(QUrl(QLatin1String("qrc:/presentation/SampleProject.uia")));
layout->addWidget(w3DS);
QPushButton *openBtn = new QPushButton(QLatin1String("Open"));
diff --git a/examples/3dstudioruntime2/simplewidget/presentation/SampleProject.uia b/examples/3dstudioruntime2/simplewidget/presentation/SampleProject.uia
new file mode 100644
index 0000000..d59165e
--- /dev/null
+++ b/examples/3dstudioruntime2/simplewidget/presentation/SampleProject.uia
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application xmlns="http://qt.io/qt3dstudio/uia">
+ <assets initial="SampleProject">
+ <presentation id="SampleProject" src="SampleProject.uip"/>
+ </assets>
+
+ <statemachine ref="#logic">
+ <visual-states>
+ <state ref="Initial">
+ <enter>
+ <goto-slide element="main:Scene" rel="next"/>
+ </enter>
+ </state>
+ </visual-states>
+ </statemachine>
+</application>
diff --git a/examples/3dstudioruntime2/simplewidget/presentation/SampleProject.uip b/examples/3dstudioruntime2/simplewidget/presentation/SampleProject.uip
new file mode 100644
index 0000000..4c1325e
--- /dev/null
+++ b/examples/3dstudioruntime2/simplewidget/presentation/SampleProject.uip
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<UIP version="3" >
+ <Project >
+ <ProjectSettings author="" company="" presentationWidth="800" presentationHeight="800" maintainAspect="True" >
+ <CustomColors count="16" >#ff5500 #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff</CustomColors>
+ </ProjectSettings>
+ <Classes >
+ <CustomMaterial id="simple_glass" name="simple_glass" sourcepath="materials/simple_glass.material" />
+ </Classes>
+ <Graph >
+ <Scene id="Scene" >
+ <Layer id="Layer2" >
+ <Camera id="Camera_001" />
+ <Light id="Light_001" />
+ <Model id="NeedleSpeed_001" name="NeedleSpeed" importid="NeedleSpeed" orientation="Right Handed" position="0 0 -0" rotation="0 -0 0" rotationorder="XYZr" scale="1 1 1" sourcepath="models/Speedometer/meshes/NeedleSpeed.mesh" >
+ <Material id="NeedleBlack_002" name="NeedleBlack" blendmode="Normal" diffuse="0 0 0" emissivepower="0" importid="NeedleBlack" opacity="100" specularamount="0" specularroughness="9.41177" />
+ <Material id="NeedleWhite_002" />
+ </Model>
+ </Layer>
+ <Layer id="Layer" >
+ <Camera id="Camera" />
+ <Light id="Light" />
+ <Group id="Speedometer" importid="__import__root__" >
+ <Group id="Group_Speedometer_Master" name="Group_Speedometer_Master" importid="Group_Speedometer_Master" orientation="Right Handed" position="0 0 -0" rotation="0 -0 0" rotationorder="XYZr" scale="1 1 1" >
+ <Model id="Speedometer_001" name="Speedometer" importid="Speedometer" orientation="Right Handed" position="0 0 -0" rotation="0 -0 0" rotationorder="XYZr" scale="1 1 1" sourcepath="models/Speedometer/meshes/Speedometer.mesh" >
+ <CustomMaterial id="BaseMetal" class="#simple_glass" />
+ <ReferencedMaterial id="HighLight" />
+ <Material id="NeedleWhite_001" name="NeedleWhite" blendmode="Normal" diffuse="0.8 0.8 0.8" emissivepower="0" importid="NeedleWhite_0005" opacity="100" specularamount="0" specularroughness="27.451" />
+ <Material id="BlackMetalRing" name="BlackMetalRing" blendmode="Normal" diffuse="0.0578313 0.0578313 0.0578313" emissivepower="0" importid="BlackMetalRing" opacity="100" specularamount="0" specularroughness="99.8039" />
+ <Material id="NeedleBlack_001" name="NeedleBlack" blendmode="Normal" diffuse="0 0 0" emissivepower="0" importid="NeedleBlack_0006" opacity="100" specularamount="0" specularroughness="9.41177" />
+ <Material id="SpeedometerBg" name="SpeedometerBg" blendmode="Normal" diffuse="1 1 1" diffusemap="#SpeedometerBg_diffusemap" emissivepower="0" importid="SpeedometerBg" opacity="100" specularamount="0" specularroughness="9.41177" >
+ <Image id="SpeedometerBg_diffusemap" name="SpeedometerBg_diffusemap" importid="SpeedometerBg_diffusemap" sourcepath="models/Speedometer/maps/Speed.png" />
+ </Material>
+ </Model>
+ </Group>
+ </Group>
+ </Layer>
+ </Scene>
+ </Graph>
+ <Logic >
+ <State name="Master Slide" component="#Scene" >
+ <Add ref="#Layer" multisampleaa="SSAA" probebright="500" />
+ <Add ref="#Camera" fov="30" position="0 0 -400" />
+ <Add ref="#Light" brightness="200" lightdiffuse="1 1 1" lightspecular="0 0.666667 1" lighttype="Point" pivot="100 0 0" position="0 0 -50" >
+ <AnimationTrack property="rotation.x" type="EaseInOut" >0 0 100 100 5 0 100 100</AnimationTrack>
+ <AnimationTrack property="rotation.y" type="EaseInOut" >0 0 100 100 5 0 100 100</AnimationTrack>
+ <AnimationTrack property="rotation.z" type="EaseInOut" >0 45 100 100 5 -225 100 100</AnimationTrack>
+ </Add>
+ <State id="Scene-Slide1" name="Slide1" playmode="PingPong" playthroughto="Next" >
+ <Set ref="#Layer" endtime="5000" />
+ <Set ref="#Camera" endtime="5000" />
+ <Set ref="#Light" endtime="5000" />
+ <Add ref="#Layer2" name="Layer2" endtime="5000" multisampleaa="None" progressiveaa="8x" />
+ <Add ref="#Camera_001" endtime="5000" fov="30" position="0 0 -600" />
+ <Add ref="#Light_001" endtime="5000" />
+ <Add ref="#NeedleSpeed_001" name="NeedleSpeed" endtime="5000" importfile="models/Speedometer/Speedometer.import" pivot="5 5 0" >
+ <AnimationTrack property="rotation.x" type="EaseInOut" >0 0 100 100 2.13 0 0 0 5 0 100 100</AnimationTrack>
+ <AnimationTrack property="rotation.y" type="EaseInOut" >0 0 100 100 2.13 0 0 0 5 0 100 100</AnimationTrack>
+ <AnimationTrack property="rotation.z" type="EaseInOut" >0 0 100 100 2.13 -105.249 0 0 5 -270 100 100</AnimationTrack>
+ </Add>
+ <Add ref="#NeedleBlack_002" diffuse="0 0.333333 1" importfile="models/Speedometer/Speedometer.import" />
+ <Add ref="#NeedleWhite_002" name="NeedleWhite" diffuse="1 1 1" specularamount="0" />
+ <Add ref="#Speedometer" name="Speedometer" endtime="5000" importfile="models/Speedometer/Speedometer.import" position="0 0 0" scale="0.7 0.7 0.7" sourcepath="models/Speedometer/Speedometer.import" />
+ <Add ref="#Group_Speedometer_Master" endtime="5000" importfile="models/Speedometer/Speedometer.import" />
+ <Add ref="#Speedometer_001" endtime="5000" importfile="models/Speedometer/Speedometer.import" />
+ <Add ref="#BaseMetal" name="BaseMetal" glass_color="0 0.333333 1" />
+ <Add ref="#HighLight" name="HighLight" endtime="5000" referencedmaterial="#BaseMetal" />
+ <Add ref="#NeedleWhite_001" importfile="models/Speedometer/Speedometer.import" />
+ <Add ref="#BlackMetalRing" diffuse="0 0.0862745 0.596078" importfile="models/Speedometer/Speedometer.import" specularamount="0" />
+ <Add ref="#NeedleBlack_001" importfile="models/Speedometer/Speedometer.import" />
+ <Add ref="#SpeedometerBg" diffuse="0.270588 0.501961 1" importfile="models/Speedometer/Speedometer.import" specularamount="0.1" specularroughness="1" speculartint="0.529412 0.772549 1" />
+ <Add ref="#SpeedometerBg_diffusemap" importfile="models/Speedometer/Speedometer.import" />
+ </State>
+ </State>
+ </Logic>
+ </Project>
+</UIP>
diff --git a/examples/3dstudioruntime2/simplewidget/presentation/maps/materials/shadow.png b/examples/3dstudioruntime2/simplewidget/presentation/maps/materials/shadow.png
new file mode 100644
index 0000000..599b1cc
--- /dev/null
+++ b/examples/3dstudioruntime2/simplewidget/presentation/maps/materials/shadow.png
Binary files differ
diff --git a/examples/3dstudioruntime2/simplewidget/presentation/maps/materials/spherical_checker.png b/examples/3dstudioruntime2/simplewidget/presentation/maps/materials/spherical_checker.png
new file mode 100644
index 0000000..e42394d
--- /dev/null
+++ b/examples/3dstudioruntime2/simplewidget/presentation/maps/materials/spherical_checker.png
Binary files differ
diff --git a/examples/3dstudioruntime2/simplewidget/presentation/materials/simple_glass.material b/examples/3dstudioruntime2/simplewidget/presentation/materials/simple_glass.material
new file mode 100644
index 0000000..a6b4ee0
--- /dev/null
+++ b/examples/3dstudioruntime2/simplewidget/presentation/materials/simple_glass.material
@@ -0,0 +1,197 @@
+<Material name="simple_glass" version="1.0">
+ <MetaData >
+ <Property formalName="Environment Map" name="uEnvironmentTexture" description="Environment texture for the material" type="Texture" filter="linear" minfilter="linearMipmapLinear" clamp="repeat" usage="environment" default="./maps/materials/spherical_checker.png" category="Material"/>
+ <Property formalName="Enable Environment" name="uEnvironmentMappingEnabled" description="Enable environment mapping" type="Boolean" default="True" category="Material"/>
+ <Property formalName="Baked Shadow Map" name="uBakedShadowTexture" description="Baked shadow texture for the material" type="Texture" filter="linear" minfilter="linearMipmapLinear" clamp="repeat" usage="shadow" default="./maps/materials/shadow.png" category="Material"/>
+ <Property formalName="Enable Shadow Mapping" name="uShadowMappingEnabled" description="Enable shadow mapping" type="Boolean" default="False" category="Material"/>
+ <Property formalName="Fresnel Power" name="uFresnelPower" description="Fresnel power of the material" type="Float" default="1.0" category="Material"/>
+ <Property formalName="Minimum Opacity" name="uMinOpacity" description="Minimum opacity of the material" type="Float" default="0.5" category="Material"/>
+ <Property formalName="Reflectivity" name="reflectivity_amount" type="Float" min="0.000000" max="1.000000" default="1.000000" description="Reflectivity factor" category="Material"/>
+ <Property formalName="Glass ior" name="glass_ior" hidden="True" type="Float" default="1.100000" description="Index of refraction of the material" category="Material"/>
+ <Property formalName="Glass Color" name="glass_color" type="Color" default="0.9 0.9 0.9" description="Color of the material" category="Material"/>
+ </MetaData>
+ <Shaders type="GLSL" version="330">
+ <Shader>
+ <Shared> </Shared>
+<VertexShader>
+ </VertexShader>
+ <FragmentShader>
+
+// add enum defines
+#define scatter_reflect 0
+#define scatter_transmit 1
+#define scatter_reflect_transmit 2
+
+#define QT3DS_ENABLE_UV0 1
+#define QT3DS_ENABLE_WORLD_POSITION 1
+#define QT3DS_ENABLE_TEXTAN 1
+#define QT3DS_ENABLE_BINORMAL 0
+
+#include "vertexFragmentBase.glsllib"
+
+// set shader output
+out vec4 fragColor;
+
+// add structure defines
+struct layer_result
+{
+ vec4 base;
+ vec4 layer;
+ mat3 tanFrame;
+};
+
+
+// temporary declarations
+vec3 ftmp0;
+ vec4 tmpShadowTerm;
+
+layer_result layers[1];
+
+#include "SSAOCustomMaterial.glsllib"
+#include "sampleLight.glsllib"
+#include "sampleProbe.glsllib"
+#include "sampleArea.glsllib"
+#include "square.glsllib"
+#include "calculateRoughness.glsllib"
+#include "evalBakedShadowMap.glsllib"
+#include "evalEnvironmentMap.glsllib"
+#include "luminance.glsllib"
+#include "microfacetBSDF.glsllib"
+#include "physGlossyBSDF.glsllib"
+#include "simpleGlossyBSDF.glsllib"
+#include "abbeNumberIOR.glsllib"
+#include "fresnelLayer.glsllib"
+#include "refraction.glsllib"
+
+bool evalTwoSided()
+{
+ return( true );
+}
+
+vec3 computeFrontMaterialEmissive()
+{
+ return( vec3( 0, 0, 0 ) );
+}
+
+void computeFrontLayerColor( in vec3 normal, in vec3 lightDir, in vec3 viewDir, in vec3 lightDiffuse, in vec3 lightSpecular, in float materialIOR, float aoFactor )
+{
+#if QT3DS_ENABLE_CG_LIGHTING
+ layers[0].base += tmpShadowTerm * microfacetBSDF( layers[0].tanFrame, lightDir, viewDir, lightSpecular, materialIOR, 0.000000, 0.000000, scatter_reflect_transmit );
+
+#endif
+}
+
+void computeFrontAreaColor( in int lightIdx, in vec4 lightDiffuse, in vec4 lightSpecular )
+{
+#if QT3DS_ENABLE_CG_LIGHTING
+ layers[0].base += tmpShadowTerm * lightSpecular * sampleAreaGlossy( layers[0].tanFrame, varWorldPos, lightIdx, viewDir, 0.000000, 0.000000 );
+
+#endif
+}
+
+void computeFrontLayerEnvironment( in vec3 normal, in vec3 viewDir, float aoFactor )
+{
+#if !QT3DS_ENABLE_LIGHT_PROBE
+ layers[0].base += tmpShadowTerm * microfacetSampledBSDF( layers[0].tanFrame, viewDir, 0.000000, 0.000000, scatter_reflect_transmit );
+
+#else
+ layers[0].base += tmpShadowTerm * sampleGlossyAniso( layers[0].tanFrame, viewDir, 0.000000, 0.000000 );
+
+#endif
+}
+
+vec3 computeBackMaterialEmissive()
+{
+ return( vec3(0, 0, 0) );
+}
+
+void computeBackLayerColor( in vec3 normal, in vec3 lightDir, in vec3 viewDir, in vec3 lightDiffuse, in vec3 lightSpecular, in float materialIOR, float aoFactor )
+{
+#if QT3DS_ENABLE_CG_LIGHTING
+ layers[0].base += vec4( 0.0, 0.0, 0.0, 1.0 );
+ layers[0].layer += vec4( 0.0, 0.0, 0.0, 1.0 );
+#endif
+}
+
+void computeBackAreaColor( in int lightIdx, in vec4 lightDiffuse, in vec4 lightSpecular )
+{
+#if QT3DS_ENABLE_CG_LIGHTING
+ layers[0].base += vec4( 0.0, 0.0, 0.0, 1.0 );
+ layers[0].layer += vec4( 0.0, 0.0, 0.0, 1.0 );
+#endif
+}
+
+void computeBackLayerEnvironment( in vec3 normal, in vec3 viewDir, float aoFactor )
+{
+#if !QT3DS_ENABLE_LIGHT_PROBE
+ layers[0].base += vec4( 0.0, 0.0, 0.0, 1.0 );
+ layers[0].layer += vec4( 0.0, 0.0, 0.0, 1.0 );
+#else
+ layers[0].base += vec4( 0.0, 0.0, 0.0, 1.0 );
+ layers[0].layer += vec4( 0.0, 0.0, 0.0, 1.0 );
+#endif
+}
+
+float computeIOR()
+{
+ return( true ? 1.0 : luminance( vec3( abbeNumberIOR(glass_ior, 0.000000 ) ) ) );
+}
+
+float evalCutout()
+{
+ return( 1.000000 );
+}
+
+vec3 computeNormal()
+{
+ return( normal );
+}
+
+void computeTemporaries()
+{
+ ftmp0 = vec3( reflectivity_amount );
+ tmpShadowTerm = evalBakedShadowMap( texCoord0 );
+}
+
+vec4 computeLayerWeights( in float alpha )
+{
+ vec4 color;
+ color = layers[0].base * vec4( ftmp0, 1.0);
+ return color;
+}
+
+
+void initializeLayerVariables(void)
+{
+ // clear layers
+ layers[0].base = vec4(0.0, 0.0, 0.0, 1.0);
+ layers[0].layer = vec4(0.0, 0.0, 0.0, 1.0);
+ layers[0].tanFrame = orthoNormalize( tangentFrame( normal, varWorldPos ) );
+}
+
+vec4 computeGlass(in vec3 normal, in float materialIOR, in float alpha, in vec4 color)
+{
+ vec4 rgba = color;
+ float ratio = simpleFresnel( normal, materialIOR, uFresnelPower );
+ vec3 absorb_color = ( log( glass_color )/-1.000000 );
+ // prevent log(0) -> inf number issue
+ if ( isinf(absorb_color.r) ) absorb_color.r = 1.0;
+ if ( isinf(absorb_color.g) ) absorb_color.g = 1.0;
+ if ( isinf(absorb_color.b) ) absorb_color.b = 1.0;
+ rgba.rgb = mix(vec3(1.0) - absorb_color, rgba.rgb * (vec3(1.0) - absorb_color), ratio);
+ rgba.a = mix(uMinOpacity, alpha, ratio);
+ return rgba;
+}
+
+ </FragmentShader>
+ </Shader>
+ </Shaders>
+<Passes >
+ <ShaderKey value="36"/>
+ <LayerKey count="1"/>
+ <Pass >
+ <Blending source="SrcAlpha" dest="OneMinusSrcAlpha"/>
+ <RenderState name="CullFace"/>
+ </Pass>
+</Passes>
+</Material>
diff --git a/examples/3dstudioruntime2/simplewidget/presentation/models/Speedometer/Speedometer.import b/examples/3dstudioruntime2/simplewidget/presentation/models/Speedometer/Speedometer.import
new file mode 100644
index 0000000..d74ef62
--- /dev/null
+++ b/examples/3dstudioruntime2/simplewidget/presentation/models/Speedometer/Speedometer.import
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<UIP Version="1" >
+ <Project Revision="1" >
+ <Graph >
+ <Group id="__import__root__" >
+ <Group id="Group_Speedometer_Master" name="Group_Speedometer_Master" orientation="Right Handed" position="0 0 -0" rotation="0 -0 0" rotationorder="XYZr" scale="1 1 1" >
+ <Model id="NeedleSpeed" name="NeedleSpeed" orientation="Right Handed" position="0 0 -0" rotation="0 -0 0" rotationorder="XYZr" scale="1 1 1" sourcepath="meshes/NeedleSpeed.mesh" >
+ <Material id="NeedleBlack" name="NeedleBlack" blendmode="Normal" diffuse="0 0 0" emissivepower="0" opacity="100" specularamount="0" specularroughness="9.41177" />
+ <Material id="NeedleWhite" name="NeedleWhite" blendmode="Normal" diffuse="0.8 0.8 0.8" emissivepower="0" opacity="100" specularamount="0" specularroughness="27.451" />
+ </Model>
+ <Model id="Speedometer" name="Speedometer" orientation="Right Handed" position="0 0 -0" rotation="0 -0 0" rotationorder="XYZr" scale="1 1 1" sourcepath="meshes/Speedometer.mesh" >
+ <Material id="BaseMetal" name="BaseMetal" blendmode="Normal" diffuse="0.01728 0.01728 0.01728" emissivepower="0" opacity="100" specularamount="0" specularroughness="11.3725" />
+ <Material id="HighLight" name="HighLight" blendmode="Normal" diffuse="0.298 0.54088 0.8" emissivepower="0" opacity="66.8675" specularamount="0" specularroughness="100" />
+ <Material id="NeedleWhite_0005" name="NeedleWhite" blendmode="Normal" diffuse="0.8 0.8 0.8" emissivepower="0" opacity="100" specularamount="0" specularroughness="27.451" />
+ <Material id="BlackMetalRing" name="BlackMetalRing" blendmode="Normal" diffuse="0.0578313 0.0578313 0.0578313" emissivepower="0" opacity="100" specularamount="0" specularroughness="99.8039" />
+ <Material id="NeedleBlack_0006" name="NeedleBlack" blendmode="Normal" diffuse="0 0 0" emissivepower="0" opacity="100" specularamount="0" specularroughness="9.41177" />
+ <Material id="SpeedometerBg" name="SpeedometerBg" blendmode="Normal" diffuse="1 1 1" diffusemap="SpeedometerBg_diffusemap" emissivepower="0" opacity="100" specularamount="0" specularroughness="9.41177" >
+ <Image id="SpeedometerBg_diffusemap" name="SpeedometerBg_diffusemap" sourcepath="maps/Speed.png" />
+ </Material>
+ </Model>
+ </Group>
+ </Group>
+ </Graph>
+ <Import SrcFile="" ImageDir="Images" MeshDir="Meshes" >
+ <Image >
+ <Source >Speed.png</Source>
+ <Dest >maps/Speed.png</Dest>
+ </Image>
+ <Mesh >
+ <Source >Speedometer</Source>
+ <Dest >meshes/Speedometer.mesh</Dest>
+ </Mesh>
+ <Mesh >
+ <Source >NeedleSpeed</Source>
+ <Dest >meshes/NeedleSpeed.mesh</Dest>
+ </Mesh>
+ </Import>
+ </Project>
+</UIP>
diff --git a/examples/3dstudioruntime2/simplewidget/presentation/models/Speedometer/maps/Speed.png b/examples/3dstudioruntime2/simplewidget/presentation/models/Speedometer/maps/Speed.png
new file mode 100644
index 0000000..84b7e4d
--- /dev/null
+++ b/examples/3dstudioruntime2/simplewidget/presentation/models/Speedometer/maps/Speed.png
Binary files differ
diff --git a/examples/3dstudioruntime2/simplewidget/presentation/models/Speedometer/meshes/NeedleSpeed.mesh b/examples/3dstudioruntime2/simplewidget/presentation/models/Speedometer/meshes/NeedleSpeed.mesh
new file mode 100644
index 0000000..72220cd
--- /dev/null
+++ b/examples/3dstudioruntime2/simplewidget/presentation/models/Speedometer/meshes/NeedleSpeed.mesh
Binary files differ
diff --git a/examples/3dstudioruntime2/simplewidget/presentation/models/Speedometer/meshes/Speedometer.mesh b/examples/3dstudioruntime2/simplewidget/presentation/models/Speedometer/meshes/Speedometer.mesh
new file mode 100644
index 0000000..9f7ba34
--- /dev/null
+++ b/examples/3dstudioruntime2/simplewidget/presentation/models/Speedometer/meshes/Speedometer.mesh
Binary files differ
diff --git a/examples/3dstudioruntime2/simplewidget/simplewidget.qrc b/examples/3dstudioruntime2/simplewidget/simplewidget.qrc
index e9b7006..3f6f2fa 100644
--- a/examples/3dstudioruntime2/simplewidget/simplewidget.qrc
+++ b/examples/3dstudioruntime2/simplewidget/simplewidget.qrc
@@ -1,12 +1,12 @@
<RCC>
<qresource prefix="/">
- <file alias="barrel.uia">../simpleqml/presentation/barrel.uia</file>
- <file alias="barrel.uip">../simpleqml/presentation/barrel.uip</file>
- <file alias="barrel/meshes/Barrel.mesh">../simpleqml/presentation/barrel/meshes/Barrel.mesh</file>
- <file alias="fonts/Arimo-Regular.ttf">../simpleqml/presentation/fonts/Arimo-Regular.ttf</file>
- <file alias="maps/barrel_barrel_Diffuse.png">../simpleqml/presentation/maps/barrel_barrel_Diffuse.png</file>
- <file alias="maps/barrel_barrel_Emissive.png">../simpleqml/presentation/maps/barrel_barrel_Emissive.png</file>
- <file alias="maps/barrel_barrel_Normal.png">../simpleqml/presentation/maps/barrel_barrel_Normal.png</file>
- <file alias="maps/barrel_barrel_Specular.png">../simpleqml/presentation/maps/barrel_barrel_Specular.png</file>
+ <file>presentation/SampleProject.uia</file>
+ <file>presentation/SampleProject.uip</file>
+ <file>presentation/maps/materials/spherical_checker.png</file>
+ <file>presentation/maps/materials/shadow.png</file>
+ <file>presentation/materials/simple_glass.material</file>
+ <file>presentation/models/Speedometer/maps/Speed.png</file>
+ <file>presentation/models/Speedometer/meshes/Speedometer.mesh</file>
+ <file>presentation/models/Speedometer/meshes/NeedleSpeed.mesh</file>
</qresource>
</RCC>