Serious Transparency-Problem

The interface, modeling, 3d editing tools, import/export, feature requests, etc

Moderators: jesterKing, stiv

Post Reply
Forrest Gimp
Posts: 0
Joined: Fri Oct 31, 2008 2:21 pm

Serious Transparency-Problem

Post by Forrest Gimp »

I am trying to make an object "build up" in a scene. The idea is a sort of growing-like effect. Basicly it does what the slice-modifier would do in 3dsMax. It's basicly a material, which is absolutely transparent on one side (in this case the top half) and solid on the other (bottom half). I use a plane as texture-reference, so I can animate the "slicing edge". This works perfectly.

What doesn't work however is the transparency itself.

If I use Z-transp I get this:

Image

Errors:
- jagged edge on the bottom where object meets ground
- jagged edge where first floor meets walls (though they have the same material!)
- z-buffer error on the left wall, where the first floor shows through the wall (it is not even very close to the outside wall in reality!)

So I decided to go for Raytransp. But the result is equally unacceptible:

Image

Errors:
- vast parts of the image that must be invisible are shown.

The settings are shown below:
Image


I'm not sure if anyone has noticed this before. I've been looking for an answer for days, yet all I found was a partly similar problem in another forum. The promoted "solution" there was to render using z-transp at ridiculously high resolution and then downsizing the rendered image until the z-transp-errors sort of disappear. This ist not feasible, because they never vanish completely, and the rendering-times are increasing drasticly.

Has anyone got a suggestion for a workaround or solution to get either of the transparencies to work correctly?

Forrest Gimp
Posts: 0
Joined: Fri Oct 31, 2008 2:21 pm

Post by Forrest Gimp »

Is this a bug? It seems noone has ever noticed this before.... the closest thing I found was this post http://www.blender.org/forum/viewtopic. ... highlight= which was submitted almost a year ago. It seems the issue wasn't ever resolved (if it was I didn't find any clues as to how it was done)

Help please! A lot of hard work went into this project, and the jaggy z-transp edges spoil it all. :cry: It would ruin a lot of good modeling if I'm not able to fix this very shortly.

Master Letch
Posts: 0
Joined: Sun May 25, 2008 8:15 am
Location: Keswick Ontario, Canada

Post by Master Letch »

hey,

just wondering if you have found a solution yet, if you havent and still want to know how to do this, I can test till i find a solution (it won't take me long)
M. Letch

Forrest Gimp
Posts: 0
Joined: Fri Oct 31, 2008 2:21 pm

Post by Forrest Gimp »

No solution so far for the main problem (i.e. the malfunctioning z-transparency). I have found a workaround for some cases, using a boolean modificator, but it would be much better if I could use a ztransp mapping. For more details (and to spare you some work ^^) read the thread I posted on blenderartists ( http://blenderartists.org/forum/showthread.php?t=141739 )

I'd be very grateful if you could try and help me with this!

jesterKing
Site Admin
Posts: 207
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Post by jesterKing »

The slice feature of Max you're showing looks a lot like my clip plane modifier ( http://wiki.blender.org/index.php/Blend ... neModifier ) It is currently on hold, but I could start work on it again for Blender 2.5

/Nathan

Forrest Gimp
Posts: 0
Joined: Fri Oct 31, 2008 2:21 pm

Post by Forrest Gimp »

The clip-plane modifier (or what it's supposed to become) looks exactly like the slice-modifier from max. It would be totally cool if that modifier would be in 2.5!!!

For inspiration check out the boolean modifier. Thats's the workaround I used. The procedure is described in the blenderartists-thread I mentioned above. It does similar things in splitting the faces like you described (the special-quad-case for example) and does it quite clean. However it will seal up any "open" cuts that are created with new faces (which might not always be wanted), and it takes loads of performance if used with complex meshes. Still, you might be able to find something you can use in the source?


Still, a geometric slicing plane will always produce sharp cuts at best. Soft edges can only be achieved by using a map, and for this to work the z-transp/aliasing issue would have to be fixed.

Master Letch
Posts: 0
Joined: Sun May 25, 2008 8:15 am
Location: Keswick Ontario, Canada

Post by Master Letch »

alllright, so after a short period of brain storming I have a variety of fixes/work arounds for your situation.

1. you can use the alternative sampling method called FSA instead of OSA. you can do this by turning to your Output panel under scene and clicking the "Save buffers" button and then the "full Sample" button. this will automatically change OSA to FSA. this should work to get rid of the jagged edges in the z-Transparency solution.

2. not sure if this tailors to your needs, but it would make for an extrodinary "build" animation. you can use a particle effect with the new "explosion" modifier to create flying pieces. and using a combination of "Time (under object)", "Layer (under object)", " and "Alpha (under material)". you could make pieces appear using alpha ipo, run them backwards with time ipo to build your building and use layer ipo to reduce rendering times by only rendering active pieces. I believe you also need an animated texture to control particles.

3. you can do a less impressive build up using individual objects and just use an Alpha ipo to make them fade in on cue. (as I said alot less impressive)

so those are the work arounds I came up with... #2 is built for Television or movie (if done right) but I think I solved the z-transparency problem for you ^_^
M. Letch

Forrest Gimp
Posts: 0
Joined: Fri Oct 31, 2008 2:21 pm

Post by Forrest Gimp »

Well, thanks alot, Master Letch!

I'll comment in backward order:

3. Fading in is so damned boring.... I know how to do it, but I wouldn't animate it in Blender. Rendering in Layers and doing it in PostPro is much more efficient and flexible... It's the very last option I'll chose when all else fails.

2. I know the the effect you mean... Used it a few times with some glowing and motion-blur on the particles for building up logos and such. It looks nice, but the effect is far too fancy for this technical visualisation project.

1. Interesting Feature... I wouldn't have found that in a thousand years of trying. It does indeed seem to fix at least the z-order problem, where parts of the geometry were showing through other parts which are actually in front of them. However, the edges are still jaggy. And another problem (which I noticed only recently) is improved, but not fixed: There are errors in shadow-calculation.

So, it improves the result, but
- only when using full 16x FSA
- Rendering time with these settings doubles
- errors in shadow calculation prevail

Some pictures to demonstrate. The left beam has a normal material for reference, the right one and the cuboid in the background has the z-transp-option on.

The OSA (left picture):
- Background shows through where the edges of non-ztransp and ztransp objects meet
- jagged edge on the ztransp beam, where it should be straight
FSA (right picture) fixes all of these at 16x!
ImageImage

OSA (left picture) has a slight shadow-edge along the base of the beam. When using FSA (right picture) the edge becomes thinner, but is still noticable.
Image Image

Still, it might do as the result is converted to a DVD-MPEG-stream, which again softens the edges a bit, and the z-order is correct now as well. Thanks!

For further testing I will post a .blend-file. this afternoon.

Master Letch
Posts: 0
Joined: Sun May 25, 2008 8:15 am
Location: Keswick Ontario, Canada

Post by Master Letch »

So I've tried numerous techniques to get rid of this artifacts, from material properties to compasity and z masking. the problem seems to be related strictly to shadows... but while fooling around I discovered a theoretical fix. if it were possible in blender to give a material a negetive z offset... it should get rid of the artifacts. but this is kinda impossible for a non-python coder like myself.

I found softening the shadows makes the artifacts slightly less noticable (almost blurred)

so besides that, not sure how to solve the problem
M. Letch

stiv
Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Post by stiv »

Skimming back over this thread, I don't see any mention of setting the Clip Start/End of the camera. Given the fixed resolution of the z-buffer, setting these parameters can be quite important for fixing z-buffer issues.

Master Letch
Posts: 0
Joined: Sun May 25, 2008 8:15 am
Location: Keswick Ontario, Canada

Post by Master Letch »

I've allready went through all clipping and camera properties, none of which seemed to help. making the rendered resolution higher creates a larger ratio between the artifacts and the surrounding area... but they never actually go away
M. Letch

Forrest Gimp
Posts: 0
Joined: Fri Oct 31, 2008 2:21 pm

Post by Forrest Gimp »

OK, the project is finished now. You can view the results on http://www.cadcon.de under "Leistungsspektrum"->"Design". Its the topmost project (MAN Diesel Combine Cycle). You can now see what I needed the effect for....

And in spite of using FSA at a needlessly high samplerate I still had to cheat massively in more than one situation. The problem was that still objects with z-trans-materials looked half resolution under some circumstances.

This was especially true for thin, filigrane objects. The distance from the camera also seemed to matter: from up close the resolution-bug was less obvious, and of course when the object was far away enough it wasn't visible either. Still, going through my rendered images frame-by-frame for some sequences was no fun at all.

This should be resolved by the developers at some point before the 2.5-release I think.

Thanks for the help all of you!

Post Reply