Hi, I have some mesh trees in my scene. A few of them appear extremely washed out in the rendered and arctic views. Any advice? Thanks
can be something related to the normals? maybe they are flipped?
Hi Diego. I’ve tried flipping the normals but it didn’t make a difference. Thanks for the suggestion.
Hi Pascal. I ran a check on a good tree and bad tree (washed out). Both are imperfect but the bad tree seems to be pretty bad as it has meshes with degenerate ngons while the other didn’t. Is that the reason maybe? CullDegenerateMeshFaces didn’t remove or modify anything. I even tried to explode the bad tree to its individual surfaces to see if a clean-up was worth a try but Rhinora flipped her finger at me and said she won’t do it.
Sorry, the file with a good and bad tree - the only objects - I want to send is too big to email (120MB) so I’ve sent a link to it below.
https://1drv.ms/u/s!Ah9Ad1OmEqWVg5IwQpn2PZ1FoyhlKQ
Cheers guys,
Hayden
if you run _RebuildMesh on that tree, it starts shading OK. I can’t tell why it is not shading correctly in the first place - tried a few things but only that worked. Unfortunately I think RebuildMesh will destroy any texture coordinates, so if these are needed on your model, this is not a good fix.
-j
Perfect. Thanks J!
The flat shaded tree has vertex colors on it (all full white). If you set shading of vertex colors in the display mode you’ll also get expected results.
You can also try this script to just remove mesh vertex colors, if you have no use for them.
(I don’t think this is possible from Rhino UI currently)
RemoveMeshVertexColors.rvb (314 Bytes)
This way no need to rebuild or change display modes.
But going with Nathan’s suggestion is probably the best and easiest way to deal with it.
-j
Thank you again Jarek. I think you are psychic! Nathan’s suggestion worked well but made me wonder if there was a way to remove mesh vertex colours (don’t need it, bin) and was poking around the UI again before asking.
@Jarek, you can call Destroy()
on the vertex color list. Here is a Python script that I was typing while you did your visual basic one
import Rhino
def cleanmesh():
go = Rhino.Input.Custom.GetObject()
go.SetCommandPrompt("Select mesh")
go.GeometryFilter = Rhino.DocObjects.ObjectType.Mesh
go.Get()
if go.CommandResult() != Rhino.Commands.Result.Success:
return go.CommandResult()
mo = go.Object(0).Mesh()
if mo is None:
return Rhino.Commands.Result.Failure
cnt = mo.VertexColors.Count
if cnt>0:
mo.VertexColors.Destroy()
print("Vertex colors destroyed")
else:
print("No vertex colors on selected mesh")
if __name__ == "__main__":
cleanmesh()