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

Add support for vertex maps #14

Open
douglaskastle opened this issue May 2, 2020 · 25 comments
Open

Add support for vertex maps #14

douglaskastle opened this issue May 2, 2020 · 25 comments

Comments

@douglaskastle
Copy link
Member

douglaskastle commented May 2, 2020

As requested by @Donald-Drennan

Found in this post on blender artists:

https://blenderartists.org/t/where-did-lightwave-import-export-go-in-2-57/506000/20?u=mavek

@douglaskastle
Copy link
Member Author

@Donald-Drennan

Can you tell me what you are looking for in this mesh. You call it morph and it had morph keys. The morph keys are being assigned in the mesh assignment.

@Donald-Drennan
Copy link

Donald-Drennan commented May 2, 2020 via email

@douglaskastle
Copy link
Member Author

Can you import with the current addon, it seems to be pulling in both Shape Keys and Vertex colors:

morph0

Maybe you could explain a bit about what a vertex map is in LW and what it should be mapped to in Blender. Ditto for Vertex paint maps.

@Donald-Drennan
Copy link

Donald-Drennan commented May 2, 2020 via email

@douglaskastle
Copy link
Member Author

I dabbled in LW, but never used any thing fancy like a morph or a vertex paint. I am unsure if the current LWO parser is even pulling out the vertex paint information to translate it. But UV maps are there as are vertex colors, based on the image above. I guess i need to know where I am coming from to know where I am going. So an example of the thing in LW that is not in blender would be helpful. A whole mesh while a step it still too amorphous.

@Donald-Drennan
Copy link

Donald-Drennan commented May 3, 2020 via email

@douglaskastle
Copy link
Member Author

If you could resolve your addon install issue and check to see if the current implementation does what you need that would be very helpful.

From my view point it is doing both of these things to some degree. If they are not satisfactory then that is something else.

It is unclear to me what work needs, if any, needs to be done on this issue.

@joewilliamsen
Copy link

@donald: Make sure you're not doing what I was doing when I had the same issue as described here: #12

FWIW, I was seeing morph targets (shape keys) being imported with the LWO model without a problem with the current and previous versions of the addon.

@Donald-Drennan
Copy link

Donald-Drennan commented May 3, 2020 via email

@douglaskastle
Copy link
Member Author

@Donald-Drennan The materials for cycles in the addon are not completed. This is actually an issue that @joewilliamsen has reported and is the purpose of issue #9 to get that working.

Until then one can build the materials them selves, which seems to be the standard MO when importing meshes elsewhere.

I imagine the Vertex paint having no color is related to this.

However morph/shape are working, weight maps are working, thats great

Let me check a few things, but I think this issue can be closed.

@Donald-Drennan
Copy link

Donald-Drennan commented May 3, 2020 via email

@douglaskastle
Copy link
Member Author

douglaskastle commented May 6, 2020

I am looking into this now and I think the problem and the solution has to do with meshes that have more than one UV.

If you use an image that is assigned a UV you are supposed to assign the UV as an input to the image texture node. If a mesh has only one UV, it takes that one as a default and one can assign a UV without explicitly doing it. When there is more than one UV you can't take the implicit assignment and one needs to be explicit and add a UV node to the material, assign the correct UV and connect it into the image texture.

image

I have been working on improving the material generation of the addon to do exactly this. However if you can't wait, experiment with this feature and see if it helps. I could use the feedback, to make sure this is the same problem you are seeing and if my solution is the same as your problem.

If not, send on an offending mesh and detail where exactly the problem is

@douglaskastle
Copy link
Member Author

Same mesh with out the UV assign:

image

@Donald-Drennan
Copy link

Donald-Drennan commented May 6, 2020 via email

@douglaskastle
Copy link
Member Author

There are no images in your post

@Donald-Drennan
Copy link

Donald-Drennan commented May 6, 2020 via email

@Donald-Drennan
Copy link

Douglas,

Sorry! I didn't realize that was happening. I had been replying via email, and github must strip out attachments.

Screenshot 2020-05-03 17 02 44
Screenshot 2020-05-03 17 04 37

@douglaskastle
Copy link
Member Author

OK I see and understand the problem. I have no idea what the solution is.

Looking at the LW version, there are red dots on some points, I assume these are co-located points, so they are there effectively twice. Blender gets confused, renders only one of the 2 and then keeps the join going to the second locations next neighbour.

Ponder!

@Donald-Drennan
Copy link

Donald-Drennan commented May 6, 2020 via email

@douglaskastle
Copy link
Member Author

It makes certain types of UV useless. There are other UV maps that it works with just fine.

I am surprised that this is such a deal breaker for you ;). But I will have a look

@Donald-Drennan
Copy link

Donald-Drennan commented May 6, 2020 via email

@douglaskastle
Copy link
Member Author

Yes if you look at my above images, the two faces with numbers on these are correctly assigned UVs. They are square images on square faces.

Might be a storm in a teacup, I reordered some stuff in the addon and got this:

image

I'll check a few other places to to see if my fix didn't break something else

@douglaskastle
Copy link
Member Author

As an FYI, 3 visible UV with 3 separate images:

image

Also of notes, blender can only handle a maximum number of 8 UVs. Not too sure if that is per blend or per mesh.

@douglaskastle
Copy link
Member Author

Also I know you commented on this post, but I am recording it here for reference:

https://blenderartists.org/t/uv-unwrapping-baking-woes-and-fundamental-confusion-free-mesh-attached/1222119

@Donald-Drennan
Copy link

Donald-Drennan commented May 6, 2020 via email

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

No branches or pull requests

3 participants