Commit fc440e83 authored by Sandeep Pariyar's avatar Sandeep Pariyar
Browse files

infinity, a simple 3d demo to see how light shadow reacts

parent dc8849ed
cmake_minimum_required(VERSION 3.18)
project(Simple3DApp LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
find_package(Qt6 COMPONENTS Gui Qml Quick)
qt_add_executable(Simple3DApp src/main.cpp)
qt_add_resources(Simple3DApp "configuration"
PREFIX "/"
FILES
qtquickcontrols2.conf
)
target_link_libraries(Simple3DApp PRIVATE
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Gui
Qt${QT_VERSION_MAJOR}::Quick
Qt${QT_VERSION_MAJOR}::Qml
)
include(${CMAKE_CURRENT_SOURCE_DIR}/qmlmodules)
import QmlProject
Project {
mainFile: "content/App.qml"
/* Include .qml, .js, and image files from current directory and subdirectories */
QmlFiles {
directory: "content"
}
QmlFiles {
directory: "imports"
}
JavaScriptFiles {
directory: "content"
}
JavaScriptFiles {
directory: "imports"
}
ImageFiles {
directory: "content"
}
Files {
filter: "*.conf"
files: ["qtquickcontrols2.conf"]
}
Files {
filter: "qmldir"
directory: "."
}
Files {
filter: "*.ttf;*.otf"
}
Files {
filter: "*.wav;*.mp3"
}
Files {
filter: "*.mp4"
}
Files {
filter: "*.glsl;*.glslv;*.glslf;*.vsh;*.fsh;*.vert;*.frag"
}
Files {
filter: "*.mesh"
directory: "asset_imports"
}
Environment {
QT_QUICK_CONTROLS_CONF: "qtquickcontrols2.conf"
QT_AUTO_SCREEN_SCALE_FACTOR: "1"
QT_LOGGING_RULES: "qt.qml.connections=false"
QT_ENABLE_HIGHDPI_SCALING: "0"
/* Useful for debugging
QSG_VISUALIZE=batches
QSG_VISUALIZE=clip
QSG_VISUALIZE=changes
QSG_VISUALIZE=overdraw
*/
}
qt6Project: true
/* List of plugin directories passed to QML runtime */
importPaths: [ "imports", "asset_imports" ]
/* Required for deployment */
targetDirectory: "/opt/Simple3D"
qdsVersion: "3.2"
/* If any modules the project imports require widgets (e.g. QtCharts), widgetApp must be true */
widgetApp: true
multilanguageSupport: true
supportedLanguages: ["en"]
primaryLanguage: "en"
}
visibleInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: true
/****************************************************************************
**
** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Quick Studio Components.
**
** $QT_BEGIN_LICENSE:GPL$
** 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 General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 or (at your option) any later version
** approved by the KDE Free Qt Foundation. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick
import QtQuick3D
Node {
Node {
id: scene
rotation: Qt.quaternion(0.707107, -0.707107, 0, 0)
Model {
id: cube
x: -0.025618
y: -0.000536585
z: -4.53368e-05
scale: Qt.vector3d(2, 2, 2)
source: "meshes/cube.mesh"
DefaultMaterial {
id: material_001_material
diffuseColor: "#01bd09"
}
materials: [material_001_material]
}
}
}
{
"import_options": {
"calculateTangentSpace": {
"description": "Calculates the tangents and bitangents for the imported meshes.",
"name": "Calculate Tangent Space",
"type": "Boolean",
"value": false
},
"dropNormals": {
"description": "Drops normals for all faces of all meshes.",
"name": "Drop Normals",
"type": "Boolean",
"value": false
},
"fbxPreservePivots": {
"description": "Set whether the fbx importer will preserve pivot points (as extra nodes)",
"name": "FBX: Preserve Pivot Points",
"type": "Boolean",
"value": false
},
"findDegenerates": {
"description": "This step searches all meshes for degenerate primitives and converts them to proper lines or points.",
"name": "Find Degenerates",
"type": "Boolean",
"value": true
},
"findInstances": {
"description": "This step searches for duplicate meshes and replaces them with references to the first mesh.",
"name": "Find Instances",
"type": "Boolean",
"value": false
},
"findInvalidData": {
"description": "This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get rid of some common exporter errors.",
"name": "Find Invalid Data",
"type": "Boolean",
"value": true
},
"fixInfacingNormals": {
"description": "Tries to determine which meshes have normal vectors that are facing inwards and inverts them.",
"name": "Fix Infacing Normals",
"type": "Boolean",
"value": false
},
"generateLightmapUV": {
"description": "Unwrap mesh to generate lightmap UV channel",
"name": "Generate lightmap UV channel",
"type": "Boolean",
"value": false
},
"generateMipMaps": {
"description": "Force all imported texture components to generate mip maps for mip map texture filtering",
"name": "Generate Mip Maps",
"type": "Boolean",
"value": true
},
"generateNormals": {
"description": "Generates normals for all faces of all meshes",
"name": "Generate Normals",
"type": "Boolean",
"value": false
},
"generateSmoothNormals": {
"description": "Generates smooth normals for all vertices in the mesh.",
"name": "Generate Smooth Normals",
"type": "Boolean",
"value": true
},
"globalScale": {
"description": "This step will perform a global scale of the model.",
"name": "Enable Global Scale",
"type": "Boolean",
"value": false
},
"globalScaleValue": {
"conditions": [
{
"mode": "Equals",
"property": "globalScale",
"value": true
}
],
"description": "Global Scale factor.",
"name": "Global Scale Value",
"type": "Real",
"value": 1
},
"improveCacheLocality": {
"description": "Reorders triangles for better vertex cache locality.",
"name": "Improve Cache Locality",
"type": "Boolean",
"value": true
},
"joinIdenticalVertices": {
"description": "Identifies and joins identical vertex data sets within all imported meshes.",
"name": "Join Identical Vertices",
"type": "Boolean",
"value": true
},
"optimizeGraph": {
"description": "A postprocessing step to optimize the scene hierarchy.",
"name": "Optimize Graph",
"type": "Boolean",
"value": false
},
"optimizeMeshes": {
"description": "A postprocessing step to reduce the number of meshes.",
"name": "Optimize Meshes",
"type": "Boolean",
"value": false
},
"preTransformVertices": {
"description": "Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.",
"name": "Pre-transform Vertices",
"type": "Boolean",
"value": false
},
"removeComponentAnimations": {
"description": "Removes any animation components from meshes.",
"name": "Remove Animation Components",
"type": "Boolean",
"value": false
},
"removeComponentBoneWeights": {
"description": "Removes any bone weights from meshes.",
"name": "Remove Bone Weight components",
"type": "Boolean",
"value": false
},
"removeComponentColors": {
"description": "Removes any Color components from meshes.",
"name": "Remove Color Components",
"type": "Boolean",
"value": false
},
"removeComponentNormals": {
"description": "Removes Normal component from meshes.",
"name": "Remove Normal Components",
"type": "Boolean",
"value": false
},
"removeComponentTangentsAndBitangents": {
"description": "Removes Tangents and Bitangents components from meshes.",
"name": "Remove Tangent Components",
"type": "Boolean",
"value": false
},
"removeComponentTextures": {
"description": "Removes any embedded texture components from meshes.",
"name": "Remove Texture Components",
"type": "Boolean",
"value": false
},
"removeComponentUVs": {
"description": "Removes any UV components from meshes.",
"name": "Remove UV Components",
"type": "Boolean",
"value": false
},
"removeRedundantMaterials": {
"description": "Searches for redundant/unreferenced materials and removes them.",
"name": "Remove Redundant Materials",
"type": "Boolean",
"value": false
},
"splitLargeMeshes": {
"description": "Splits large meshes into smaller sub-meshes.",
"name": "Split Large Meshes",
"type": "Boolean",
"value": true
},
"transformUVCoordinates": {
"description": "This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.",
"name": "Transform UV Coordinates",
"type": "Boolean",
"value": false
},
"useBinaryKeyframes": {
"description": "Record keyframe data as binary files",
"name": "Use Binary Keyframes",
"type": "Boolean",
"value": true
},
"useFloatJointIndices": {
"description": "Stores joint indices as floating point numbers for GLES 2.0.",
"name": "Use Float Joint Indices",
"type": "Boolean",
"value": false
}
},
"source_scene": "C:/Work/tqtc-qtc-super/qtquickdesigner/studioexamples/examples/Simple3D/blender/example.dae"
}
module Quick3DAssets.Example
Example 1.0 Example.qml
visibleInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: true
{
"import_options": {
"calculateTangentSpace": {
"description": "Calculates the tangents and bitangents for the imported meshes.",
"name": "Calculate Tangent Space",
"type": "Boolean",
"value": false
},
"dropNormals": {
"description": "Drops normals for all faces of all meshes.",
"name": "Drop Normals",
"type": "Boolean",
"value": false
},
"fbxPreservePivots": {
"description": "Set whether the fbx importer will preserve pivot points (as extra nodes)",
"name": "FBX: Preserve Pivot Points",
"type": "Boolean",
"value": false
},
"findDegenerates": {
"description": "This step searches all meshes for degenerate primitives and converts them to proper lines or points.",
"name": "Find Degenerates",
"type": "Boolean",
"value": true
},
"findInstances": {
"description": "This step searches for duplicate meshes and replaces them with references to the first mesh.",
"name": "Find Instances",
"type": "Boolean",
"value": true
},
"findInvalidData": {
"description": "This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get rid of some common exporter errors.",
"name": "Find Invalid Data",
"type": "Boolean",
"value": true
},
"fixInfacingNormals": {
"description": "Tries to determine which meshes have normal vectors that are facing inwards and inverts them.",
"name": "Fix Infacing Normals",
"type": "Boolean",
"value": false
},
"generateLightmapUV": {
"description": "Unwrap mesh to generate lightmap UV channel",
"name": "Generate lightmap UV channel",
"type": "Boolean",
"value": false
},
"generateMipMaps": {
"description": "Force all imported texture components to generate mip maps for mip map texture filtering",
"name": "Generate Mip Maps",
"type": "Boolean",
"value": true
},
"generateNormals": {
"description": "Generates normals for all faces of all meshes",
"name": "Generate Normals",
"type": "Boolean",
"value": false
},
"generateSmoothNormals": {
"description": "Generates smooth normals for all vertices in the mesh.",
"name": "Generate Smooth Normals",
"type": "Boolean",
"value": true
},
"globalScale": {
"description": "This step will perform a global scale of the model.",
"name": "Enable Global Scale",
"type": "Boolean",
"value": false
},
"globalScaleValue": {
"conditions": [
{
"mode": "Equals",
"property": "globalScale",
"value": true
}
],
"description": "Global Scale factor.",
"name": "Global Scale Value",
"type": "Real",
"value": 1
},
"improveCacheLocality": {
"description": "Reorders triangles for better vertex cache locality.",
"name": "Improve Cache Locality",
"type": "Boolean",
"value": true
},
"joinIdenticalVertices": {
"description": "Identifies and joins identical vertex data sets within all imported meshes.",
"name": "Join Identical Vertices",
"type": "Boolean",
"value": true
},
"optimizeGraph": {
"description": "A postprocessing step to optimize the scene hierarchy.",
"name": "Optimize Graph",
"type": "Boolean",
"value": false
},
"optimizeMeshes": {
"description": "A postprocessing step to reduce the number of meshes.",
"name": "Optimize Meshes",
"type": "Boolean",
"value": true
},
"preTransformVertices": {
"description": "Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.",
"name": "Pre-transform Vertices",
"type": "Boolean",
"value": false
},
"removeComponentAnimations": {
"description": "Removes any animation components from meshes.",
"name": "Remove Animation Components",
"type": "Boolean",
"value": false
},
"removeComponentBoneWeights": {
"description": "Removes any bone weights from meshes.",
"name": "Remove Bone Weight components",
"type": "Boolean",
"value": false
},
"removeComponentColors": {
"description": "Removes any Color components from meshes.",
"name": "Remove Color Components",
"type": "Boolean",
"value": false
},
"removeComponentNormals": {
"description": "Removes Normal component from meshes.",
"name": "Remove Normal Components",
"type": "Boolean",
"value": false
},
"removeComponentTangentsAndBitangents": {
"description": "Removes Tangents and Bitangents components from meshes.",
"name": "Remove Tangent Components",
"type": "Boolean",
"value": false
},
"removeComponentTextures": {
"description": "Removes any embedded texture components from meshes.",
"name": "Remove Texture Components",
"type": "Boolean",
"value": false
},
"removeComponentUVs": {
"description": "Removes any UV components from meshes.",
"name": "Remove UV Components",
"type": "Boolean",
"value": false
},
"removeRedundantMaterials": {
"description": "Searches for redundant/unreferenced materials and removes them.",
"name": "Remove Redundant Materials",
"type": "Boolean",
"value": false
},
"splitLargeMeshes": {
"description": "Splits large meshes into smaller sub-meshes.",
"name": "Split Large Meshes",
"type": "Boolean",
"value": true
},
"transformUVCoordinates": {
"description": "This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.",
"name": "Transform UV Coordinates",
"type": "Boolean",
"value": false
},
"useBinaryKeyframes": {
"description": "Record keyframe data as binary files",
"name": "Use Binary Keyframes",
"type": "Boolean",
"value": true
},
"useFloatJointIndices": {
"description": "Stores joint indices as floating point numbers for GLES 2.0.",
"name": "Use Float Joint Indices",
"type": "Boolean",
"value": false
}
},
"source_scene": "C:/Users/sapariya/Documents/qt organized/simple3D/qtring_baked.fbx"
}