Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Nymphodora, AndrewAMD, TipmyPip, Quad, Imhotep), 847 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
ent_setvertex() #390678
01/03/12 20:19
01/03/12 20:19
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
It would be really helpful if there was a hint that c_updatehull(entTerrain,1); is required to update the colission.

See this thread:
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=378501

I had the same problem and it took me quite some time to find out where I forgot what...

Re: ent_setvertex() [Re: FBL] #390724
01/04/12 09:59
01/04/12 09:59
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
I have also some problem with it when doing chunked terrain vertex manipulations... I found an idea in a 256k contest entry named MathHero that:
ent_fixnormals(terrain_entity,0);
and
c_updatehull(terrain_entity,0);
can work, with 0 instead of 1. It is not documented too, what it does exactly.
but I found ent_fixnormals work well only with A7 in this way, it gives no good result in A8 (terrain shading seems to have different implementations in the 2 engines). finally I wrote my own tiny script for setting vertex normals thus getting proper (and a bit stronger) terrain shading...


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: ent_setvertex() [Re: sivan] #390743
01/04/12 12:40
01/04/12 12:40
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
c_updatehull is normally not required after ent_setvertex, except for the cases mentioned in the manual. Otherwise the engine calls c_updatehull itself when vertices are manipulated.

ent_fixnormals is not required either, because it doesn't do anything with terrains. It's for models only. Thus, the normals of terrain must be set manually through the nx/y/z values. It would make sense to implement fixnormals for terrain also - in fact I see that it's already on our list.

Calling a function with a wrong argument, such as 0 instead of 1, normally doesn't matter as this is internally corrected. But better look in the manual and use the correct value.



Re: ent_setvertex() [Re: jcl] #390753
01/04/12 13:03
01/04/12 13:03
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
thanx


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: ent_setvertex() [Re: sivan] #390765
01/04/12 15:11
01/04/12 15:11
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Well... without c_updatehull I had no updated collision hull. But I needed to find out what I'm doing wrong before, as there was no hint about that.
The dngine did not update the hull for sure - and I was wondering why c_trace delivers odd results just to find out it is using the original (flat) hull of the ent_createterrain created terrain.

I'm using ent_fixnormals on (unchunked) terrain and it seems to work... good enough at least.

Re: ent_setvertex() [Re: FBL] #390840
01/05/12 09:47
01/05/12 09:47
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Yes, but terrain is always chunked in A8. A6 and A7 had unchunked terrain that was rendered like a model.

Have you read the manual about when you have to use c_updatehull and when not?

http://manual.3dgamestudio.net/ent_getvertex.htm

Re: ent_setvertex() [Re: jcl] #390845
01/05/12 10:19
01/05/12 10:19
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Originally Posted By: JCL
Yes, but terrain is always chunked in A8.

But what about when "terrain_chunk=0;"?

The A8 manual says that setting disable chunking...
Well, mine does anyway... in the 'terrain_chunk' entry.




"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: ent_setvertex() [Re: EvilSOB] #390847
01/05/12 10:46
01/05/12 10:46
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Yes, terrain_chunk=0 is not supported in A8. This will be added to the manual.

Re: ent_setvertex() [Re: jcl] #390850
01/05/12 11:06
01/05/12 11:06
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
I'm doing terrain vertex manipulations for chunked terrain, I found c_updatehull required afterwards...

But there are still errors at some vertices (surface is not updated), probably on chunk borders.

Maybe some more examples would be needed in the manual because I'm lost.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: ent_setvertex() [Re: jcl] #390853
01/05/12 11:21
01/05/12 11:21
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
One word ... eek


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Page 1 of 3 1 2 3

Moderated by  aztec, Inestical, Matt_Coles, Tobias 

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