Forum

DX11 / Assimp / SketchUp

Hi All

I’ve been having troubles getting meshes from SketchUp to show up in VVVV when imported through Collada.

Note I’m using recent DX11 with Assimp loader (using SceneFile->Mesh right now).

I’ve realised the issue is that the meshes do not have texture coordinates, which means that shaders which ask for texture coordinates will simply fail to draw the mesh (includes Constant and most of the shaders).

For my uses I’m just going to hack a PhongPointNoTexture node. But is there a cleaner way to do this? e.g.

  1. Inject blank texture coordinates with some kind of Geometry shader pipeline
  2. Force SketchUp to output texture coordinates

Thank you
elliot

Hey Elliot,

that’s not only a sketchup problem, same happen with Blender, I had to unwrap the mesh to create UV coordinate and then export to collada. Even if I don’t want to texture the mesh.

I guess the best would be to force sketchup to output texture coordinates.

Yes I can confirm that,as a last resort you can use uv_coords to force uv mapping from a given point of view (your camera) but as lecloneur mentioned it is easier to do a basic uv mapping in your 3d program, not sure in Sketchup but in Blender it is just a couple of clicks.
S.

That will not work as geometry shader is after vertex shader, so you will still fail layout validation, which is done at the Input Assembler stage (eg: before vertex shader).

That’s a bit better, but if you don’t use texcoords, then your shader should not expect any either.

That’s actually the cleanest way to do this ;)

If you don’t need texturing, then shader should not have neither texture/sample/uvs, as anyway it’s not gonna be used.

It will also be faster as you don’t need to fetch non necessary data, and fetch a 1x1 white texture (that I provide by default if not texture is connected).