SimplyMaya Forums

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


SM Forums / Maya Questions / Programming / WIP: My Raytracer

Programming MEL Scripts, Expressions & Programming Related Topics

Join the conversation. Reply to post
Page 2 of 7 1 2 3 4 Last »
 
Thread Tools
12-02-2006, 09:25 PM   #16
gster123
Moderator
 
gster123's Avatar
 
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
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
  Reply with quote
12-02-2006, 11:35 PM   #17
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
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
  Reply with quote
13-02-2006, 02:05 AM   #18
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
Haha! Check dis out!:attn:
Attached Thumbnails
Click image for larger version

Name:	untitled-2.jpg
Views:	187
Size:	42.7 KB
ID:	26849  
__________________
Live the life you love, love the life you live
  Reply with quote
17-02-2006, 09:22 PM   #19
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
And now it does collisions with spheres too.
Attached Thumbnails
Click image for larger version

Name:	untitled-1.jpg
Views:	176
Size:	82.3 KB
ID:	26910  
__________________
Live the life you love, love the life you live
  Reply with quote
20-02-2006, 12:31 AM   #20
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
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
  Reply with quote
25-02-2006, 06:27 PM   #21
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
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:	153
Size:	19.7 KB
ID:	26997  
__________________
Live the life you love, love the life you live
  Reply with quote
25-02-2006, 08:25 PM   #22
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
And diffuse shading. Next up: reflections! :attn:
Attached Thumbnails
Click image for larger version

Name:	raytraceimg2.jpg
Views:	152
Size:	18.0 KB
ID:	26998  
__________________
Live the life you love, love the life you live
  Reply with quote
25-02-2006, 08:36 PM   #23
Tim_LIVID
Subscriber
 
Tim_LIVID's Avatar
 
Join Date: Sep 2003
Location: Harwich, UK
Posts: 1,195
Fast work there Matt
__________________
"You can live for yourself today -- or help build tomorrow for everyone" _LIVID

Optical Minefield
My Blog
  Reply with quote
25-02-2006, 08:44 PM   #24
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
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:	150
Size:	18.9 KB
ID:	26999  
__________________
Live the life you love, love the life you live
  Reply with quote
26-02-2006, 02:40 AM   #25
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
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:	142
Size:	59.6 KB
ID:	27002  
__________________
Live the life you love, love the life you live

Last edited by MattTheMan; 26-02-2006 at 01:41 PM.
  Reply with quote
26-02-2006, 03:26 PM   #26
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
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:	139
Size:	66.3 KB
ID:	27011  
__________________
Live the life you love, love the life you live
  Reply with quote
26-02-2006, 06:14 PM   #27
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
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:	137
Size:	21.9 KB
ID:	27015  
__________________
Live the life you love, love the life you live
  Reply with quote
26-02-2006, 06:54 PM   #28
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
and the second sphere is reflected too
Attached Thumbnails
Click image for larger version

Name:	2spheres.jpg
Views:	135
Size:	22.3 KB
ID:	27016  
__________________
Live the life you love, love the life you live
  Reply with quote
27-02-2006, 06:01 PM   #29
gster123
Moderator
 
gster123's Avatar
 
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
Cool work man, keep going!
  Reply with quote
27-02-2006, 07:13 PM   #30
Falott
Registered User
 
Falott's Avatar
 
Join Date: Jan 2005
Location: vienna
Posts: 1,095
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!
  Reply with quote
Reply
Page 2 of 7 1 2 3 4 Last »

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Thumbnails in WIP & Finished Work Nilla Site News & Announcements 11 09-12-2010 06:22 AM
Asia girl - WIP caligraphics Work In Progress 21 12-03-2004 11:30 AM
WIP critiques - a suggestion Alan Maya Basics & Newbie Lounge 2 14-01-2004 02:48 PM
Commando Rodent Gopher - Concepts + WIP orgeeizm Work In Progress 31 15-10-2003 09:17 PM
FN tactical shotgun WIP [icarus_uk] Work In Progress 7 15-08-2003 05:44 PM