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.

Newcomers DBPro Corner / How do I access vertices?

Author
Message
Open DNA
21
Years of Service
User Offline
Joined: 12th May 2003
Location:
Posted: 23rd May 2003 02:31
Dear All,

I just received my DBPro package
However, I am unable to find the commands that let me access and manipulate the vertices of an object. I can't even find the commands that let me create vertices and planes in an empty mesh and manipulate them afterwards.

Where is this stuff?

Kind regards
Reda Borchardt
Visit http://www.open-dna.com
haggisman
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 23rd May 2003 11:55
There aren't any actual 'create vertice' commands in DBpro. To do this you will have to use memblocks, either by creating a memblock from an object or by creating a completely new memblock from scratch. Manipulation will simply involve altering the memblock data, Just like the code shown below, note i had to limit it to 5fps otherwise it just becomes a blur



project: light/obscurance mapper (80% done)
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 23rd May 2003 12:08
nice one haggisman

I saved it to the permanent code snippets folder i have.

Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 23rd May 2003 13:14 Edited at: 23rd May 2003 13:17
If you wish to change an existing object:

MAKE MESH FROM OBJECT meshno,objectno
MAKE MEMBLOCK FROM MESH memblockno,meshno

...change memblock data... (for details on layout of memblocks see the help files for "Make Memblock from Mesh")

CHANGE MESH FROM MEMBLOCK meshno,memblockno
CHANGE MESH objectno,limbno (0 by default),meshno

If you want to use the above two commands in realtime, you MUST upgrade to Patch 4.1. The "CHANGE..." commands are very slow Patch 4.0 and below.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 23rd May 2003 13:15 Edited at: 23rd May 2003 13:23
BTW: More low-level commands for this kind of thing are comming in P5.

Unlike some other languages however, you don't have to use the mesh commands to create primitives like planes (in DBP a plane is a definate size, unlike maths) or triangles. As you are a Blitz3D user, this may seem a little strange.

Memblocks also allow you to manipulate vertex colours & normals of vertices. Vertex Alpha is not available yet unfortunately (as far as I know)

On a different subject, This code snippet by Kevil for transparency on objects is useful as it replaces the crap GHOST OBJECT command): (Demo code included, includes opacity mapping code as well)




Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 23rd May 2003 13:26
BTW. Saw the tutorials on your site for B3D - Very nice

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
Open DNA
21
Years of Service
User Offline
Joined: 12th May 2003
Location:
Posted: 23rd May 2003 21:11
Thank you very much guys. This is very helpful stuff.
The last time I peek and poked was on the Amiga Let's see if I can work with this memblock stuff.

If everything runs smoothly, I should have my first DBPro demo up & running tonight.

Kind regards
Reda Borchardt

Visit http://www.open-dna.com
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 23rd May 2003 23:12
Memblocks also apply for images, sounds and bitmaps. Although images and bitmaps have higher level commands to manipulate them as well ala. Blitz, but memblocks are faster.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 23rd May 2003 23:13
I suggest that you look for all of Kevil's work on the Code Snippets board - handy reference for learning memblocks.

Anyhoo, I have been posting way too much recently, about time I started a proper project

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip

Login to post a reply

Server time is: 2024-09-20 09:44:52
Your offset time is: 2024-09-20 09:44:52