[osg-users] Get current Billboard ModelView matrix?

Sebastian Messerschmidt sebastian.messerschmidt at gmx.de
Fri Jul 1 04:13:43 PDT 2016


Am 01.07.2016 um 11:59 schrieb Philipp Meyer:
> Hi,
>
>
>> If you only need the movement towards/away from you, you can use the
>> previous frames depth and perform difference computation based on the
>> difference of the linear depth.
>
> Im not exactly sure what you mean here. Are you talking about rendering the depth of each frame to a texture and comparing the values with the next frame to compute the delta?
>
> If so, wouldnt that be a pixel based approach again suffering the same problems as I mentioned earlier as a response to mp3butcher?

I was talking about the doppler-effect caused by the movement 
towards/away from the view. I guess you are looking from the RADARs 
perspective.
Tagging your object with an per-object/instance id and writing it to a 
texture and comparing it between the frames is relatively easy.
So basically what is missing in your description is the complete 
pipeline of what you are trying to do. Initially you were asking about 
getting the model-matrix only.-
>
>
>> I'd simply pass the view matrix inverse (pre frame) and calculate the
>> modelmatrix via inverse_view * model_view_matrix.
>
> That works, but only gives me the current modelMatrix. I need the modelMatrix of the previos frame though. Because objects can move in my scene, I can not calculate the old vertex position by simply using the current modelMatrix with the old viewMatrix.
You were asking " is there any way to get a current Billboards modelMatrix"

That's what I'm replying too. I've also presented a sketch on how to do it via callback, uniform and user-data to hold the previous matrix. Since you don't say how many objects and how they are structured I cannot give any more specific advise.

Cheers
Sebastian

>
> Thank you!
>
> Cheers,
> Philipp
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=67951#67951
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





More information about the osg-users mailing list