Smooth vs sharp edges?

For all the users of Twilight Render (V1 & V2), to ask questions and get started
bjornkn
Posts: 27
Joined: Thu Mar 24, 2011 4:56 pm
OS: XP
SketchUp: 8 Pro
Location: Kristiansand, Norway

Smooth vs sharp edges?

Post by bjornkn » Fri Apr 22, 2011 3:27 pm

I'm having a problem with smoothing of surfaces.
It looks like TWL does not pay attention to the Smooth/Soft edges as viewed in SU, but you have to apply the smoothing to the entire group?
As I often manually smooth and sharpen edges I find this quite frustrating.
I've found that if I smooth the group with some high setting everything gets smooth, and then I can unsmooth individual edges, which will stay sharp in TWL.
But as soon as I add or move something everything gets faceted again, and I have to start over again smoothing everything and then sharpen individual edges.
Is there a way around this?

Chris
Posts: 5344
Joined: Sun Mar 08, 2009 3:00 am
OS: Win10
SketchUp: 2016

Re: Smooth vs sharp edges?

Post by Chris » Fri Apr 22, 2011 4:58 pm

There is an odd issue with SketchUp in that it doesn't report smoothing correctly to Twilight unless the smoothed geometry is in a group or component. This appears to be a SketchUp bug.

I'm not sure what you mean about geometry becoming faceted when editing it though... I tried to repeat that but it's not happening to me. I know SketchUp 7 had some really lousy behavior with the smoothing dialog, but I think they may have fixed that for SU8.

bjornkn
Posts: 27
Joined: Thu Mar 24, 2011 4:56 pm
OS: XP
SketchUp: 8 Pro
Location: Kristiansand, Norway

Re: Smooth vs sharp edges?

Post by bjornkn » Fri Apr 22, 2011 5:45 pm

The problem isn't that it has to be in a group, but being in a group isn't enough. It looks like you have to use the Smoothing panel to get it "started", be it either SU to report correctly, or TWL to 'read' correctly. It doesn't render smooth if you smooth a selection inside the group.
After adding a few faces, or moving a vertex or two, the entire group renders faceted again in TWL, even though it looks perfectly smooth (with some edges) in SU.
It appears a bit random though, so I may be missing some 'evidence' here to be able to consistently reproduce the problem. It happens most of the time.

Fletch
Posts: 12897
Joined: Fri Mar 20, 2009 2:41 pm
OS: PC 64bit
SketchUp: 2016-2023
Contact:

Re: Smooth vs sharp edges?

Post by Fletch » Fri Apr 22, 2011 7:29 pm

:!
If you can provide a good test scene, and step-by-step of how we may recreate the behavior, perhaps we can "fix" the issue.

bjornkn
Posts: 27
Joined: Thu Mar 24, 2011 4:56 pm
OS: XP
SketchUp: 8 Pro
Location: Kristiansand, Norway

Re: Smooth vs sharp edges?

Post by bjornkn » Fri Apr 22, 2011 9:44 pm

I'm afraid I can't provide a good test scene.
I tried, but when I made a component of an object and saved it, and imported it back, it rendered smooth.
I thought this was a known problem, because it happens all the time here.
Attached is a screen dump showing a group with two non-connected Amorph test sheets. The sheet on the right is a nested group, and smoothed with group smooth, and sharpened a few edges manually afterwards.
I'm attaching the skp too, but as I said, after I made the group a component it suddenly rendered smooth - also the "old" version that rendered faceted a minute ago.
TWL-facetsScreen.jpg
TWL-facetsScreen.jpg (219.23 KiB) Viewed 11840 times
If I manage to save (and load) a problem scene I'll upload it.
Attachments
Group_6.skp
(411.88 KiB) Downloaded 465 times

Fletch
Posts: 12897
Joined: Fri Mar 20, 2009 2:41 pm
OS: PC 64bit
SketchUp: 2016-2023
Contact:

Re: Smooth vs sharp edges?

Post by Fletch » Mon Apr 25, 2011 4:34 pm

Indeed, this is confirmed.
If one renders the smoothed group, it renders fine.
Then, after opening the smoothed geometry, then changing some edges to "sharp" instead of "smooth", then exiting the group, one renders the smoothed group, it will render as faceted or "unsmooth".
Then, if one converts the group to a component, or explodes and re-groups the geometry, then it will render correctly with the smooth geometry as smooth and sharp geometry as sharp.
This happens in SU8 as well as SU7.

The problem lies in how and when the proper geometry is reported by SketchUp. Our apologies, but there is likely currently nothing we can do about how SketchUp is reporting the geometry.

