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.

Author
Message
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 2nd Jul 2011 18:25
i am trying to move four vertices that define one side of the cube with dk plugins but it seems that dbp moves one triangle to the left and one to the right side of the cube, how can i make a cube longer with moving only four vertices of one side a little further?

i know for scale function but this is what i want

this is my test code
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 2nd Jul 2011 19:37
I've recently found that the DBP primitive cube has 24 vertices so moving the vertices from one side will just move that face and not actually stretch the cube itself. You will need to grab the vertices from the other side faces and move then too...

Warning! May contain Nuts!
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 2nd Jul 2011 20:59
i used model of the cube(box), that had 8 vertices(two faces each side), try using simple model of the box to do this it still causes problems, because one vertex won't move on each face, two triangles and each has one vertex that can't be moved or such?
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd Jul 2011 22:27
Could you post the box object?

At first sight that code looks a very cumbersome way to move just four vertices. How many limbs and vertices does that box have?
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 2nd Jul 2011 22:34
Quote: "I've recently found that the DBP primitive cube has 24 vertices so moving the vertices from one side will just move that face and not actually stretch the cube itself"


WLGfx is right ...as far as I know, in Dbpro every face of a cube has four vertex, so we have to take them into account and play with those vertex. In this little example I play with 12 vertex to move one face.




Cheers.

I'm not a grumpy grandpa
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 2nd Jul 2011 22:50
here it is use this with the code i posted to see the problem
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 2nd Jul 2011 23:00
Quote: "here it is use this with the code i posted to see the problem "

Are you sure you are using the right vertex numbers?

nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 2nd Jul 2011 23:06
yes i am but just in case try it for yourself
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 2nd Jul 2011 23:35
Quote: "yes i am but just in case try it for yourself "

2 problems:
1. you converted your object to vertexdata only so you can't move just 4 vertices, you need to move 6 of them
2. you are using the vertex numbers in the wrong order

Solution:
comment the line where you convert the object to vertexdata only
use vertex numbers in this order: 0,4,2,1



Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd Jul 2011 23:46 Edited at: 2nd Jul 2011 23:47
But why convert it at all? Why not simply move the four vertices you need using the built-in DBPro vertexdata commands. Since you have only 8 vertices you can simply list them out and see which 4 correspond to the face you want to move.

Edit

The object has only one limb so why complicate the code?
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 2nd Jul 2011 23:57
well how can i move four vertices that represent one side? i want this so i can understand how to do this; when i want to let's say make bent hallway in my level editor
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 3rd Jul 2011 00:13 Edited at: 3rd Jul 2011 00:14
You first need to find the vertices you're interested in. If it's a simple object like your box just list them as in the following snippet:



I'm sure you can see at a glance which four correspond to each face.

For more complicated objects you need some automatic way of deciding which vertices you want to move.

Edit Oops! Corrected careless copy and paste (I hope).
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 3rd Jul 2011 00:41
thanks this helped but is there a way to show vertex numbers where vertex is positioned for better orientation, is it even possible?
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 3rd Jul 2011 00:46
Quote: "thanks this helped but is there a way to show vertex numbers where vertex is positioned for better orientation, is it even possible? "

convert the vertex 3d coordinates to 2d coordinates on the screen and print vertex number at that coordinates

One easy way of doing that would be:
in a loop position an object to every vertex position then get it's 2d coordinates with OBJECT SCREEN X and OBJECT SCREEN Y commands

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 3rd Jul 2011 01:01 Edited at: 3rd Jul 2011 01:01
Another method would be to place small marker objects at each vertex. If the object has only a small number of vertices, e.g. 40 (numbered 0 to 39 of course ), you could place small spheres numbered numbered, say, 100 to 139, at the vertices, i.e. sphere 100 at vertex 0 and so on. Then use pick object on objects 100-139 to find out which vertex is which - just point the mouse at each vertex in turn and print out the value objID-100.

Not entirely sure what it is you want?
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 3rd Jul 2011 02:35 Edited at: 3rd Jul 2011 02:39
Quote: "thanks this helped but is there a way to show vertex numbers where vertex is positioned for better orientation, is it even possible? "


Of course theres`s a way, but that will have to do it ourselves...have a look OBJECT SCREEN X(),OBJECT SCREEN Y()

In this other example, I show you where are this vertex(somethink like Green Gandalf suggest you). It´s a poor vertex editor...just to show how it works. I hope it can help someone



I'm not a grumpy grandpa

Login to post a reply

Server time is: 2026-07-10 12:02:24
Your offset time is: 2026-07-10 12:02:24