Camera facing foliage for trees via material

What you could do:

  • You can collapse the 4 points of your faces in the model to the same position(still having all 4 uv corners mapped to them). That gives kind of an odd model without the shader. But the shader will put the vertexes in place. Now that gives you 100% individually bilboarded square faces.

and then again you can play with that:

  • You can give your uv any shape you like (any number of points - just make a face of a couple of points that all have the same position and in the uv make them form the shape you like) .
  • Or have different islands of different shapes. Don’t need to be squares. Just collapse the points and stack all the islands above each other.
  • if you don’t stack them you need to translate the texture offset per island which may turn out to be difficult.
  • if you have different shapes you can also put them into different channels in order to map different textures to them.

and so on ….

Just do NOT normailze position vectors (get rid of all normalisation before the View/Camera→World transformation).
Rule of thumb: Never normalize position vectors. Only normalize direction vectors.

The shader

Its as simple as below. I added some optional parameters.

  • Texturescale scales all the face individually by the same given factor(default cm→m scaling).
  • zscale moves the whole object(all affected faces the same amount) away from or towards the camera.
  • scale scales the whole object.

For the ops original problem:

sure enough everything stands and falls with the model. Where you place your faces does matter of course. Also selecting which faces should be billboarded and which not does matter. For partial billboard, the relation between the size in the model and the size of the square gives how much it is billboarded(zero size gives 100%). We do billboarding by scaling so faces do get bigger: take this into account for sizes of faces in the model(and if you do it the Pontius Karlsson way, the whole model: faces gets scaled so they need to be smaller in the model).

additional hint:

You could also use an uv atlas(have multiple textures for different leaves packed in one tiled texture) you can make inputs from parameters. Which texture you select is what you like choose:


I think that gives kind of a world of possibilities to create nice billboarded objects of all kind and using vertex colors proposed in a previous comment may add additional of room for creativity…