bjornkn
Posts: 27
Joined: Thu Mar 24, 2011 4:56 pm
OS: XP
SketchUp: 8 Pro
Location: Kristiansand, Norway

Re: Smooth vs sharp edges?

Post by bjornkn » Mon Apr 25, 2011 5:38 pm

OK. Always nice to get confirmations ;)
I've found that TWL quite consistently renders a smooth object as faceted if it is inside a group and you're inside that group editing when hitting the render button.
I don't know how SU reports, and if it reports differently depending on where you are in the hierarchy, ie editing a group/component or not.
But plugins that handles sharp edges on smooth objects good, like the Smooth and Upsample tools in Amorph, seems to receive the correct data on smooth/soft/hard edges, as it handles them correctly. But maybe that's because you use them while inside a group, or because they have found a workaround?

Chris
Posts: 5344
Joined: Sun Mar 08, 2009 3:00 am
OS: Win10
SketchUp: 2016

Re: Smooth vs sharp edges?

Post by Chris » Mon Apr 25, 2011 8:24 pm

You should never render while inside a group or component. There is a good chance the results will be different inside vs outside.

I have no idea how the tools you are referring to work, but I'm pretty sure it's an apples to oranges comparison. Those tools probably work directly with edges; Twilight only works with the face data. When you "soften" an edge, if SketchUp doesn't modify the face's normal to smooth it (which it doesn't) then Twilight won't render that face as smooth.

Selecting "Soften" (from the context menu) on a single edge doesn't effect the smoothing of any adjacent faces or vertices. It basically just makes the edge hidden. Geometry editing tools can interpret that edge as "soft" and subdivide it, or whatever. But from a rendering standpoint, nothing has actually changed; the vertices and normals that make up all the adjacent faces have not been changed in any way. So there is no way to render any of the faces as smooth. I'm not the expert on using SketchUp, but I think the tool (Soften) is just not meant to be used that way (or at the least, it's not working the way it should).

EDIT: Curiously, however, "Unsoften" on a single edge does effect the smoothing of adjacent faces. I think there is a bug in SU using Soften.

Fletch
Posts: 12897
Joined: Fri Mar 20, 2009 2:41 pm
OS: PC 64bit
SketchUp: 2016-2023
Contact:

Re: Smooth vs sharp edges?

Post by Fletch » Mon Apr 25, 2011 9:02 pm

bjornkn wrote:... everything gets faceted again, and I have to start over again smoothing everything and then sharpen individual edges.
Is there a way around this?
Not ideal, but here's a workaround if your smoothed group is rendering as faceted - Simply Exploding and re-grouping the mesh fixes the issue in 2 seconds.
I mentioned it above, but wanted to emphasize it.

Also, another workaround, right-clicking the group and choosing to convert it to a component also fixed the issue. However, that only works for the first time you encounter the issue. After that, the component would need to be exploded and turned into a group. Which, again, takes only a few seconds and is not labor intensive. But if the mesh is particularly complex, then exploding a group can take a very long time indeed, and it is of course only a workaround. :hat:

bjornkn
Posts: 27
Joined: Thu Mar 24, 2011 4:56 pm
OS: XP
SketchUp: 8 Pro
Location: Kristiansand, Norway

Re: Smooth vs sharp edges?

Post by bjornkn » Mon Apr 25, 2011 10:20 pm

Chris wrote:You should never render while inside a group or component. There is a good chance the results will be different inside vs outside.
I do mostly testing currently, and then it doesn't matter that much, as long as I know why/what is happening..
I have no idea how the tools you are referring to work, but I'm pretty sure it's an apples to oranges comparison. Those tools probably work directly with edges; Twilight only works with the face data. When you "soften" an edge, if SketchUp doesn't modify the face's normal to smooth it (which it doesn't) then Twilight won't render that face as smooth.

Selecting "Soften" (from the context menu) on a single edge doesn't effect the smoothing of any adjacent faces or vertices. It basically just makes the edge hidden. Geometry editing tools can interpret that edge as "soft" and subdivide it, or whatever. But from a rendering standpoint, nothing has actually changed; the vertices and normals that make up all the adjacent faces have not been changed in any way. So there is no way to render any of the faces as smooth. I'm not the expert on using SketchUp, but I think the tool (Soften) is just not meant to be used that way (or at the least, it's not working the way it should).

EDIT: Curiously, however, "Unsoften" on a single edge does effect the smoothing of adjacent faces. I think there is a bug in SU using Soften.
I never use the Soften tool from context menu. I either use the Entity info panel (if there's a lot of edges, or just if they are preselected), or the Eraser tool with Ctrl, which adds both Soft and Smooth properties.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 23 guests