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 / Vertex Manipulation - problem with memblock structure

Author
Message
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Mar 2010 02:02
Hi everyone!

In DBC, they had a clear structure in the memblock when using the command "make memblock from mesh", but with DBP it's all smashed together in a way I don't seem to understand. The help files are useless, and the examples are useless.

I want to be able to directly edit the positions of any vertex on an object. How can I do this? Where are the vertex positions located in the memblock?

Also, to apply the updated memblocks to the object, this doesn't work:



It says that object does not have a mesh at specified limb or something.

TheComet

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th Mar 2010 02:36 Edited at: 28th Mar 2010 02:36
Use the vertexdata commands instead. Much simpler.

Attachments

Login to view attachments
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Mar 2010 02:46
Where can I download those commands?

TheComet

The Slayer
Forum Vice President
14
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 28th Mar 2010 03:02
@TheComet:

If you have DBPro (don't know which version, but mine is 7.4), then those commands are already there. Click on the BASIC3D COMMANDS in the help, there you should find those VERTEXDATA COMMANDS.

Cheers

Slayer rules!!! Yeaaah, man!
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th Mar 2010 03:21
The image I posted shows you exactly where they are. Did you look?
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Mar 2010 11:56 Edited at: 28th Mar 2010 11:57
Lol, sorry, I should have looked deeper before I posted! They weren't in the index...

OK, I have this:



And object 121 doesn't do anything at all.

What's wrong?

TheComet

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th Mar 2010 14:44
Quote: "And object 121 doesn't do anything at all."


What do you mean?
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 28th Mar 2010 17:27 Edited at: 28th Mar 2010 17:28
what do you expect it to do?
In your code you set the position of one single vertex to the position of the first limb in your target object...

Here's a simple example of a deforming sphere using the vertexdata command set
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Mar 2010 18:07
Quote: "what do you expect it to do?"


I expected the vertex to position at the objects target position and therefore deform one triangle of the object, but it doesn't.

Thanks for the code! I'll be testing...

TheComet

TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 29th Mar 2010 00:12
Yess, it works! Thanks a lot!

I found that an object that has been loaded doesn't have any vertices So I made a mesh out of it and then made an object out of the mesh again, and then it seemed to work.

The last problem I have is that the smoke disappears when coordinate 0,0,0 goes out of the screen boundaries.

http://www.youtube.com/watch?v=tGNfrvDtxW0

I think it is due to the fact that the smoke object is always positioned at 0,0,0, and is then hidden because it is out of view. How can I make it so the object is always shown, no matter what?

Thanks, TheComet

empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 29th Mar 2010 01:22
Quote: "I found that an object that has been loaded doesn't have any vertices"

You need to check the other limbs. With loaded objects the first limb is usually the parent for all other limbs and does not contain mesh data.

Quote: "How can I make it so the object is always shown, no matter what?"

Try a negative value for SET OBJECT RADIUS

Login to post a reply

Server time is: 2024-04-18 21:22:38
Your offset time is: 2024-04-18 21:22:38