Billboards in 2.1

Discussion area about developing with Ogre2 branches (2.1, 2.2 and beyond)
Post Reply
User avatar
Herb
Orc
Posts: 412
Joined: Thu Jun 04, 2009 3:21 am
Location: Kalamazoo,MI
x 1

Billboards in 2.1

Post by Herb » Fri Feb 19, 2016 9:38 pm

Ok, just starting to port my code to 2.1 from 1.9. I read the "porting guide" which really helped and have been following progress on 2.1 for some time. So, trying to use the "v1" namespace as much as I can to just get it ported and then I'll work on moving what I can out of the deprecated space. But, when I hit my code around billboards, I saw billboard / billboardset was in the v1 namespace but I didn't see a replacement for them. Are billboards just not "developed" for 2.1 yet, or is there something else I should be using instead as a replacement?
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 4116
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 243
Contact:

Re: Billboards in 2.1

Post by dark_sylinc » Fri Feb 19, 2016 11:32 pm

There's no v2 replacement. But don't worry, the v1 versions will work just fine with the following gotchas:
  • Because billboards have no normals, use the Unlit materials. PBS won't work well on them.
  • Due to a design issue with v1 billboards, assign materials by name rather than by datablock pointer. The Hlms needs to analyze the geometry to know what kind of shader to generate, and because v1 billboards only generate the geometry lazily the first time it's about to be rendered, setting a datablock pointer will cause a crash (unless you somehow forced the geom. generation). Thus setting by name, Ogre will automatically assign the datablock when the geometry is available.
0 x

User avatar
Herb
Orc
Posts: 412
Joined: Thu Jun 04, 2009 3:21 am
Location: Kalamazoo,MI
x 1

Re: Billboards in 2.1

Post by Herb » Mon Feb 22, 2016 6:11 pm

Great! Thanks dark_sylinc for the info and tips. Sounds like it'll straight forward to port with my use of them.
0 x

Post Reply