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 / I need help with my polygon removal code

Author
Message
darkvee
20
Years of Service
User Offline
Joined: 18th Nov 2005
Location:
Posted: 5th Oct 2012 03:17
Hi guys,

My poly removal code works. It shows the right places where the poly should be hidden. You should see a half sphere when you run it.

However, if I write vertices-1 or vertices-3 in the memblock it messes up.

Here is the code:




Also I made my own poly counter. Mine poly counter doesn't even pick up the sphere from when I rebuilt it. However, if you press spacekey it will create a new cube and it shows my poly counter works.

You think you can help me fix this guys thanks

darkvee
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 5th Oct 2012 15:24 Edited at: 5th Oct 2012 15:27
Primitives in DBP are created differently, a cube is made up of a vertex array and an index array, where-as, I'm assuming, the sphere is just made up of a triangle mesh. In that case you will not have an index list and to remove a poly you will just have to remove a triangle using a different method.

EDIT: What you might be better doing for small single mesh objects is MAKE MESH FROM OBJECT which doesn't use an index list and this works for all objects.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 5th Oct 2012 20:22
Your new half sphere object is made from a memblock mesh so it won't contain index data which is why you get 0 for your count.
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 6th Oct 2012 05:52
Quote: "Your new half sphere object is made from a memblock mesh so it won't contain index data which is why you get 0 for your count. "


WHHHHHAAAAAAMMMMMYYYY!!!

Login to post a reply

Server time is: 2026-07-07 15:09:58
Your offset time is: 2026-07-07 15:09:58