SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Animation / Mel Scripts & Programming / WIP: My Raytracer
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 12-02-2006, 08:25 PM   #16
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 well gettin into hte programming!! Have you done much in MEL??

My C++ was object orientated where you used a blank form and created an interface using the different user imputed attributes to calcualte/look up values, Might try and get back into it using MEL
gster123 is offline   Reply With Quote
Old 12-02-2006, 10:35 PM   #17
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

thanks, and no, i dont know MEL

And magicsy, I have to finish this first, before realyl getting into maya/3ds max again
__________________
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote
Old 13-02-2006, 01:05 AM   #18
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

Haha! Check dis out!:attn:
Attached Thumbnails
Click image for larger version

Name:	untitled-2.jpg
Views:	168
Size:	42.7 KB
ID:	26849  
__________________
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote
Old 17-02-2006, 08:22 PM   #19
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

And now it does collisions with spheres too.
Attached Thumbnails
Click image for larger version

Name:	untitled-1.jpg
Views:	157
Size:	82.3 KB
ID:	26910  
__________________
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote
Old 19-02-2006, 11:31 PM   #20
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, this is the last update before I can render out a picture.

I have a function that shoots 800 x 600 rays (480,000) tests them each against every primitive, finds a collision, gets the primitive color, and (very soon) will apply that color to a pixel.

I just need to find an easy to use graphics library for c++ and I'll show you. Then right after that I will add diffuse shading.
__________________
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote
Old 25-02-2006, 05:27 PM   #21
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

MY FIRST IMAGE! YAY YAY YAY :attn: :attn:

its not much... but I know how to add diffuse shading, and it will happen a bit later today.
Attached Thumbnails
Click image for larger version

Name:	firstraytracedimage.jpg
Views:	134
Size:	19.7 KB
ID:	26997  
__________________
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote
Old 25-02-2006, 07:25 PM   #22
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

And diffuse shading. Next up: reflections! :attn:
Attached Thumbnails
Click image for larger version

Name:	raytraceimg2.jpg
Views:	133
Size:	18.0 KB
ID:	26998  
__________________
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote
Old 25-02-2006, 07:36 PM   #23
Tim_LIVID
Subscriber
 
Tim_LIVID's Avatar
 
Join Date: Sep 2003
Location: Harwich, UK
Posts: 1,195
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Fast work there Matt
__________________
"You can live for yourself today -- or help build tomorrow for everyone" _LIVID

Optical Minefield
My Blog
Tim_LIVID is offline   Reply With Quote
Old 25-02-2006, 07:44 PM   #24
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

thanks: and to show you that I added perspective (like, the farther an object is away from the camera, the smaller it appears) a while ago: here

I moved the sphere about 80 units away form the camera and about 30 units to the side

The bad quality is not my raytracer's fault, it is bad JPG compression that MS Paint does.
Attached Thumbnails
Click image for larger version

Name:	persp.jpg
Views:	131
Size:	18.9 KB
ID:	26999  
__________________
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote
Old 26-02-2006, 01:40 AM   #25
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

And now: The plane reflects! In about 30 minutes, the sphere might reflect too!

and I have to say that it runs waaaaaaaaaaaaaay faster then the Maya Software Renderer. I acheived almost the exact same effect in Maya SR, and it took about 10 seconds to work.

Mine rendered in less then half a second.
Attached Thumbnails
Click image for larger version

Name:	reflect.jpg
Views:	123
Size:	59.6 KB
ID:	27002  
__________________
Live the life you love, love the life you live

Last edited by MattTheMan : 26-02-2006 at 12:41 PM.
MattTheMan is offline   Reply With Quote
Old 26-02-2006, 02:26 PM   #26
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

umm... I didnt add sphere reflections, though I have been working on it I have to restart it because it is seriously f***ed up

I added the characteristic that a reflective material adds its color onto the color of the reflected object
Attached Thumbnails
Click image for larger version

Name:	reflect copy.jpg
Views:	120
Size:	66.3 KB
ID:	27011  
__________________
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote
Old 26-02-2006, 05:14 PM   #27
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

before I make the spheres reflect, I decided to optimize my main rendering code and to add another sphere (so the sphere reflcetions look cooler)

Well, I could add as many primitives as I want now, but it took me a while to do...

I might make the light a white sphere, so you can see where it is.

I need to make the blue sphere reflect off of the plane though
Attached Thumbnails
Click image for larger version

Name:	2spheres.jpg
Views:	118
Size:	21.9 KB
ID:	27015  
__________________
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote
Old 26-02-2006, 05:54 PM   #28
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

and the second sphere is reflected too
Attached Thumbnails
Click image for larger version

Name:	2spheres.jpg
Views:	116
Size:	22.3 KB
ID:	27016  
__________________
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote
Old 27-02-2006, 05:01 PM   #29
gster123
Moderator
 
gster123's Avatar
 
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
Thanks: 1
Thanked 51 Times in 45 Posts
Default

Cool work man, keep going!
gster123 is offline   Reply With Quote
Old 27-02-2006, 06:13 PM   #30
Falott
Registered User
 
Falott's Avatar
 
Join Date: Jan 2005
Location: vienna
Posts: 1,095
Thanks: 3
Thanked 20 Times in 18 Posts
Default

respect mat!

if you are 13 and doin stuff like this now, youŽll earn a heck lot of money later in your life! keep it comin!
Falott is offline   Reply With Quote
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Jay_Outlaws Tales WiP thread Jay Work In Progress 301 23-01-2017 04:23 AM
apache WIP andrew_sorensen Work In Progress 9 23-12-2010 09:22 PM
Thumbnails in WIP & Finished Work Miss_Nova Site News & Announcements 11 09-12-2010 05:22 AM

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.