Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Can I animate a terrain? #310285
02/14/10 09:47
02/14/10 09:47
Joined: Jan 2010
Posts: 40
Adelaide, Australia
Sub_Game Offline OP
Newbie
Sub_Game  Offline OP
Newbie

Joined: Jan 2010
Posts: 40
Adelaide, Australia
Is it possible to animate a terrain hmp or manipulate it's verticies with lite-C?

I'm trying to simulate waves on the ocean. I can to this with a normal model but my short range fog hides the faces of the model but not when I use terrain.


A7 Commercial
First person submarine combat simulator project
http://alexanderforeman.webs.com/fightersubgame.htm
Re: Can I animate a terrain? [Re: Sub_Game] #310291
02/14/10 10:53
02/14/10 10:53
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
Its possible the manipulate the vertecies of a terrain directly,
its a slow approch tough, and better for just changing terrain
once (bomb crater or so)

You could also use multiple terrains that get turned on
one after another in a cycle. (more memory)

Not shure if there is an included terrain-animation setting now.

Better look for a better fog or whatever it is and use an animated model.

Re: Can I animate a terrain? [Re: Damocles_] #310304
02/14/10 11:37
02/14/10 11:37
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline
Senior Member
bart_the_13th  Offline
Senior Member
B

Joined: Aug 2008
Posts: 482
Sure, you can, using ent_setvertex, see details here:
http://www.conitec.net/beta/ent_getvertex.htm

It says that the first call will be slow, but fast at subsequent call(but that depends on how many vertex you want to deform I guess)
Or maybe using vertex shader will be faster...

Re: Can I animate a terrain? [Re: bart_the_13th] #310499
02/15/10 05:16
02/15/10 05:16
Joined: Jan 2010
Posts: 40
Adelaide, Australia
Sub_Game Offline OP
Newbie
Sub_Game  Offline OP
Newbie

Joined: Jan 2010
Posts: 40
Adelaide, Australia
ent_setvertex works like magic and is very fast. I've managed to make some great looking waves through direct manipulation. Thanks guys!


A7 Commercial
First person submarine combat simulator project
http://alexanderforeman.webs.com/fightersubgame.htm
Re: Can I animate a terrain? [Re: Sub_Game] #310502
02/15/10 06:07
02/15/10 06:07
Joined: Jan 2010
Posts: 40
Adelaide, Australia
Sub_Game Offline OP
Newbie
Sub_Game  Offline OP
Newbie

Joined: Jan 2010
Posts: 40
Adelaide, Australia
While I have your attention, does anyone know the fastest way to get a terrain height anywhere along it's surface?

terrain_height (ENTITY_T* terrain, VECTOR* position); only returns the nearest vertice and c_trace is a bit tricky to work with since I have multiple terrains in the game.

entity.floor_dist seems ideal but only shoots downwards and doesn't return the terrain pointer.

I need a very accurate method for the transition from underwater to above water on a moving terrain (water) with a second terrain representing the bottom/ground and an inverted object as the underwater surface.


A7 Commercial
First person submarine combat simulator project
http://alexanderforeman.webs.com/fightersubgame.htm
Re: Can I animate a terrain? [Re: Sub_Game] #310517
02/15/10 08:22
02/15/10 08:22
Joined: Jan 2010
Posts: 40
Adelaide, Australia
Sub_Game Offline OP
Newbie
Sub_Game  Offline OP
Newbie

Joined: Jan 2010
Posts: 40
Adelaide, Australia
I've tried c-trace on my animated terrain and it doesn't work! Even if I freeze my manipulated vertices the c_trace is not accurate at all. Very annoying!


A7 Commercial
First person submarine combat simulator project
http://alexanderforeman.webs.com/fightersubgame.htm
Re: Can I animate a terrain? [Re: Sub_Game] #315711
03/18/10 13:30
03/18/10 13:30
Joined: Dec 2000
Posts: 4,608
mk_1 Offline

Expert
mk_1  Offline

Expert

Joined: Dec 2000
Posts: 4,608
You can displace the vertices using a vertex shader.


Follow me on twitter

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | 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