Home » Community » Forums » » Terrain Geomorphing in the Vertex Shader
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 Terrain Geomorphing in the Vertex Shader
Post Reply 
Can someone give me a link to PVS for terrain - I can't think of a good way to test if a patch is visible.
Cheers!



Read about my game, project #1
NEW (18th December)2 new screenshots, one from the engine and one from the level editor



John 3:16

 User Rating: 1295   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

The code does not work in my radeon 8500

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

could you be more specific why it does not work?
i developed it on a geforce3 but also tested it on a radeon8500...
DANIEL

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Sorry for the lack of detail :D
I think it was a driver problem, because today, when i was going to write waht the problem was, it worked flawless.

Anyways, the previus error, seemed to be not accesing agp memory, so the game said that the hardware could not perform the game, so it had to go to reference software drivers.

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

BTW: the source code also includes a complete bsp (quake3) level renderer including collision detection...

maybe somebody has usage for it,
DANIEL


 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

quote:
Original post by d000hg
Can someone give me a link to PVS for terrain - I can't think of a good way to test if a patch is visible.
Cheers!



Read about my game, project #1
NEW (18th December)2 new screenshots, one from the engine and one from the level editor



John 3:16


Please? I can't think how to do check what's behind a patch of terrain efficiently, and I've not come across such a topic in the terrain articles I've read upto this point...
Thanks!



 User Rating: 1295   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

well,

PVS in terrain rendering is a really simplified case of PVS in general 3D graphics (say 3D meshes) since in terrain it is more or less a 2D problem.

i did describe the basic idea in my article. if you have any specific questions feel free to ask...

bye,
DANIEL


 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link


I'm in trouble in DirectX 9..

maybe, I have to find something instead of D3DVSDT_FLOAT4 in vertex declaration.

// this is my code.
// TerrainMorph.vsh

vs 1.1

dcl_position0 v0
dcl_position1 v1
dcl_position2 v2
dcl_position3 v3

...same

/////

// verxtex declaration in dx 9.0

HRESULT hr;
D3DVERTEXELEMENT9 decl[] =
{
{ 0, 0, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0 },
{ 0, 16, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 1 },
{ 0, 32, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 2 },
{ 0, 48, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 3 },
// stream, offset, type, method, usage, usageindex
D3DDECL_END()
};

if( FAILED( hr = pd3dDevice->CreateVertexDeclaration( decl, &m_pVertexDeclaration ) ) )
{
return false;
}
pd3dDevice->SetVertexDeclaration(m_pVertexDeclaration);


but, it won't work..

give me some help, plz..




 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

It seems you're using static vertex buffers and rendering each
patch individually with a drawprimitive call.
<br>
It doesn't sound very good way in case of you have many patches
with the lowest LOD. So u end up calling rendering method
every second triangle.
<br>
Therefore I think that using dynamic vertex buffer and software
based tweening is MUCH faster way.
<br>
juhnu







 User Rating: 1015    Report this Post to a Moderator | Link

I am about to start implementing a terrain engine of my own and I was curious why most geo-morphing techniques use quad trees as a basis? Are there advantages over the quad tree for geo-morphing over a triangular binary tree? Or are there other reasons for using a quad-tree for terrain visulization?

I know triangle bin trees are specifically used for this purpose and was wondering if geo-morphing techniquest hav more problems wiht them or why this is so.

Thanks,

Jason

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I thought it would be a good idea to mention that whats visible (or at least what might be) can be worked out in realtime per vertex, keeping the memory usage down. I dont think many people know how (in fact I dont know if anyone does, I made it up) but I'm gonna see if it works first. It only works for terrain/grid based things though I think. And wierdly enough this is an offshoot of my shadowing method (which I'm gonna try out first, along with my lighting method, cause they are more visualy impressive). I never meant to invent all this stuff, just you invent one thing by accident and the rest come and knock on your door...

 User Rating: 1257   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Hello,

When I try to run the demos (gamescene, mountains,...) the scene jerks a bit while moving around although the framerate is about ~100 fps. When I set "Disable_HardwareVertexShader yes" the jerks get less but are still noticeable.

Is this common and where could this problem come from?
Is there a way to switch the demos to fullscreen? When I try to set to fullscreen with "F2" the demos end with an error.

Thanks,

 User Rating: 997   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Hi,

Maybe I'm a little late to talk about this article, but I want to implement something like what they talk about in this article. Unfortunately, the link to the source code doesn't work anymore. Does anybode has the source code, or another example using the same technique?

Thanks.

 User Rating: 992   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

The source(and images btw) for this article are no longer available. Does anyone have the source available for download?

GBS

 User Rating: 1019   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Hi,

I'm trying to figure out the reasoning behind the author's choice of
tweeningA = (1.0 - tweeningL) * tweeningI
for geomorphing. Consider this example:

Assume we have a geomipmap that is currently at level 0.5 and that switching would introduce a large enough error that its detail level will not change much as the camera moves away from it. Furthermore, imagine that its left neighbor is changing rapidly, from 0.5 through 0.99. In that case:

Wagner's formula places tweeningA below both tweeningL and tweeningI (e.g., when tweeningI and tweeningL are both 0.5, tweeningA will be 0.25). Furthermore, as the tweeningL factor increases, tweeningA decreases. This means that as the "L" vertices draw closer to the position where they'd be removed, the geomipmap's "A" vertices will shift away from their removal point, producing a kind of seesaw effect between the "L" vertices and the "A" vertices.

Is that how it's supposed to work? I don't get it.

 User Rating: 979   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: