Page MenuHome

Game Engine Halo/Billboard Changes
AbandonedPublic

Authored by Florian Schneider (drjaska) on Mar 19 2014, 12:10 AM.

Details

Summary

I made a couple of small changes to how halos and billboards behave in the BGE. I also added a new type of halo.

Changes:

  • Halos rotate with the object
  • Billboards use the objects Z axis instead of the global Z axis as rotation axis.
  • Added "Static Halo" to the Face Orientation options. It's basically the old halo but it aligns itself in such a way that it always appears the same (No rotation/distortion by perspective)

How the halos rotate probably could be improved in some way, I don't know. The billboards being able to point in any direction should make them more useful than they were before. If the static halo is even worth being there is probably questionable, but personally I find it rather useful for effects like lensflares/etc. where one doesn't want the thing to rotate around or be distorted by perspective.

Here an example file showing all changes:
https://developer.blender.org/file/info/PHID-FILE-zy2dagbhaqt5i47d4eg5/

Diff Detail

Event Timeline

With the exception of the new orientation type, this basically 'un-commits' the billboard/halo orientation fixes produced by Vitobalbio in order to make them behave like in other game engines such as Unity (as in, what most developers expect).

What you're basically doing is bringing back the (arguably broken) behavior that existed before then (like how one might've found that the alignment of their billboards were off a bit from the expected behavior).

It does? I just checked and it doesn't appear to change the normals back to the old, wrong behaviour. They still are as they should.

I haven't looked at the patch, but thinking on the functionality proposed there is something I don't understand.
halos and bilboards are supposed to "camera space" effects. That's why they not take the object axis into account.
@Mitchell Stokes (moguri) what do you think?

I'm not really sure what "correct" behavior is here. However, I do know things changed with halos that was not documented, which led to T40097. If anyone has information about which commit changed halos, please add to the bug report. As for this patch, I'll leave it to those more familiar with what should be "correct." I guess this is where the module "User Member" idea would be helpful? Maybe we should get some of those.

@Dalai Felinto (dfelinto) ,@Mitchell Stokes (moguri) : Using the z object axis is very interesting: in the case of smoke particle you will want to rotate the particle to make it more 'dynamic' and it will be impossible with a fixed z axis.

@Florian Schneider (drjaska): about static billboard can you add an option in UI ? it will be genious if you implemented also a axis option for billboard to use X aligned billboard...

source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
1319

you can use : up(oglmatrix[8], oglmatrix[9], oglmatrix[10]), no ?

Porteries Tristan (panzergame) requested changes to this revision.Jul 27 2015, 11:56 PM
Porteries Tristan (panzergame) edited edge metadata.
This revision now requires changes to proceed.Jul 27 2015, 11:56 PM

About XY billboard you can be inspired by line 3622 to 3640 in my effect/particle patch : http://www.pasteall.org/54880/diff.
good luck :)

BGE was removed in Blender 2.80 this patch is being closed as a result.