Vertice Editing???
by Tyler Slabinski · in General Discussion · 04/30/2009 (3:48 pm) · 21 replies
I was wondering if there was any vertice editing function for any of the 3d Torque Engines?
Like, let's say you have an object with the following vertices:
Before Editing:

After Editing:

I thought of some pretty good ideas for this (custom weapons, DTS/DIF editor, etc.)
I highly doubt this is part of the engine, but I was hoping that if it wasn't, someone could show me how to implement some functions like:
It is more of the first 2 I am looking for, but I was hoping I could make a good DTS editor with the other parts. I don't know much of OpenGL either... I know this is a big thing to ask for, but I bet many others would like this too.
Like, let's say you have an object with the following vertices:
Before Editing:

After Editing:

I thought of some pretty good ideas for this (custom weapons, DTS/DIF editor, etc.)
I highly doubt this is part of the engine, but I was hoping that if it wasn't, someone could show me how to implement some functions like:
getVerticePosition(); setVerticePosition(); mergeVertices(); splitVertices(); extrudeVertices();
It is more of the first 2 I am looking for, but I was hoping I could make a good DTS editor with the other parts. I don't know much of OpenGL either... I know this is a big thing to ask for, but I bet many others would like this too.
#2
05/02/2009 (4:58 pm)
BUMP
#3
Actually consider the performance of 'Vertice Editing' during a runtime simulation. It is not feasible in the fashion i think your describing.
But;
The functions you seek are easy to emulate using 'bones' such as found with some animated mesh techniques. And there are some rather old code scraps floating around this website that teach one how to do it.
05/02/2009 (5:23 pm)
The consequence would be Swiss Cheese like holes in the fabric of space and time, multidimensional contamination and of course the end of all life as we know it. Is that something you want on your conscious?Actually consider the performance of 'Vertice Editing' during a runtime simulation. It is not feasible in the fashion i think your describing.
But;
The functions you seek are easy to emulate using 'bones' such as found with some animated mesh techniques. And there are some rather old code scraps floating around this website that teach one how to do it.
#4
I don't mind, as long as my game pwns =P
I was thinking of static shapes with small amounts of difference between the default object and custom object. Like a customized sword. Not entire animations.
Well, I never thought to use bones. I guess that it should work, any links on something I could be looking for?
05/02/2009 (6:26 pm)
Quote:The consequence would be Swiss Cheese like holes in the fabric of space and time, multidimensional contamination and of course the end of all life as we know it. Is that something you want on your conscious?
I don't mind, as long as my game pwns =P
Quote:Actually consider the performance of 'Vertice Editing' during a runtime simulation. It is not feasible in the fashion i think your describing.
I was thinking of static shapes with small amounts of difference between the default object and custom object. Like a customized sword. Not entire animations.
Quote:The functions you seek are easy to emulate using 'bones' such as found with some animated mesh techniques. And there are some rather old code scraps floating around this website that teach one how to do it.
Well, I never thought to use bones. I guess that it should work, any links on something I could be looking for?
#5
I have offline copy on the Linux box; what my little brother is 'doing stuff' with right now. So I will try and remember to look it up later once the box is back online, if you dont find it first (or someone else drop a link for it..)
05/02/2009 (6:49 pm)
There is a resource about 'node deform ' or 'bone deform' perhaps 'mesh deform'. I have offline copy on the Linux box; what my little brother is 'doing stuff' with right now. So I will try and remember to look it up later once the box is back online, if you dont find it first (or someone else drop a link for it..)
#6
05/03/2009 (3:58 am)
the singular form of "vertices" is "vertex" not "vertice"
#7
Tyler, i do not seem to have the link/code/cached web page anyplace on the Linux box. So you may need to do a page by page search of the resource section, you'll know it when you see it. Good luck!
05/03/2009 (4:24 am)
Ya but that tid-bit of fact was not pertinent to the problem at hand, and correction is unrelated to the solution. It was quite clear what Tyler was talking about. Besides I did not want to look like a pompous jerk nitpicking something as silly as spelling.Tyler, i do not seem to have the link/code/cached web page anyplace on the Linux box. So you may need to do a page by page search of the resource section, you'll know it when you see it. Good luck!
#8
I am guessing you don't know how GG works. Even if I posted my topic as "I n33d he1p v3rt1ices3s 3d1iting" You should still help, not post what the correct spelling is.
BTW, you should capitalize the first letter of your sentence. And use periods.
05/03/2009 (9:04 am)
Quote:the singular form of "vertices" is "vertex" not "vertice"
I am guessing you don't know how GG works. Even if I posted my topic as "I n33d he1p v3rt1ices3s 3d1iting" You should still help, not post what the correct spelling is.
BTW, you should capitalize the first letter of your sentence. And use periods.
#9
05/04/2009 (10:45 am)
I didn't want to correct your sentence, I just thought knowing the correct term may help your search because the word "vertex" is a kind of keyword here.
#10
05/04/2009 (11:46 am)
In that case, it was a nice gesture on your part. Misinterpreted from lack of explanation, happens all the time...
#11
05/04/2009 (1:20 pm)
I would take Caylo's advice - use bone animations to move vertices in the way you want them, then take a look at some resources to get custom threads playing on shapes (or in this case, images - there was a good Plastic Gem on image threads). In your simple example, you could achieve moving that vertex out either by scaling a bone in the middle of the shape with weight only on that vertex, or by simply creating a bone at that vertex's position and moving it outwards.Quote:Even if I posted my topic as "I n33d he1p v3rt1ices3s 3d1iting" You should still help, not post what the correct spelling is.Debatable :P
#12
Let's say I make a longsword as a DTS shape.
Player 1 wants to customize his/her longsword.
He/she uses a small editor and can make small modifications using a vertex modifier and makes a longer/shorter/odd-shaped sword.
05/04/2009 (2:06 pm)
Actually, I was thinking of minor, static object with minor modifications.Let's say I make a longsword as a DTS shape.
Player 1 wants to customize his/her longsword.
He/she uses a small editor and can make small modifications using a vertex modifier and makes a longer/shorter/odd-shaped sword.
#13
..Editing like F.E.A.R. or other games that are smart enough for features like this request(see jupiter engine)... *no*.
There is nothing like what you specifically want.
Can you fake it somehow, certainly. Will it have anywhere near the functionality of the feature you're asking about ? no.
Can you write the module yourself and add it to torque ? sure.
..have fun!
05/04/2009 (5:58 pm)
Wow, this thread went off on tangents...Editing like F.E.A.R. or other games that are smart enough for features like this request(see jupiter engine)... *no*.
There is nothing like what you specifically want.
Can you fake it somehow, certainly. Will it have anywhere near the functionality of the feature you're asking about ? no.
Can you write the module yourself and add it to torque ? sure.
..have fun!
#14
I basically want to have a realtime vertex/bone editor that I can manage through script. I believe animations 'may' work, but I will need alot of animations, one for each editing of the vertex. Sure, it will work the way I want, but I doubt that it would be GPU cheap.
05/04/2009 (6:41 pm)
Tangents? Sorry, not dealing with trigonometry here.I basically want to have a realtime vertex/bone editor that I can manage through script. I believe animations 'may' work, but I will need alot of animations, one for each editing of the vertex. Sure, it will work the way I want, but I doubt that it would be GPU cheap.
#15
For example... you could make scale a MatrixF, a MatrixF that does not have to be orthogonal, then you could do some interesting skews. Or perhaps a F32 "twist" field that corkscrews the mesh.
You would want to transform your TSShapeInstance nodes with these new factors prior to rendering, but it could be tricky to discover exactly where to do it.
05/04/2009 (6:46 pm)
Turning a longsword into a dagger can be done by adjusting the object's scale. Perhaps this feature could be built as an extension, and working much the same way, as scale does. For example... you could make scale a MatrixF, a MatrixF that does not have to be orthogonal, then you could do some interesting skews. Or perhaps a F32 "twist" field that corkscrews the mesh.
You would want to transform your TSShapeInstance nodes with these new factors prior to rendering, but it could be tricky to discover exactly where to do it.
#16
Basically, what you are saying is... I gotta learn OpenGL... Because I have NO idea what you are talking about... TO THE ONLINE OGL REDBOOK!!!!
05/04/2009 (7:44 pm)
I am not thinking of a dagger-sword kind of editing, but I think I may know what you are talking about.Basically, what you are saying is... I gotta learn OpenGL... Because I have NO idea what you are talking about... TO THE ONLINE OGL REDBOOK!!!!
#17
05/04/2009 (10:03 pm)
Umm... ogl? No... Torque has the rendering code all abstracted under the GFX layer, so you definitely don't need to know any OGL specific code. TSShape and TSShapeInstance are the classes responsible for rendering meshes, so those are what you need to investigate and understand.
#18
05/04/2009 (10:05 pm)
I was proposing, rather than editing individual vertices maybe a more general mesh deformation technique would be useful. Search for papers on mesh deformation, i really know very little about it.
#19
In the example you gave of a user customizing their weapon's shape. You could go the extreme route where the weapon model is procedurally generated, there is no dts file. The user specifies a spline curve and you generate verts for it from that and other parameters. This is how the MeshRoad and River in t3d work.
05/04/2009 (10:14 pm)
Like imagine this, your model is sitting inside a bounding box. Now you arbitrarily manipulate the corner points of the box and as you do it deforms the mesh inside it. Anyway, that might not be powerful enough for the kinds of manipulation you want, I dunno, just an idea.In the example you gave of a user customizing their weapon's shape. You could go the extreme route where the weapon model is procedurally generated, there is no dts file. The user specifies a spline curve and you generate verts for it from that and other parameters. This is how the MeshRoad and River in t3d work.
#20
05/04/2009 (11:20 pm)
I would still go down the animation path. It's not going to be customisable as being able to edit each vertex, but you've got to make some sacrifices. I would implement 3 or 4 animations per weapon, each of which changes some aspect of the weapon. So animation 1 might make the blade longer, animation 2 might make the hilt wider, etc. Then you just display sliders for these animations and have the user set them like they want it.
Torque Owner Tyler Slabinski