Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Sparky's Collision and Advanced Terrain. Can't find the answer

Author
Message
pdq
20
Years of Service
User Offline
Joined: 20th Jul 2006
Location:
Posted: 30th Aug 2010 06:12
The command "sc_setupTerrainCollision" has been removed from the lastest SC dll. You are now suppose to use "sc_setupComplexObject" instead. oooookaaaaaay........ how?
Kira Vakaan
17
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 30th Aug 2010 07:28
I was unaware Sparky's could ever work with AT. I'm guessing support has been removed.

pdq
20
Years of Service
User Offline
Joined: 20th Jul 2006
Location:
Posted: 30th Aug 2010 15:17
It did. In fact SC's most recent "TerrainDemo" uses AT and still uses the old command which of course when compiled, gives an error. The demo does not show you how this is done with "sc_setupComplexObject"
pdq
20
Years of Service
User Offline
Joined: 20th Jul 2006
Location:
Posted: 31st Aug 2010 16:25
Anybody? Why was the terrain function removed from SC? In addition, I can't seem to find an explanation as to how to use "sc_setupComplexObject" as the replacement since terrains don't seeme to be treated as "objects"?
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 31st Aug 2010 20:40 Edited at: 31st Aug 2010 20:40
Have you tried clicking on the keyword and pressing F1?

Quote: "SC_setupComplexObject

SYNTAX
SC_setupComplexObject objNum , GroupNum , FacesPerNode

-objNum: the object you want to setup
-groupNum: the group that you want this object to belong to (0 for no group)
-FacesPerNode: sets the maximum number of faces per tree node, usually the smaller this value the better the performance, if unsure of this value set it to 2

almost exactly the same as setup object except this command will setup optimized polygon collision on a
complex (high poly) object so that you get much better performance for these types of object.
realistically three is little difference between this and normal polygon collision
for objects of less than 30-40 polys, but higher polycounts definately benifit from higher performance.
You can think of it as splitting the object up into little bits, of size specified by facesPerNode,
and only checking collision with sections near a collision, therefore cutting out alot of polygons.

Updated from memblocks to use direct vertex access"

The help files pretty much explain it all. AT terrains are indeed objects which can be used with this command, whereas BT terrains need a bit of tweaking first.

My signature is NOT a moderator plaything! Stop changing it!
pdq
20
Years of Service
User Offline
Joined: 20th Jul 2006
Location:
Posted: 31st Aug 2010 20:57 Edited at: 31st Aug 2010 20:58
Got it. I did that to start with. But DB insisted the object did not exist. I rechecked to make sure it was the correct object which was 1 and still did not work.

Now it works. Strange :~

Thanks

Login to post a reply

Server time is: 2026-07-23 12:10:43
Your offset time is: 2026-07-23 12:10:43