summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Doc: add doc to undocumented classes qt3dv5.10.0-beta2Nico Vertriest2017-10-132-6/+82
| | | | | | | | Fbxgeometryloader Plygeometryloader Change-Id: Iace5ec78521d96386c1c2171195deba7ad6b5597 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Connect the normal parameter to the right signalKevin Ottens2017-10-131-1/+1
| | | | | Change-Id: I62f1d637f595d576bd1c4df48ef32a0002e6aa18 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Have all the Phong variations based on a graphKevin Ottens2017-10-1325-307/+609
| | | | | | | | | This commit introduces a new layered graph file to deal with all the Phong material variations. It ports all the materials to using it, then of course it removes all the old frag implementations. Change-Id: Ia519eaf4cea3b6e3ff4dd5aa1cca2bedbfcbe7cb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Doc: Add the correct namespace for QAbstractCameraControllerTopi Reinio2017-10-121-1/+1
| | | | | | | | Without the namespace QDoc fails to find the class documentation. Change-Id: I999846649a4e6df975f09dca169be9d83f99ae7a Reviewed-by: Andy Maloney <asmaloney@gmail.com> Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* Doc: add doc to undocumented methods in qt3dwindow.cppNico Vertriest2017-10-091-1/+27
| | | | | Change-Id: I450cdbd7cee58ae84f45ad82c5bc15489fe61771 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: Fix link in Solar System Scope attribution documentationTopi Reinio2017-10-091-1/+1
| | | | | Change-Id: Ib412be382830b13d65167c36a6c2d918878504fa Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Fix animation local time calculation when changing playbackRateJuan José Casafranca2017-10-0614-361/+323
| | | | | | | | | | Animation local time was computed in absolute mode, as a scale of the global time that has passed since the start of the animation. Now is computed relative to the last local time, as the last local time + a scale of the elapsed global time. Change-Id: I5c29002602a5184174618ac7755ec94f5c7a328f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix setting running property when animators finishSean Harmer2017-10-061-0/+1
| | | | | | | | We need to call the base class handler so that the generic code in QNode can process the call to update the running property. Change-Id: I7fa3c051f47c2a41c5620f1a72f309192d5ea907 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix dolly in/out speed calculationSean Harmer2017-10-061-1/+1
| | | | | Change-Id: Ie7fe80039a6cb88a0f1540ce252c9dee36d0afe1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add qDebug operator for MappingDataSean Harmer2017-10-061-0/+15
| | | | | Change-Id: Ic725f70329920b41ac18e7bfe4f249247b2cbc83 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Don't warn about buffers with unknown attribute typesSean Harmer2017-10-061-2/+0
| | | | | | | | Buffers in glTF are used for several other things than just vertex attributes so silence this annoying warning. Change-Id: I4c65ff681b148e449af0b8ce689f6df157eeca61 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Support loading animation data from glTF 2 filesSean Harmer2017-10-064-23/+1125
| | | | | | | | So far just skeletal animations. Morph targets will come in Qt 5.11. Change-Id: Ib1f3efe894ad993b97f79e7f71d92cb4836e4e32 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Decompose a new quaternion rotation into euler anglesSean Harmer2017-10-063-21/+41
| | | | | | | Same as in QTransform. Change-Id: Ia1dca19c8faf996629ecbf8832e5625e7b22532c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Merge branch '5.9' into 5.10Sean Harmer2017-10-055-47/+109
|\ | | | | | | | | | | | | Conflicts: src/animation/backend/animationutils.cpp Change-Id: I6bd0d1d15da00537a0bb064fc828b2460584b8e8
| * Fix reformatting of clip evaluation resultsSean Harmer2017-10-051-12/+48
| | | | | | | | | | | | | | | | | | | | | | | | This now correctly handles both the old ChannelMapping and the new SkeletonMapping use cases. There was some ambiguity about which way around the indices were being generated. It worked in previous cases for the limited data available to test with. This has been tested to work with both the JSON animation format and skeletal animations loaded from JSON and glTF 2 files. Change-Id: Ie8558c764cd8dc57d6cdad19bbc6a66052bc68d0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Improve debug output for fcurvesSean Harmer2017-10-051-6/+19
| | | | | | | | | | Change-Id: I4a9044933b182a2e0eba745483f1b8bc214dcdba Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Share the effect from the phong materialSean Harmer2017-10-033-21/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This only loads the shader source once instead of 1000 times. Reduces the time to first frame by a further 30% by massively reducing the work the main thread has to do at startup. The Qt3DExtras material classes are convenient but lead to bad practices like this. We should provide a way to allow them to share the effect easily but still use the provided materials for their API. Perhaps a new ctor overload that takes a QEffect pointer would work nicely. Also fixed some float vs double vs int precision warnings as a drive by. Change-Id: I181de8d95841eb88c91c29ef6f45d215da079b98 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Share the mesh in bigscene-cppSean Harmer2017-10-033-8/+12
| | | | | | | | | | | | | | | | No point loading the same data 1k times. Shaves 35% off the time from application start to first frame being complete. Change-Id: I8cd7c8a5aa377c0663c03e35d7a4c03f50b052f6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Use qFuzzyCompare for rotation anglesSean Harmer2017-10-031-2/+2
| | | | | | | | | | | | | | Fixes clang warning. Change-Id: I1831bd112c33cdd1fe9cc7ae169cfba05cb8a694 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Don't send change notifications for unneeded propertiesSean Harmer2017-10-031-0/+4
| | | | | | | | | | | | | | | | | | The backend doesn't need to know about the rotation angles used to update the transform. Saves about 3% of time on the main thread related to mallocing the property change notifications. Change-Id: I784baf705cdd697ba860dc7a0c2e0e1c9ee467ec Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Add Qt3DExtras::QAbstractCameraControllerv5.10.0-beta1Andy Maloney2017-10-0310-843/+810
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Abstracted the orbit and first person camera controllers into a base class. These two controllers shared a lot of similarities. This allows developers to easily create a custom camera controller by deriving from QAbstractCameraController and implementing one function. [ChangeLog][Qt3DExtras][] Added Qt3DExtras::QAbstractCameraController abstract base class to make implementing new camera controllers easier. Change-Id: I43cfbc03f7294b1740f199ac7ededa9578234974 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Extend skinned mesh manual test to use an animatorSean Harmer2017-10-038-5/+4722
| | | | | | | | | | Change-Id: I890abe966ba617f23a07137c6347fafac97ab591 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Update render aspect skeleton's local posesSean Harmer2017-10-031-1/+6
| | | | | | | | | | | | | | | | This is the receiving side of the changes sent by the animation aspect. Not much to do as everything is already in place. Change-Id: I36a79868d28bab0cf71a176b175e5ea42727979a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Initialize callback to nullptr in MappingData structSean Harmer2017-10-031-1/+1
| | | | | | | | | | | | | | Otherwise we inadvertently send callbacks even when not requested. Change-Id: I398c930740133f39982d6b071443fbeee8b029a9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Clear channel component indices for those not present in animationSean Harmer2017-10-033-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | This allows us to only create MappingData objects for those channels for which we actually have animation data. There is no point, and even more importantly, it is dangerous to try to do so as we will overwrite the existing data of the target properties. TODO: Fix this on 5.9 and forward merge to 5.10 Change-Id: Idb9d2fdef0e3297c0f35ad8c4af01b777321674d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Update the local poses of the skeleton in the animation aspectSean Harmer2017-10-036-1/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present it is still needlessly, and incorrectly, updating the transforms of joints for which we have no animation data by using a default value of 0 for each component. This causes the joints to be scaled to 0 which is not particularly useful. We should only update joints for which we have valid animation data and leave the other joints alone. For a skeleton this will be OK as we have the initial set of local poses available. For regular QNode properties, the animator/mapper will need to take a snapshot of the current property value when the animation is started so that we can fill in the missing values when generating property changes. This should also be fixed on the 5.9 branch. Change-Id: Ib8f28c55cdfbca3f335777028f72250641092fc9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Extend buildPropertyMappings to support skeleton mapping use caseSean Harmer2017-10-035-61/+216
| | | | | | | | | | Change-Id: I2eaf725022f5044d7faf647f8789e73de969d49b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Merge branch '5.9' into 5.10Sean Harmer2017-09-3022-188/+548
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/animation/backend/animationutils.cpp src/animation/backend/animationutils_p.h src/render/geometry/qmesh.cpp tests/auto/animation/animation.pro Change-Id: Ifb57bfb0b12b3ebf9ee177d4ea684134455b4143
| * Remove unused buildPropertyMappings() overload and testsSean Harmer2017-09-293-133/+1
| | | | | | | | | | | | | | Everything goes through the other overload now. Change-Id: Id0c196a6967a9f83e47092ca1fc7f4ab4ebe9309 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
| * Move the non-blended animation codepath closer to the blended oneSean Harmer2017-09-294-15/+39
| | | | | | | | | | | | | | | | | | Will make it possible to reduce the amount of code to maintain and test. There are still several ways to optimize this too so best to only do it for one code path that all animators use. Change-Id: I05ebd4f41d88aa0bea37d4d17130bc79c96ebd5c Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
| * Add unit test for FindRunningClipAnimatorsJobSean Harmer2017-09-296-2/+349
| | | | | | | | | | | | | | Should pass before and after the refactoring. Change-Id: I9ef8f948f03a131546fc6485e9c66494ff383714 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Add convenience function to ChannelMapper to return list of MappingsSean Harmer2017-09-273-2/+66
| | | | | | | | | | | | | | | | Caches the resolution of node ids to ChannelMappings. Updated test to check this new feature. Change-Id: I0c2f539c2bd91e7918b98c5b60c9ca486b63ec08 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
| * Ensure meshName gets used in the functorSean Harmer2017-09-272-2/+32
| | | | | | | | | | Change-Id: I9015546607b5663f1feada64bc03cb73d3538ef2 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
| * Actually get matching clip indices for componentsSean Harmer2017-09-262-15/+14
| | | | | | | | | | | | | | | | | | | | | | Rather than assuming they are in order. The blended clip animator code path now behaves the same as the simple QClipAnimator in that it can handle clips with channel components not in the expected order. We can now look at making both share a common code path. Change-Id: I61848e07b4f418ba9f4c56f56f4f49c9a5fbd588 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
| * Avoid deep copy in loopSean Harmer2017-09-261-1/+1
| | | | | | | | | | Change-Id: I5a86547ae669394c290b30427f98821bc7552a63 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
| * Fix gathering clip value node idsSean Harmer2017-09-264-5/+19
| | | | | | | | | | | | | | | | This correctly handles the case where the blend tree consists of a single value node. Added test case to catch it. Change-Id: I8982d2081748866d163f107a4513bd2d17feb83a Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
| * Copy size and pixelRatio when switching activeFrameGraphAnders Hafreager2017-09-241-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Copy externalRenderTargetSize and surfacePixelRatio from old to new surfaceSelector when setting activeFrameGraph on RenderSettings. Previously, when switching activeFrameGraph, surface was copied from old to new surfaceSelector, but these other properties were not. The rendered image was then stretched until window is resized again. Change-Id: I62b78da05c764f981813ab96b9a769bae7d786b2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Don't crash objgeometryloader on ill-formed face, just ignoreWieland Hagen2017-09-221-1/+1
| | | | | | | | | | | | | | | | For < 3 vertices, array accesses would fail, and face creation not make sense anyways Change-Id: I5eb746dfdec92d1c836e9870d87e7900530ec81c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Clear TextureData flag after texture uploadWieland Hagen2017-09-151-0/+1
| | | | | | | | | | | | | | Or else we will continue uploading data indefinitely Change-Id: If81d8a0a790964c699462fbcb166808ee7859f59 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Doc: add doc to class AssimpImporterNico Vertriest2017-09-291-3/+3
| | | | | | | | | | Change-Id: I8ce9c418b6a77aa6ec8054bdacfd69152924fbfe Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Doc: add doc to classes GLTFImporter and GLTFExporterNico Vertriest2017-09-292-4/+54
| | | | | | | | | | Change-Id: I890be56a59be47923bd0c2db31d72d3c2c45ae0e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Since the ES2 includes use FP make sure it is definedKevin Ottens2017-09-273-0/+6
| | | | | | | | | | Change-Id: Ibb735878c6c6b7f14eb26a0f98c200045b4979b6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | ES2 has gl_FragColor and not gl_fragColorKevin Ottens2017-09-271-1/+1
| | | | | | | | | | Change-Id: I4d22b177745b257950212e48fa550143813c4f6b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add phongFunction to the nodes prototypesKevin Ottens2017-09-271-0/+34
| | | | | | | | | | Change-Id: Iad0b51e19cc78683f18db0ae2718df6abd4ba72f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add ES2 rules for the worldSpaceToTangentSpaceMatrix node prototypeKevin Ottens2017-09-271-0/+9
| | | | | | | | | | Change-Id: I35c12c52a965a554b49cdb6ebb8f65658e8ecea3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Move phongFunction in its own include fileKevin Ottens2017-09-2721-271/+425
| | | | | | | | | | | | | | | | | | Makes it cleaner overall since the light structs were shared with the metalrough includes and the gooch fragment shader but they didn't use the functions in there. Change-Id: I459ff0fc2d751a5be9296dc33dda0efcb06b917c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add textureScale to MetalRoughMaterialKevin Ottens2017-09-273-0/+35
| | | | | | | | | | | | | | | | | | | | This property was available in the textured phong variants but somehow we didn't implement it yet for metal/rough. This new parameter is not used yet, but will be in the next commit where we unify the vertex shaders. Change-Id: I0d5293f6413a4a0412d92d2d42bf700238938fc6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Move most vertex shaders into a unified oneKevin Ottens2017-09-2717-186/+105
| | | | | | | | | | | | | | | | | | We currently do a bit more work than strictly needed in some cases, but that will change later on when this shader is converted into a graph. Changing now will make this future refactoring easier. Change-Id: I887601c18575bef79e25a23ed054aa336b1e860a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Fix clock sync for the blendedclipanimatorJuan José Casafranca2017-09-271-0/+2
| | | | | | | | | | | | | | The clockId was not being sent to the backend as part of the change Change-Id: Ibaa57ec1853b5ec29942f027b68565d87838761e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Remove the *alpha.frag from extrasKevin Ottens2017-09-277-120/+4
| | | | | | | | | | | | | | | | They are identical to their non-alpha counterparts at that point, so no need to keep them around. Change-Id: Ia3961670dc1d5c0f65711476c8dc6cc467df62c5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>