What IS IT with me and glass?

General questions about Indigo, the scene format, rendering etc...
User avatar
Heavily Tessellated
Posts: 108
Joined: Thu Aug 10, 2006 4:20 pm
Location: Huh?

What IS IT with me and glass?

Post by Heavily Tessellated » Wed Sep 19, 2007 1:22 pm

Open glass containers, fine. Glasses, bottles, etc. all behave. Even closed containers, as long as there are no protrusions, fine. But I swear Indigo is intentionally messing with my mind when it gets more complex than that.

The model in question is the glass envelope of a 9-pin vacuum tube. It's solid. All facenormals are correct. World scale is very close to 1BU=1m Indigo. The IoR is a nice basic glass, 1.5. The test renders are just a UV plane, a sunsky light, and the lower half of the envelope fed to Bidir MLT...

I try the faces solid. It's fragmented as expected (gorgeous caustics!). Considering it is subsurf'd to 200k faces it should look better than it does - But - it behaves as you'd expect.

I set the faces to smooth, and all hell breaks loose. Just look at that mess.

Just for shits and giggles I'll include a basic blendternal render, both mirror and transparency set to 10 and faces smoothed. I really hate it when blendternal looks better than Indigo.

What exactly is up here? Why can't I DO this? Do I have to cheat? Do I have to set the glass to some IoR that's not physically correct, say 1.05, to get it to look right?

Frustrating me to the point of screaming. ARGH! :x
Attachments
envelope-blendternal.jpg
envelope, Blender, smooth face normals
envelope-blendternal.jpg (187.68 KiB) Viewed 12126 times
envelope-smoothed-normals.jpg
envelope, Indigo, smooth face normals
envelope-smoothed-normals.jpg (280.71 KiB) Viewed 12126 times
envelope-solid-normals.jpg
envelope, Indigo, solid face normals
envelope-solid-normals.jpg (275.3 KiB) Viewed 12126 times
envelope-face-edit-mode.jpg
envelope in Blender, face edit mode
envelope-face-edit-mode.jpg (133.89 KiB) Viewed 12126 times

User avatar
CoolColJ
Posts: 1738
Joined: Mon Jun 25, 2007 1:47 pm

Post by CoolColJ » Wed Sep 19, 2007 1:40 pm

my guess is the blender exporter is not setting the shading angles properly when smoothing

I have the same problem with other exporters, but some of them can't read the shading angle, and just set full smoothing with no angle limits

Big Fan
Posts: 745
Joined: Tue Oct 17, 2006 9:37 am
Location: Nelson NZ

Post by Big Fan » Wed Sep 19, 2007 1:52 pm

add a modifier 'split angle' :wink:

IanC
Posts: 147
Joined: Thu Aug 24, 2006 4:46 am

Post by IanC » Wed Sep 19, 2007 1:54 pm

Tried applying scale and rotation? (ctrl-a?)

Last time I had messed up refractions it was due to odd scaling.

User avatar
Heavily Tessellated
Posts: 108
Joined: Thu Aug 10, 2006 4:20 pm
Location: Huh?

Post by Heavily Tessellated » Wed Sep 19, 2007 2:32 pm

Heh no IanC it's not scale/rotations, I've got this built-in ctrl-a habit since 3 years ago. Probably do it 100x more than needed, but once it screws up a complex 24000 frame animation once...

CCJ, This is blendigo, I'll try Wedge's exporter and compare...

Ah! speak of the devil. Big Fan is here. OK but isn't EdgeSplit the exact same function as autosmooth? I'll give it a shot though. Got nothin' to lose.

