Substance Painter
In this start to finish texturing project within Substance Painter we cover all the techniques you need to texture the robot character.
# 1 30-01-2006 , 02:06 AM
MattTheMan's Avatar
Registered User
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436

Extrusion of edges algorithm in c++

Alright, people, another issue here.
To make a modeling system using poly by poly technique, first, I create a plane: 2 vectors with a projection between them.
and then I have this issue: Two sides are vectors, but the other two are not. Is there any way I can convert those 2 sides to vectors so I can manipulate them?

heres a little diagram I drew in Paint (i didnt feel like starting up photoshop) to help you understand my problem.

Attached Thumbnails

Live the life you love, love the life you live
# 2 30-01-2006 , 02:52 AM
Joopson's Avatar
Registered User
Join Date: Jul 2005
Location: Boston, MA
Posts: 2,314
umm,,,... soryy, i d k, im lost user added image


Environment Artist @ Plastic Piranha
www.joopson.com
# 3 05-02-2006 , 06:21 PM
MattTheMan's Avatar
Registered User
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
Ok, I figured it out. This is sooo obvious now. Instead of just having 2 vectors per quad, now I have 5.

It has 2 vectors sharing each vertex, so I can extrude on all sides, plus I can manipulate each vertice, and it will affect the opposite end as well, (when I tried this on my old program, it crashed) because it is triangulated. Though, I don't have to display the triangulating edge, the computer knows its still there.

Attached Thumbnails

Live the life you love, love the life you live
# 4 06-02-2006 , 02:38 AM
MattTheMan's Avatar
Registered User
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
You know, I took a better look at that code, and found that using vectors as edges is a very bad thing to do.

Vectors being lines in 3d space starting at point O and going on in a constant direction forever, unless affected by some other object.

My method included using only parts of vectors as edges, and that took a bunch of code.

Simply using vertices (3 floating point numbers: x, y, and z) like this:

class vertex{
Public:
float x, y, z;
};

and triangular faces like this:

class tri{
Public:
float vertex(x, y, z), vertex(x, y, z), vertex(x, y, z);
};

and finally, the entire polygon like this:

class poly{
Public:
float tri(vertex(x, y, z)), vertex(x, y, z)), vertex(x, y, z)), tri(vertex(x, y, z))
};

allows me to edit polygons really easily.

by the way, that last one is a plane

and then I can have an array of polygons making up the entire scene.

This also makes it easier for me to do some collision testing, like for split faces tool and stuff. ALso makes booleans a breeze. In the end, this will help me make a .obj or .3ds exporter for my raytracer.

cya later,
Matt user added image


Live the life you love, love the life you live
# 5 06-02-2006 , 06:31 PM
gster123's Avatar
Moderator
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
Your doin well on the old programming mate!!

What you using to do it with??

I did 2 years of C++ programming then gave it up, couldent get my head round it, thinbk I'm gonna have to get back into it tho!!

# 6 06-02-2006 , 09:54 PM
MattTheMan's Avatar
Registered User
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
Yah, I need sum1 to help me >.< lol just kidding. I still need to get some stuff done on my raytracer, I'm working on the scene building code now.

Im using Bloodshed Dev C++ 5.0 beta for my compiler: its free and its considered one of the best c++ compilers out there

I think everyone should know some programming, at least everyone in the comp industry. I do it for fun, but I might want to be a programmer for a career.

cya later,
Matt user added image


Live the life you love, love the life you live
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads