Blender mesh versus opacity 'issue'

Started by Dune, June 02, 2021, 01:23:38 AM

Previous topic - Next topic

Dune

Does anyone know if it's better to use (more or less) exact fitting meshes for leaves in a Blender plant, or if one can use say a 16 poly displaced square mesh, and use opacity to get rid of the rest? I would say, opacity zero means nothing to influence the area, isn't that so?
Someone claimed some settings needed to be set very high, resulting in more rendertime, or darker areas inside a plant. In Blender that is!
It's a lot more work to make a complicated mesh around a serrated/indented leaf, so I prefer using the simple square/rectangle.

Nala1977

not using blender but usually when i use plants, unless they are in foreground which needs more detail, i go with card opacity, so single side geometry, low poly with opacity, also this is a must when you want to scatter them, like xfrog, because otherwise your polygon count would skyrocket.
If the leaves are close to the camera and need details then i use double side meshes with textures on both sides.

Dune

So do I in TG, but this guy renders in Blender and said he prefered fitting meshes for Blenders render engine, which apparently works differently.

sboerner

I use SpeedTree's cutout editor to make close-fitting meshes for leaves, with more or less geometry depending on the quality setting. But even so you still need alpha masks to create the actual leaf shape. Haven't used Cycles very much (Blender's renderer) but can't imagine the process would be any different. Maybe I'll check it out. Did you find this advice online somewhere?

Dune

Yes, I used the editor too for some more recent leaves, but usually (until recently at least) I just used pre-made meshes in a certain shape (or used fronds), always rectangular or square, and left opacity to do it's elimination game. The 'complaint' came from a guy rendering in Blender's cycles. The zero opacity areas apparently cast shadows nonetheless. I don't know anything about Blender, hence my query.

WAS

#5
I think it's to do with the lighting model. Even with opacity zero, there is "mesh" there, and I think it still interacts with Rays, unless the object itself is set not to, which would of course destroy the lighting model for something like a tree (lighting model is calculating the whole square, but we just want the leaf calcualted). So with cycles, this may cause lighting issues that aren't as realistic, especially with raytracing the shadows and calculating all the opacity maps and angles towards light.

I also think in Blender, at least, with a particle system, leafs cards culled to a mask might even be faster. Not only is the area larger on the card to calculate lighting for, but the mask has to be calculated with all the cards angles and light passing through (which also may become secondaries or something, not sure).

Additionally, a leaf card actually culled to a leaf, and processed, may provide more accurate normals for the leaf as apposed to a card, due to the new geometry of the card. Especially if you add in some roughness to the cards shape for leafs sides hanging down or up ever so slightly, etc. In TG the normals for cards let alone trees are pretty crucial for good lighting. Too large, like xfrog vanilla OBJ models, and things are very fake and flat looking. I have subdivided all xfrog models, and computed new normals, and they look a lot better in PT similar to what I like in sjefen's scenes.

PabloMack

I haven't gotten very far along in Blender but I am learning. I think that X-Frog does most of their trees with simple polys and defines the outlines using alpha masks. Since trees have so many leaves I think it is a pretty ingenious way of greatly reducing the poly count so that you don't use up memory very fast. It certainly speeds up render time when you have large populations of trees. Double-sided polys make some pretty thin leaves so it only works when you don't get too close to any of the leaves. Of course you could do a high-res/poly leaf if you wanted to zoom in on an insect doing its thing. I wouldn't think Blender is any different when it comes to transparency/opacity.

sboerner

Regular alpha masks seem to be working fine here. This is a closeup of a black spruce model I did a while back. The needles are made up of multiple polys set at right angles to one another, so there are hundreds of polys in this frame. Rendered in Cycles.

Dune

Thanks for your input, guys. I think I'll do a compromise for the man and make tighter meshes as far as it goes, but not too extreme. He has a LOT of power in his machine so a few thousand polys is no worry to him. But indeed, your example looks good to me, Steve. Thanks for testing that.

sboerner

You're welcome. There's useful information on how to build a translucent shading network for Cycles here: https://blender.stackexchange.com/questions/93686/transluscent-leaf-using-principled-shader. In case you want to pass it along.

WAS

Quote from: sboerner on June 02, 2021, 09:55:53 PMRegular alpha masks seem to be working fine here. This is a closeup of a black spruce model I did a while back. The needles are made up of multiple polys set at right angles to one another, so there are hundreds of polys in this frame. Rendered in Cycles.

See, to me I immediately notice the lighting is wrong. The calculations are very large it looks like, so a whole sprig is lit in specular, even when it's cascading down and bending away from the light it looks like. Like a plastic fake Christmas tree with flat ribbon needles tied into wire. Which is pretty representative what is actually happening with the model and it's needles. So imo not very realistic.

sboerner

Well, OK. But this was a quick test just to show that alpha masking works in Blender. The model wasn't designed to be rendered at this distance. Cycles is a fine renderer, and more experience on my part and more care with the shading network would produce better results, no question.

Dune

And of course there's a trade-off between low poly and 'everyneedleabunchofpolys'. Finding the sweet spot for every circumstance is the problem.

WAS

That's why we got heroes and LOD objects.

sjefen

#14
Blender and cycles work fine with alpha maps, but the way I understand it is that it renders faster if it's modeled compared to using alpha. I think I read that on the Scatter addon sometime, but I can't find it anymore. I think that's why that addon has many different LOD instead of just low poly with alpha masks.
I know this doesn't make much sense, but I'm so sure I read it once and it caught my attention so I had to read it one more time to double check.

- Terje
ArtStation: https://www.artstation.com/royalt

AMD Ryzen Threadripper 1950X
128 GB RAM
GeForce RTX 3060 12GB