Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by jcl. 07/22/26 06:42
ZorroGPT
by TipmyPip. 07/21/26 17:54
New Zorro version 3.11
by jcl. 07/21/26 13:42
Lapsa's very own thread
by Lapsa. 07/18/26 13:40
Purchase A8 full licence version
by ukgamer. 07/17/26 05:52
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (1 invisible), 1,440 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Ephraim, Student_64151
19223 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Apply heightmap to vertices on GPU [Re: Superku] #412475
11/27/12 19:14
11/27/12 19:14
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline OP
Expert
Kartoffel  Offline OP
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
I thought manipulating vertices via CPU is very slow?


POTATO-MAN saves the day! - Random
Re: Apply heightmap to vertices on GPU [Re: Kartoffel] #412476
11/27/12 19:20
11/27/12 19:20
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
No why would it? Only if you manipulate all terrain vertices at once (like scale it in z-direction). You can easily determine close terrain vertices and thus you even don't have to loop through all of them for every manipulation.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Apply heightmap to vertices on GPU [Re: Kartoffel] #412479
11/27/12 19:56
11/27/12 19:56
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
Originally Posted By: Kartoffel

That's what I wanted to do, but VS doesn't support texture-reading functions like tex2D / 3D / whatever.


Of course it does.
On like every hardware newer than five years or so.
But as HeelX mentioned, you´ve got to use the tex2Dlod function.

Re: Apply heightmap to vertices on GPU [Re: Superku] #412480
11/27/12 19:58
11/27/12 19:58
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Nah, just manipulate the vertices you are actually modififying. Even if you have a huuuge terrain your brush will mostly cover only a small fraction of it. So it makes sense to update only those. I have written a terrain editor a while ago for a client and in the following screenshot, you see that the brush covers only about 30-40 vertices. So.. well.. this is fast, even on the CPU wink



Besides, it is only fast, if you don't update the collision hull per frame with c_updatehull. For that I implemented an own tracing function that raymarches the matrix from the viewpoint. I use that to adapt a circle-mesh on the ground.

Re: Apply heightmap to vertices on GPU [Re: Slin] #412482
11/27/12 20:13
11/27/12 20:13
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline OP
Expert
Kartoffel  Offline OP
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Originally Posted By: Slin

Of course it does.
On like every hardware newer than five years or so.
But as HeelX mentioned, you´ve got to use the tex2Dlod function.

If so, could you please tell me roughly how to do this? - if it's not too much to explain, of course.


Originally Posted By: HeelX

Besides, it is only fast, if you don't update the collision hull per frame with c_updatehull. For that I implemented an own tracing function that raymarches the matrix from the viewpoint. I use that to adapt a circle-mesh on the ground.

Well thats okay. The main feature I want to have is just being able to "paint" the terrain and to see how the terrain will look like.
Using MED's terrain-from-image-function all the time is senseless for just testing how the terrain will look like.


POTATO-MAN saves the day! - Random
Re: Apply heightmap to vertices on GPU [Re: Kartoffel] #412484
11/27/12 20:26
11/27/12 20:26
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline OP
Expert
Kartoffel  Offline OP
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
@Slin Just got it, thank you very much for the advise!! smile

I just have to fix the culling for terrains:

Last edited by Kartoffel; 11/27/12 20:27.

POTATO-MAN saves the day! - Random
Page 2 of 2 1 2

Moderated by  Blink, Hummel, Superku 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1