stride3d / stride3d/stride

Unwanted lines/triangles after imported Collada model

Open
#1,563 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Release Type: Latest official release

Version: 4.1.0.1374

Platform(s): Windows

Describe the bug
There are unwanted lines+triangles(?) generated after I imported my model. Compare the video with the screenshot below.

https://user-images.githubusercontent.com/20599225/202803306-cea1a6d2-8662-4b55-b706-e6a063d210e3.mp4

This may be also the cause of a crash related for the physics engine.

To Reproduce
Steps to reproduce the behavior:
1.) Use
Model.zip
2.) Create a Model that uses the mesh in the link above.
3.) See video above:

(For the physics engine error)
4.) Create a Static collider from the mesh
5.) There are chances the game will crash at startup. Call stack below:

Expected behavior
I don't expect the extra lines/triangles as shown in the video.

This is how the model looks
image

Log and callstacks
Physics engine segmentation fault that happens sometimes when starting up the project.

(Copied from Copy Details)

  HResult=0x80004003
  Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
  Source=<Cannot evaluate the exception source>
  StackTrace:
<Cannot evaluate the exception stack trace>

Stack trace:

>	Stride.Physics.dll!Stride.Physics.StaticMeshColliderShape.StaticMeshColliderShape(Stride.Physics.StaticMeshColliderShape.SharedMeshData sharedDataParam) Line 55	C#
 	Stride.Physics.dll!Stride.Physics.StaticMeshColliderShapeDesc.CreateShape(Stride.Core.IServiceRegistry services) Line 33	C#
 	Stride.Physics.dll!Stride.Engine.PhysicsComponent.ComposeShape() Line 641	C#
 	Stride.Physics.dll!Stride.Engine.PhysicsComponent.Attach(Stride.Physics.PhysicsProcessor.AssociatedData data) Line 693	C#
 	Stride.Physics.dll!Stride.Physics.PhysicsProcessor.OnEntityComponentAdding(Stride.Engine.Entity entity, Stride.Engine.PhysicsComponent component, Stride.Physics.PhysicsProcessor.AssociatedData data) Line 141	C#
 	Stride.Engine.dll!Stride.Engine.EntityProcessor<Stride.Engine.PhysicsComponent, Stride.Physics.PhysicsProcessor.AssociatedData>.ProcessEntityComponent(Stride.Engine.Entity entity, Stride.Engine.EntityComponent entityComponentArg, bool forceRemove) Line 280	C#
 	Stride.Engine.dll!Stride.Engine.EntityManager.CheckEntityWithNewProcessor(Stride.Engine.Entity entity, Stride.Engine.EntityProcessor processor) Line 499	C#
 	Stride.Engine.dll!Stride.Engine.EntityManager.OnProcessorAdded(Stride.Engine.EntityProcessor processor) Line 392	C#
 	Stride.Engine.dll!Stride.Engine.EntityManager.RegisterPendingProcessors() Line 260	C#
 	Stride.Engine.dll!Stride.Engine.EntityManager.InternalAddEntity(Stride.Engine.Entity entity) Line 251	C#
 	Stride.Engine.dll!Stride.Engine.SceneInstance.Add(Stride.Engine.Scene scene) Line 145	C#
 	Stride.Engine.dll!Stride.Engine.SceneInstance.RootScene.set(Stride.Engine.Scene value) Line 103	C#
 	Stride.Engine.dll!Stride.Engine.SceneSystem.LoadContent() Line 120	C#
 	Stride.Games.dll!Stride.Games.GameSystemCollection.LoadContent()	Unknown
 	Stride.Engine.dll!Stride.Engine.Game.LoadContentInternal() Line 458	C#
 	Stride.Games.dll!Stride.Games.GameBase.InitializeBeforeRun()	Unknown
 	Stride.Games.dll!Stride.Games.GameWindowWinforms.Run()	Unknown
 	Stride.Games.dll!Stride.Games.GameBase.Run(Stride.Games.GameContext gameContext)	Unknown
 	FPS_Controller.Windows.dll!FPS_Controller.FPS_ControllerApp.Main(string[] args) Line 11	C#

I can't copy more details about the crash, for example the stack.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Model.zip and reproduce the imported mesh artifacts and intermittent startup crash. Trace the call stack from Stride.Physics.dll's StaticMeshColliderShape.StaticMeshColliderShape at line 55 through StaticMeshColliderShapeDesc.CreateShape and PhysicsComponent.ComposeShape. Done means the model has no unwanted lines or triangles and creating its static collider no longer causes the reported crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.