A quick question! Regarding setting up character skirt mesh in Blender:
From the micro-optimization perspective which one of these options will be more performant? And curious to know which one would you select in your case?
(Suppose that the whole character has a single diffuse texture)
1- Make the skirt a separate geometry, then only in the skirt material settings, disable the backface culling so it will be visible from both sides.
2- Duplicate skirt mesh and flip the normals then join them all into the character body mesh so you have only a single geometry then enable the backface culling on the material.
I guess option 2 will be slightly faster but I am not sure. Iām interested to know your opinion about this.
My guess is that itās a time versus space trade off. The yin and yang of programming.
If it were me, and I were really that concerned⦠then I would test it with 500 characters on screen⦠or whatever number starts to make things sweat.
But from experience, whatever makes the asset pipeline easier is probably the better bet in the end.
On character models, is it a good idea to join the transparent parts of the mesh (that needs alpha discarding) with the opaque parts when possible (i.e when they use the same texture) to reduce draw calls, or I better keep transparent and opaque parts separate?
One draw call versus two⦠but depending on the amount of transparency it still could be an even trade, I guess.
I would tend to split them out but thatās because I often find the need to tweak shaders that use transparency to not do dumb things when farther away. But I have also experienced cases where transparent rendering on some cards was a real pig⦠but this was 8+ years ago now.
Also, on some level itās good to have some of these āmaybeā optimizations in your back pocket for later. The swapping is easy enough later if it turns out to be worth it.
Itās nice to have this list of things that might be performance wins down the road. Keep development easy now and then look forward to being able to boost performance a bit when things are feeling like they are dragging and then get a nice win.
ā¦though on this topic, I really doubt it will sway things significantly one way or the other.
Anyway, by leaving these potentially easy wins for later, I usually figure I have at least a 10% and sometimes 20% improvement waiting for me when I have time to go and implement all of them. In the mean time, I get closer to a working game and keep things simpler.
My understanding is that ādiscardā prevents certain types of optimizations but I donāt know how significant that really is. And if you discard early and your fragment shader is otherwise doing a ton of work after then to me discard could be better.
ā¦but even then, itās hard to say if the ādiscardā would be immediate in terms of calculations or would be on a parallel branch.
And older cards will behave different than newer ones, blah blah, etc.