summaryrefslogtreecommitdiff
path: root/scene/resources/mesh.cpp
AgeCommit message (Collapse)Author
2022-11-30Simplify GDVIRTUAL_REQUIRED_CALL callskobewi
2022-11-25Use a more specific type for Mesh create_(convex|trimesh)_shapeAaron Franke
2022-11-10fix old mesh conversion offsetsnikitalita
2022-10-10SCons: Re-enable treating `#warning` as error with `werror`Rémi Verschelde
Replace all TODO uses of `#warning` by proper TODO comments, and will open matching bug reports to keep track of them. We don't have a great track record fixing TODOs, but I'd wager we're even worse for fixing these "TODO #warning" so we should prohibit this usage.
2022-10-07Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg
change warnings=all to use /W4.
2022-09-02Revert usage of typed array in `add_surface_from_arrays` parametersYuri Rubinsky
2022-09-01Change Array arguments to TypedArraykobewi
2022-08-23Replace Array return types with TypedArray 2kobewi
2022-08-22Merge pull request #60309 from The-O-King/octRémi Verschelde
2022-08-20Clean up mesh include code and commentsAaron Franke
2022-08-19Remove requirement to have vertex positions when creating a mesh. Meshes can ↵clayjohn
now be constructed from an index buffer alone
2022-08-13Octahedral Normal/Tangent CompressionOmar El Sheikh
Implementation of Octahedral normal compression into Godot 4.0
2022-07-19Add drag-and-drop support for materials in 3DSaracenOne
Add mesh surface picking for material drag & drop, show drag info label
2022-06-22Add surface indices to TriangleMeshreduz
Helps unblock #56597
2022-06-11Add suffixes to all nodes and resourcesFireForge
2022-05-31Make `Mesh::generate_triangle_mesh()` handle `PRIMITIVE_TRIANGLE_STRIP`kleonc
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-05-03Merge pull request #60727 from aaronfranke/basis-axis-columnRémi Verschelde
2022-05-03Rename Basis get_axis to get_column, remove redundant methodsAaron Franke
2022-04-28Implement placeholder assetsreduz
* Placeholder textures * Placeholder meshes * Placeholder material This PR is the first step towards implementing https://github.com/godotengine/godot-proposals/issues/2756 It adds an asset type that uses no resources, which can be used to replace the existing ones on export for using on the upcoming server export.
2022-03-10Discern between virtual and abstract class bindingsreduz
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract". * Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions. * Converted a large amount of classes from "abstract" to "virtual" where it makes sense. Most classes that make sense have been converted. Missing: * Physics servers * VideoStream * Script* classes. which will go in a separate PR due to the complexity involved.
2022-02-24Add sanity checks to lightmap unwrap texel sizejfons
2022-02-02Vectors: Use clear() and has().Anilforextra
Use clear() instead of resize(0). Use has() instead of "find(p_val) != -1".
2022-01-08Merge pull request #56330 from nikitalita/convert-old-octahedralRémi Verschelde
Convert octahedral compressed normals/tangents on 3.x meshes
2022-01-08convert old octahedral compressed normals/tangentsnikitalita
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-21Added resource path to message about old mesh format conversionMarc Gilleron
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
2021-12-05Remove or make verbose some debugging printsHugo Locurcio
The message about SpatialMaterial conversion was turned into a warning, as it can potentially interfere with porting projects from Godot 3.x (if there's a bug in the conversion code).
2021-11-03Rename `PROPERTY_USAGE_NOEDITOR` to `PROPERTY_USAGE_NO_EDITOR`Hugo Locurcio
This is consistent with other constants that include `NO`, such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
2021-10-12Replaced NULL with nullptrM. Huri
2021-09-30Use range iterators for `Map`Lightning_A
2021-09-16Merge pull request #52681 from nekomatata/rename-rigid-bodyCamille Mohr-Daurat
Rename RigidBody to RigidDynamicBody and SoftBody to SoftDynamicBody
2021-09-16Rename RigidBody to RigidDynamicBody and SoftBody to SoftDynamicBodyPouleyKetchoupp
2021-09-14Clean convex hull decomposition codePouleyKetchoupp
Remove unnecessary conversion between triangle data and vertex data whenever possible.
2021-09-14Merge pull request #52266 from AndreaCatania/collRémi Verschelde
2021-09-108 uvs for glTF2, URI decode and Vertex Custom api.Lyuma
Add glTF2 uri decode for paths. Add vertex custom apis. Add scene importer api. Change Color to float; add support for float-based custom channels in SurfaceTool and EditorSceneImporterMesh Co-authored-by: darth negative hunter <thenegativehunter2@users.noreply.github.com>
2021-09-08Improve collision generation usability in the new 3D scene import workflow.AndreaCatania
With this PR it's possible to add a collision during the Mesh import, directly in editor. To generate the shape is possible to chose between the following options: - Decompose Convex: The Mesh is decomposed in one or many Convex Shapes (Using the VHACD library). - Simple Convex: Is generated a convex shape that enclose the entire mesh. - Trimesh: Generate a trimesh shape using the Mesh faces. - Box: Add a primitive box shape, where you can tweak the `size`, `position`, `rotation`. - Sphere: Add a primitive sphere shape, where you can tweak the `radius`, `position`, `rotation`. - Cylinder: Add a primitive cylinder shape, where you can tweak the `height`, `radius`, `position`, `rotation`. - Capsule: Add a primitive capsule shape, where you can tweak the `height`, `radius`, `position`, `rotation`. It's also possible to chose the generated body, so you can create: - Rigid Body - Static Body - Area
2021-08-30Revert " Improve collision generation usability in the new 3D scene import ↵Juan Linietsky
workflow."
2021-08-28Improve collision generation usability in the new 3D scene import workflow.AndreaCatania
With this PR it's possible to add a collision during the Mesh import, directly in editor. To generate the shape is possible to chose between the following options: - Decompose Convex: The Mesh is decomposed in one or many Convex Shapes (Using the VHACD library). - Simple Convex: Is generated a convex shape that enclose the entire mesh. - Trimesh: Generate a trimesh shape using the Mesh faces. - Box: Add a primitive box shape, where you can tweak the `size`, `position`, `rotation`. - Sphere: Add a primitive sphere shape, where you can tweak the `radius`, `position`, `rotation`. - Cylinder: Add a primitive cylinder shape, where you can tweak the `height`, `radius`, `position`, `rotation`. - Capsule: Add a primitive capsule shape, where you can tweak the `height`, `radius`, `position`, `rotation`. It's also possible to chose the generated body, so you can create: - Rigid Body. - Static Body. - Area.
2021-08-10Enclose unused components in DISABLE_DEPRECATEDhpnrep6
2021-07-07Options to clean/simplify convex hull generated from meshPouleyKetchoupp
Clean: remove duplicate and interior vertices (uses Bullet algorithm) Simplify: modify the geometry for further simplification (uses VHACD algorithm) In the editor, single convex hull now uses the clean option. Added a new editor entry to create a simplified convex hull, can be useful for creating convex hull from highly tessellated triangle meshes.
2021-07-04Allow using ORMMaterial3D by using BaseMaterial3D as a resource hintHugo Locurcio
Previously, only StandardMaterial3D could be defined as an alternative to ShaderMaterial. This also reorders the CanvasItemMaterial property hints to follow alphabetical order (which is enforced by the inspector).
2021-07-02Add compatibility with old mesh formatsreduz
* Can load 2.x meshes * Can load 3.x meshes
2021-06-30Deprecate ImmediateGeometryreduz
* Removed entirely from RenderingServer. * Replaced by ImmediateMesh resource. * ImmediateMesh replaces ImmediateGeometry, but could use more optimization in the future. * Sprite3D and AnimatedSprite3D work again, ported from Godot 3.x (though a lot of work was needed to adapt them to Godot 4). * RootMotionView works again. * Polygon3D editor works again.
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-03Rename Transform to Transform3D in coreAaron Franke
2021-05-03Assorted fixes to UV unwrapping and GPU lightmapperjfons
Various fixes to UV2 unwrapping and the GPU lightmapper. Listed here for context in case of git blame/bisect: * Fix UV2 unwrapping on import, also cleaned up the unwrap cache code. * Fix saving of RGBA images in EXR format. * Fixes to the GPU lightmapper: - Added padding between atlas elements, avoids bleeding. - Remove old SDF generation code. - Fix baked attenuation for Omni/Spot lights. - Fix baking of material properties onto UV2 (wireframe was wrongly used before). - Disable statically baked lights for objects that have a lightmap texture to avoid applying the same light twice. - Fix lightmap pairing in RendererSceneCull. - Fix UV2 array generated from `RenderingServer::mesh_surface_get_arrays()`. - Port autoexposure fix for OIDN from 3.x. - Save debug textures as EXR when using floating point format.
2021-04-30Implement Particle Trailsreduz
-Enable the trails and set the length in seconds -Provide a mesh with a skeleton and a skin -Or, alternatively use one of the built-in TubeTrailMesh/RibbonTrailMesh -Works deterministically -Fixed particle collisions (were broken) -Not working in 2D yet (that will happen next)
2021-04-01Merge pull request #42827 from lyuma/rename_bones_blendshapesRémi Verschelde
Allow renaming bones and blendshapes.