Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if (Skinned)SubGeometry does not have uv's, SubGeometry.updateFaceTangents crashes. #27

Open
david-gregory opened this issue May 17, 2011 · 2 comments
Assignees
Labels

Comments

@david-gregory
Copy link
Contributor

One could argue that this isn't a bug. But it is entirely possible to get SkinnedSubGeometry with a ColorMaterial rather than a BitmapMaterial.

If that is the case, uv data may not be set in the geometry. If you play an animation, a crash happens on line 697:
v0 = _uvs[uint((index1 << 1) + 1)];

_uvs is null.

Main Thread (Suspended: TypeError: Error #1009: Cannot access a property or method of a null object reference.)

  • away3d.core.base::SubGeometry/updateFaceTangents
  • away3d.core.base::SubGeometry/updateVertexTangents
  • away3d.core.base::SubGeometry/get vertexTangentData
  • away3d.animators.data::SkeletonAnimationState/morphGeometry
  • away3d.animators.data::SkeletonAnimationState/setRenderState
  • away3d.materials::MaterialBase/renderPass
  • away3d.core.render::DefaultRenderer/drawRenderables
  • away3d.core.render::DefaultRenderer/draw
  • away3d.core.render::RendererBase/executeRender
  • away3d.core.render::RendererBase/render
  • away3d.core.render::DefaultRenderer/render
  • away3d.containers::View3D/render
@ghost ghost assigned DerSchmale May 18, 2011
@DerSchmale
Copy link
Member

Which is the usecase where updateFaceTangents is called and uvs aren't present? That method should only be called when a normal map is used, for which uvs are required.

@david-gregory
Copy link
Contributor Author

I got it to happen simply by attempting to play an animation. Not having uv data was a result of the collada model being flat shaded, not textured. To be clear, it did not have a normal map.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants