Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 30-01-2006, 02:06 AM   #1
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
Thanks: 0
Thanked 18 Times in 18 Posts
Default 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
MattTheMan is offline   Reply With Quote
Old 30-01-2006, 02:52 AM   #2
Joopson
Registered User
 
Joopson's Avatar
 
Join Date: Jul 2005
Location: Los Angeles, CA
Posts: 2,313
Thanks: 1
Thanked 33 Times in 33 Posts
Default

umm,,,... soryy, i d k, im lost
__________________
Environment Artist @ Plastic Piranha
www.joopson.com
Joopson is offline   Reply With Quote
Old 05-02-2006, 06:21 PM   #3
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
Thanks: 0
Thanked 18 Times in 18 Posts
Default

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
MattTheMan is offline   Reply With Quote
Old 06-02-2006, 02:38 AM   #4
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
Thanks: 0
Thanked 18 Times in 18 Posts
Default

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
__________________
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote
Old 06-02-2006, 06:31 PM   #5
gster123
Moderator
 
gster123's Avatar
 
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
Thanks: 1
Thanked 51 Times in 45 Posts
Default

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!!
gster123 is offline   Reply With Quote
Old 06-02-2006, 09:54 PM   #6
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
Thanks: 0
Thanked 18 Times in 18 Posts
Default

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
__________________
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.