I'm certainly no expert, but it seems to me that if you are clever you might be able to use the bump-mapping texture at one level for the vertex deformation (in the fragment shader) at the higher level of detail. Generally, bump-mapping uses a normal map from a texture. I don't know what the performance impact would be calculating the normals on the fly (in GLSL) from height displacement.

Seems similar in many ways to parallax bump-mapping.
-Paul

Zach Deedler wrote:
Hi Robert,

I thought about the height field for plowing.  The only problem I see there
is rendering large areas.  This would result in a lot of vertices which
would render horribly.  This calls for levels-of-detail, which will
complicate things greatly.  Do we just add lower-levels of detail, and
modify all LODs when plowing?

Also, I am concerned that a height field will result in blocky looking snow
clearing.

What about bump maps?


Zach

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield
Sent: Monday, April 16, 2007 14:36
To: osg users
Subject: Re: [osg-users] Snow plowing

Hi Zach,

On 4/16/07, Zach Deedler <[EMAIL PROTECTED]> wrote:
INVESTIGATION
I1) I am investigating moving/removing/adding vertices in real-time.
I2) I am also investigating modifying texture alpha values (Kind of like erasing the overlying snow).

QUESTIONS
Q1) Are there any osg examples that may help me in this investigation?
Examples that may dynamically move/remove/add vertices in real-time?

The osgTDS does adding of vertices on loadtime, not quite real-time but it
might give you something to review.

There arn't any other OSG examples don't do adding/removing vertices.
In general I'd say try to avoid adding and removing vertices, by adjusting
their heights/colours.  If keep a static mesh with static base attributes,
and minimize the amount of data you update per frame then you should be in a
good position for hitting real-time needs.

Q2) I am looking for consultation for simulating snow plowing with OSG. If anybody believes they have the expertise to do this please
contact me.

I'm not available right now alas, it'd would be a fun project though :-)

Q3) Anybody have suggestions on how to implement snow plowing?

I'd try out using a static height field that is displaced by values that are
updated in real-time, a simple vertex shader could do the displacement
either reading the z values for float tex coord array, or from using tex
read.

It just so happens that some of the upcoming work on osgTerrain will provide
support for doing displacement maps that can be updated in real-time.
Perhaps this could be reused for your purpose.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to