(edit: just wiki'd the EdgeSplit modifier and it's externalized so exporters can use it... and an exporter writer specified to use it... Hmm. Now I'm getting my hopes up. Render baby render! :P)

Big Fan
Posts: 745
Joined: Tue Oct 17, 2006 9:37 am
Location: Nelson NZ

Post by Big Fan » Wed Sep 19, 2007 2:37 pm

I batch import VRML files and apply a split edge - works wonders no more normal problems like this one for you
the alternative it actually to seperate your meshes at sharp edges which is usually a pain/impractical for any decent model
just alter the split angle until it is right - you can see an indication of how it will look in the blender 3D window
I use 25 deg but it varies a bit HTH

User avatar
Heavily Tessellated
Posts: 108
Joined: Thu Aug 10, 2006 4:20 pm
Location: Huh?

Post by Heavily Tessellated » Wed Sep 19, 2007 7:18 pm

:twisted:

This will work, but it's not that simple. It seems it's a combination of things... here's the mesh when edgesplit @ 25°, and while it's still wonky it's better.

The modifier stack was part of the problem: For anyone else who ends up reading this for troubleshooting tips, EdgeSplit needs to be before Subsurf or else it'll do what you see below, applying it after the fact only complicates your angle guess...

Finally, what it should look like. I see a couple geometry mistakes, but the point is I SEE them. Yay³

Thanks BF. No more autosmoothing here. Wondering if it's easier to just recompile Blender so every default mesh primitive starts with the EdgeSplit modifier already on the stack...
Attachments
envelope-smooth-edgesplit-60.jpg
YAY
envelope-smooth-edgesplit-60.jpg (267.69 KiB) Viewed 12047 times
envelope-smoothed-edgesplit-25.jpg
Output of above - better but bad.
envelope-smoothed-edgesplit-25.jpg (270.29 KiB) Viewed 12047 times
envelope-inside-edgesplit-30.jpg
EdgeSplit after Subsurf = BAD
envelope-inside-edgesplit-30.jpg (27.64 KiB) Viewed 12047 times

Big Fan
Posts: 745
Joined: Tue Oct 17, 2006 9:37 am
Location: Nelson NZ

Post by Big Fan » Wed Sep 19, 2007 9:07 pm

ok good... there are some geometry cases where split edge doesn't work esp well cos when you try to lower the split angle until you get the edge you want you find that somewhere else on the mesh the normals are not smoothed
in these cases the best thing is to separate the problem section from the rest
often this task is made much easier by using the select/linked flat faces tool in edit mode :wink: and then mesh/vertices serarate.. :D

User avatar
Stur
Posts: 594
Joined: Fri Nov 10, 2006 11:52 pm
Location: Nancy, France

Post by Stur » Wed Sep 19, 2007 11:55 pm

Maybe a pointless question but, have you tried to "mark sharp" the edges you wanted to be sharp instead of tweaking the split angle or spliting your mesh manually ?



edit : by the way, your normals look weird at the bottom of your bottle, on the "edit face mode" picture. If they are bugged, you could try CTZn's tip (c)2006 to export your mesh in obj format and then to re-import it.

Big Fan
Posts: 745
Joined: Tue Oct 17, 2006 9:37 am
Location: Nelson NZ

Post by Big Fan » Thu Sep 20, 2007 1:24 am

um yeah you can often do that but I was thinking of one I had recently shown in the attach pic
in this case it was easier/faster to select the faces of the parabolic areas and separate them cos the edges faded out... :roll:
Attachments
test.png
test.png (12.01 KiB) Viewed 11946 times

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Thu Sep 20, 2007 1:57 am

I usually use edgesplit 30° for indigo, as it's (as far, as I know) the "maximum allowed angle without normal smoothing problems"...
if I want some of those edges smooth, I add loops, extremely close to the edges in question, and use subsurf 2 (above the edgesplit modifier)

and in case, I want more sharp edges, I use the "mark as sharp" feature :D

that way, I can get as many control as I need.

you have to be careful with "subsurf above edgesplit", in example, for cylinders....

try to make a lowpoly cylinder, add an edgesplit modifier, which splits more than just the cap and add subsurf, any you'll immediately see the problems with SaE ;)

Wedge
Posts: 441
Joined: Sun Jan 14, 2007 11:33 am
Location: East Coast, USA

Post by Wedge » Fri Sep 21, 2007 8:19 am

I have done some work adding angle limits to smoothing but it isn't pretty. It is not correct but testing shows it seems to be working as intended. As noted in the directions right angles start getting smoothed at about 54 degrees.

If you did try it with the exporter I worked on, I would be interested to see the results. I would keep it smoothed at Blender's default of 30 degrees and see what happens. (but it might need to be adjusted)

Tried to make it correct but my understanding of it is apparently not enough to allow me to write it correctly. And I also fear on big models that it might be slow to calculate. I assume you need to find angle of face and check neighbor faces to determine the angle of difference. But as I said, my math or knowledge of Blender and or Python is apparently not enough.

I think the way I wrote it turned out to be useful even though it is not correct.
Content contained in my posts is for informational purposes only and is used at your own risk.

User avatar
5OnIt
Posts: 157
Joined: Sat Mar 03, 2007 5:11 am

Post by 5OnIt » Sat Sep 22, 2007 4:02 am

If you're still having trouble with it, maybe you should just post your .blend file and let someone else take a look at it.

When I'm having problems with Blender I've found that sometimes the best remedy is a second set of eyes.

User avatar
Heavily Tessellated
Posts: 108
Joined: Thu Aug 10, 2006 4:20 pm
Location: Huh?

Post by Heavily Tessellated » Sat Sep 22, 2007 4:58 am

Nope, all good. My second set of eyes are all of yours, as it were. The edge split modifier took care of all of it... I was doing a test render of the full tube checking the glass, but DAMN I'm really happy with my SSS "mica" insulator wafers. That's schweet.

One textural thing that bothers me, the mirror gradient has a hard line at the end of the fadeout, when the UV end less than the edge, and the matte is definitely full white at the end? Ah well, not related to the topic of the thread... the glass looks correct.
Attachments
tube-edgesplit-25.jpg
EdgeSplit @ 25°
tube-edgesplit-25.jpg (121.4 KiB) Viewed 11727 times

User avatar
psor
1st Place Winner
Posts: 1295
Joined: Sun Jun 25, 2006 1:25 am
Location: Berlin
Contact:

Post by psor » Sat Sep 22, 2007 5:09 am

@Heavily Tessellated

Looks very nice! And now let it glow! :twisted:

nb: What I don't like somehow is the frayed black surrounding of the text. :?


take care
psor
"The sleeper must awaken"

Post Reply
19 posts

Who is online

Users browsing this forum: No registered users and 3 guests