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 / mesh editing ingame...

Author
Message
dabidos
23
Years of Service
User Offline
Joined: 26th Mar 2003
Location: United States
Posted: 6th Nov 2003 07:32
hi,

whats the fastest or best way to dynamically change a meshes faces or vertices in or during the game? say removing polygons or creating one between vertices?

thanks,
dabidos



code == language : anti-dmca.org
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 6th Nov 2003 10:39 Edited at: 6th Nov 2003 10:41
The fastest, best, and erm... only way is using Memblocks. You could load a mesh, make it into a memblock, then make your modifications to the memblock or create a new memblock from the data, then turn the lot back into a mesh again.

Sometimes, all you need is to be able to move a bone, like if you had a GameFace system like EA, where you can alter the players appearance. You could assign bones onto the face, then move them with code - allowing mesh deformation to an extent. This can also be used for a number of other mock effects, like water, and blanketing a patch of terrain with foliage etc. This is far safer and quicker than using memblocks, in fact it's done using animation commands so it's lightning quick. Check out the 3D modelling forum for the Mesh Control Using DB Limbs thread for more info.


Van-B


I laugh in the face of fate!
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 6th Nov 2003 13:04 Edited at: 6th Nov 2003 13:06
U6 will (finally!) add proper vertex changing commands. Or you can edit the 3D DLL to enable them anyway.

Neophyte
23
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 6th Nov 2003 14:36
@Rob K

"Or you can edit the 3D DLL to enable them anyway."

Interesting. How would one go about doing that though?
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 6th Nov 2003 19:01
You need a program which can edit the stringtables of executables & DLLs. PEExplorer for example. Open up the DBProBasic3DDebug.DLL in notepad and search to find the DLL function names, then add the entry to the stringtable: eg:

ColorVertex%LD%?SetVertexDataDiffuse@@YAXHK@Z

You have to guess the parameter format of the functions to some extent, although there are clues in the @@Y... bit

Login to post a reply

Server time is: 2026-07-26 17:33:29
Your offset time is: 2026-07-26 17:33:29