Planetside Software Forums

General => Open Discussion => Topic started by: Dune on June 02, 2021, 01:23:38 AM

Title: Blender mesh versus opacity 'issue'
Post by: Dune on June 02, 2021, 01:23:38 AM
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.
Title: Re: Blender mesh versus opacity 'issue'
Post by: Nala1977 on June 02, 2021, 03:17:11 AM
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.
Title: Re: Blender mesh versus opacity 'issue'
Post by: Dune on June 02, 2021, 08:43:29 AM
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.
Title: Re: Blender mesh versus opacity 'issue'
Post by: sboerner on June 02, 2021, 11:07:28 AM
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?
Title: Re: Blender mesh versus opacity 'issue'
Post by: Dune on June 02, 2021, 12:35:55 PM
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.
Title: Re: Blender mesh versus opacity 'issue'
Post by: WAS on June 02, 2021, 01:51:15 PM
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.
Title: Re: Blender mesh versus opacity 'issue'
Post by: PabloMack on June 02, 2021, 08:03:47 PM
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.
Title: Re: Blender mesh versus opacity 'issue'
Post by: sboerner on June 02, 2021, 09:55:53 PM
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.
Title: Re: Blender mesh versus opacity 'issue'
Post by: Dune on June 03, 2021, 02:16:58 AM
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.
Title: Re: Blender mesh versus opacity 'issue'
Post by: sboerner on June 03, 2021, 11:34:22 AM
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 (https://blender.stackexchange.com/questions/93686/transluscent-leaf-using-principled-shader). In case you want to pass it along.
Title: Re: Blender mesh versus opacity 'issue'
Post by: WAS on June 03, 2021, 01:19:41 PM
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.
Title: Re: Blender mesh versus opacity 'issue'
Post by: sboerner on June 03, 2021, 04:05:56 PM
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.
Title: Re: Blender mesh versus opacity 'issue'
Post by: Dune on June 04, 2021, 03:35:20 AM
And of course there's a trade-off between low poly and 'everyneedleabunchofpolys'. Finding the sweet spot for every circumstance is the problem.
Title: Re: Blender mesh versus opacity 'issue'
Post by: WAS on June 04, 2021, 12:46:43 PM
That's why we got heroes and LOD objects.
Title: Re: Blender mesh versus opacity 'issue'
Post by: sjefen on June 04, 2021, 06:01:05 PM
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
Title: Re: Blender mesh versus opacity 'issue'
Post by: WAS on June 04, 2021, 06:12:11 PM
I think it has to do with what I mentioned, calculating all those masks and their orientation to light sources, etc. At least especially with cycles which is calculating all those masks, and then what it sees, and trying to do realistic bounce on it all. It could also possibly introduce redundancy where stuff is calculating for the whole card, then masked.
Title: Re: Blender mesh versus opacity 'issue'
Post by: Dune on June 05, 2021, 02:44:48 AM
Perhaps they should rewrite the code; first obliterate all masked out, then do light calculations, etc.
But Sjefen, that's what the guy told me too, faster as mesh without alpha, but with alpha it needs more translucency to get rid of dark plant centers, which costs.
Some leaves are so complex that a tight mesh can't be made, so you need an additional alpha, as Steve pointed out too, so I wonder if just a little alpha (black) would cost as much as a lot more alpha...
But anyway, my question has been answered, thanks all.
Title: Re: Blender mesh versus opacity 'issue'
Post by: WAS on June 05, 2021, 01:20:13 PM
I think honestly these shortcomings of renderers is why hero trees are becoming more popular. I noticed in Pixar's latest movies that it seems they are using real 3D modeled sprigs in their scenes. Least the way they interact with wind and in some cases can literally rotate in that wind. With these sort of node network rendered scenes wouldn't have as much hindrance from memory limitations using a farm.
Title: Re: Blender mesh versus opacity 'issue'
Post by: Dune on June 06, 2021, 01:29:39 AM
Yes, with machine power upped over the years (decades) polys don't matter much anymore.