#1 2016-01-15 20:11:27

gaya
Member

Billboard models?

I've made a few plane meshes that i'm using as clouds, trees and grass. They look good, but they would be much much better if they were using a billboard effect, meaning they always face the camera. Is there a built-in solution for this?

Offline

#2 2016-01-18 18:05:03

gaya
Member

Re: Billboard models?

Here's an example of what i mean: http://www.flipcode.com/archives/Billbo … i_2E.shtml

Offline

#3 2016-01-25 11:46:28

gaya
Member

Re: Billboard models?

Maybe it's a hidden feature? :P

Offline

#4 2016-01-25 20:26:27

chasester
Member

Re: Billboard models?

particles are billboards so i would use them. There should be an option that allows you to do this effect. If you wanna get super fancy you could set up imposter system :)

As for grass i would use autograss comand in the textures:
texture 0 "Somegroundtexture.jpg"
autograss "somebillboardtexture.png"

sauer has better examples for this but its all in grass.cpp. If you wanna improve it, it would be nice if the grass billboard would change to a model if it got so close. This would make grass seamless :) could just add the model directory as arg2 in the autograss command, if no model then just default to the way it is done now :) this would be a major improvement on the current way of doing things.

As for imposter system it really wouldn't be that hard to implement, the only difficult part would be creating the transitions/fades, when to fade and for how long, but since particle billboards and models have a fade/alpha variable this should be pretty easy may need a lil bit of tinkering to get it perfect. Just set up a new entity type, then create a render to texture on all angles, store these textures as pointer vector in the imposter class, then just instead of rendering the model directly ask the imposter how it should be rendered, look at distance of camera from object and determine how to render (what billboard or what model). This would increase the speed immensely on maps with a large amount of foliage. And Just help as a general improvement for very open maps (where pvs can't help lower render tris).

As for clouds i would use cloudlayer command it does a really good job or cloud box.
You should look through the sky and environment commands listed there, it can do about anything just with a few textures. If you wanna, you could add a the ability for multiple cloud layers. That would be a nice feature and add some depth to the clouds (or use 3d clouds in place). Tho a perfect cloud layer is gonna look as good as a decent 3d cloud system. Just makes it easier to create something awesome.


chasester

@edit
You could add a new set of enums as flags when rendering a model, something like MDL_MIRROR_X MDL_MIRROR_Y, and MDL_MIRROR_Z this would modify the yaw pitch and roll to mirror the camera, so if the pass in yaw was 10, then it would mirror to the camera meaning if the yaw of the camera was 50 then it would be 60. same with the pitch and roll, so you could set up some of your entities this way, allowing you to set modes, like 0 is non 0x1 is MIRROR_X 0x01 is MIRROR_Y 0x001 is MIRROR_Z. then just convert the the entity attribute to a flag that can be passed into the mapmodelrender() command. This would allow you to use the same index system for the map models while not forcing you to change the particle system too much, rather just changing the way the model rendering works. :). Tho for a game like tesseract you probably only ever have to use MIRROR_Z (yaw) cuz there is not a lot of topdown views, and MIRROR_X may be mostly useless cuz the camera almost never has a roll :) (unless you change the way the camera system work now).

Last edited by chasester (2016-01-25 20:44:19)

Offline

Board footer