Full Raytracer

Your browser needs java to view projects. Click here to install Java.

user_icon Canthiar shared it 2 years, 6 months ago
user_icon Based on Canthiar's project
1764 views, 2 taggers, 28 people love it, 1 remix by 1 person, 314 downloads, in 10 galleries
Add to my favorites?
Flag as inappropriate?

Comments

You need to be logged in to post comments

Add a Comment

 
bigreader bigreader 2 months, 3 weeks ago

I'm just wondering, would a raytracer like this be used anywhere other than as an incredibly cool Scratch project?

Canthiar Canthiar 2 months, 2 weeks ago

Some early movies like Tron used raytracing to render some of their scenes.

(view all replies)
shiny7890 shiny7890 3 months, 1 week ago

what do you do

shiny7890 shiny7890 3 months, 1 week ago

how do you do it

Mr_ABC Mr_ABC 4 months, 3 weeks ago

"Seite nicht gefunden Hoppla! Anscheinend sind Sie einem ungültigen Link gefolgt. "

Awsome-me Awsome-me 4 months, 3 weeks ago

Wait, this is cool but it isn't raytracing. Raytracing is seeing something on a map and making a picture of it, not coloring a picture. But, this is still the most awsome thing i've seen in a while. Except for someones real raycaster.

drhelmi drhelmi 1 month, 3 weeks ago

Guys, just look at hte scripts. He/She put the picture there somthing to look at while you wait. Its just a black and white image of what the raytracer can do.

nikonkid nikonkid 4 months ago

This is a real Raytracer as a program that calculates the "rays" that photons travel on. The Autodesk Maya 3D enviroment has two: Mental Ray and Maya software. Both of these renderers use raytracing (if you turn it on) to color a image. What you have said does have some relevance however, as a raytracer takes a 3D model (a map) and turns it into an image.

(view all replies)
golfer3 golfer3 4 months, 3 weeks ago

The only way to make this faster is download it and set it to turbo speed.

sparky101 sparky101 5 months, 3 weeks ago

Scratch is a pretty simple language, yet you do something in it thats almost impossible in c++? you win. you are an absolute ninja.

angelkid234 angelkid234 6 months, 2 weeks ago

im going to leave my computer on, go sleep and then see if its done yet

dumbnerd dumbnerd 8 months ago

amazing, I was trying to create a shading project when I came accross this... and it surpasses anything I think I could do =0

Coolyouth79 Coolyouth79 10 months, 3 weeks ago

w..................o.................w

axleman1011 axleman1011 1 year ago

i might be able to speed it up!

Sidharth Sidharth 1 year, 3 months ago

that is complicated!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

sparkygirl sparkygirl 1 year, 9 months ago

cool

Scratchie Scratchie 1 year, 9 months ago

They look like Easter eggs!

messd002 messd002 1 year, 9 months ago

*Faint* OMG. Just downloaded code and, well, I can't say no more. Outstandingly incredible.

beandude202 beandude202 1 year, 11 months ago

did you say several hours?

MrBananas MrBananas 2 years ago

this is amazing. i just dont have the patience to wait for it to finish, though.

LeBurt LeBurt 2 years ago

LeSam: I would appreciate you didn't leave comments when logged under my name. Use your own login! ;)

LeBurt LeBurt 2 years ago

kewl!ckool cool kool kcool

LeBurt LeBurt 2 years ago

boring but fun!weird but clever!

LeBurt LeBurt 2 years ago

how long does it take?

Canthiar Canthiar 2 years ago

This ray tracer makes no FOV calculations so without adding the proper calculations you can't change the FOV. If change the radius of the objects then they will change based on the size that you set them to. If the number is bigger then the objects will get bigger.

Canthiar Canthiar 2 years ago

I don't collaborate much online, but I know people will post to code http://www.codeproject.com/ and http://sourceforge.net/. If you use Windows you can download Visual Studio Express for C and C++ programming. I've posted a link somewhere in the comments.

Oldschooler2 Oldschooler2 2 years ago

One other question... if I edited the size of the "Rayobjects" (the soccer balls, that is) would it make the spheres drawn by the raytracer bigger or smaller, since it would change the field of view?

Oldschooler2 Oldschooler2 2 years ago

By the by, how long ago did you add the black and white picture of the final image to the screen? When I 1st saw this, it did not have it.

Oldschooler2 Oldschooler2 2 years ago

Uhh... the latter. The one you said that I could write my own. By the by, did you hear about "Scratch 1.2"? It has the square root thing in it, I hear. Then it would be a whole lot less cluttered, since you would not have so many "Set SquarerootNR to ...". The problem with that is it still finds the square root of negative numbers, which you and I both know, is impossible to calculate with real numbers.

Canthiar Canthiar 2 years ago

BTW, yes it is now much faster. If you notice a comment that I made below I hinted that it might be possible to speed it up.

Canthiar Canthiar 2 years ago

Your question was "Do you know a site where I can upload the C++ you use for Raytracers?" and I was looking for clarification since I wasn't sure if you wanted source code to an already written ray tracer or if you were looking to write your own and upload it somewhere.

Oldschooler2 Oldschooler2 2 years ago

And what do you mean by "Are you looking for the C++ compiler or the source code for a ray tracer"? Could you describe what you are questioning?

Oldschooler2 Oldschooler2 2 years ago

Say, this is a whole lot faster than last time. I downloaded it, and you seemed to have made it so all of the Rayobjects operate on "When I receive (distancetoobject1)".

Oldschooler2 Oldschooler2 2 years ago

Uhh... which one lets me get started with them and create them?

Canthiar Canthiar 2 years ago

Are you looking for the C++ compiler or the source code for a ray tracer?

Oldschooler2 Oldschooler2 2 years ago

Do you know a site where I can upload the C++ you use for Raytracers?

Canthiar Canthiar 2 years ago

I don't write ray tracers for my job, I just do it for fun in my spare time. The language that I use is C++.

Oldschooler2 Oldschooler2 2 years ago

Say Canthiar, what computer programs do you use with Ray tracers in your occupation? You do have a degree from the University of Arkansas, so you should know what I mean. To clarify, you use this kind of math in your job, no? And which programs do you use applying this knowledge? Sorry for repeating myself, I just want to be clear about what I am talking.

Oldschooler2 Oldschooler2 2 years ago

sorry, I meant to say they both wait until the signal "DistacetoObject5" is broadcasted from "RayObject4".

Oldschooler2 Oldschooler2 2 years ago

It does work correctly, it is just both the "RayObject5" and the "RayObject6" sprites both wait until the message "Distance to object5". Sorry, I don't know how do describe it in words exactly.

Canthiar Canthiar 2 years ago

Interesting catch. It may have just been something that I changed and forgot to put back. If it still works correctly that way then it might be possible to speed this program up a little bit.

Oldschooler2 Oldschooler2 2 years ago

Download it and check the list broadcast signals on it's pull down list to see what I mean.

Oldschooler2 Oldschooler2 2 years ago

One question now, why do both the Rayobject 5 and Rayobject6 operate on "When I recieve (Distance to object 5)." Originally, was the Rayobject6 sprite only supposed to operate on "when I recieve (distance to object 6).

Canthiar Canthiar 2 years ago

Yes, it is possible to draw things other than spheres.

Oldschooler2 Oldschooler2 2 years ago

Sorry for bothering you... ray tracers are rather interesting... both to do and to look at!

Oldschooler2 Oldschooler2 2 years ago

Hey, Canthiar, just curious: is it possible to create a ray tracer that draws something other than sphere (such as pyramids or other polyhedrons)? If not so, notify me.

Oldschooler2 Oldschooler2 2 years ago

(link to project) The link is another attempt at a Raytracer... if you can call it that... Download it and check the script.

Oldschooler2 Oldschooler2 2 years ago

I just did not understand that.

Oldschooler2 Oldschooler2 2 years ago

Sorry to disturb you again, but what did you mean by "mathematical model to intersect that ray with an object.", the comment you left on my "raytracer"?

Oldschooler2 Oldschooler2 2 years ago

Canthiar, what exactly about my "raytracer" does not make it a raytacer? What thing am I seemingly missing to make it a true raytracer?

Oldschooler2 Oldschooler2 2 years ago

Sorry I meant to say "see" not se.

Oldschooler2 Oldschooler2 2 years ago

(link to project) You will need to downoad it. Se it in presentation mode for the best image. Mine is faster than this but is a lot less complicated.

Canthiar Canthiar 2 years, 1 month ago

The slow down is a little bit more complicated than that. Yes, calculations can slow things down, but doing "Broadcast and Wait" and loops also slow scratch programs down. The main thing is that Scratch was meant to teach people how to write computer software, not do intensive programs.

JoelP JoelP 2 years, 1 month ago

things seem to run faster if you are giving a lot of different commands at a time instead of one big, complicated script. Your thing is amazing to see how complicated it is, but they could be faster.

Canthiar Canthiar 2 years, 1 month ago

I would love to make it run a lot faster so people don't spend so much time waiting on it, but everything I do to speed it up makes the scratch code harder to follow.

JoelP JoelP 2 years, 1 month ago

(for me)

JoelP JoelP 2 years, 1 month ago

sad

JoelP JoelP 2 years, 1 month ago

BTW, I watched the whole thing complete!

JoelP JoelP 2 years, 1 month ago

ok, sorry about over-reacting, its kinda complicated and skilled, i was actually in a bad mood at the time I was interested to find out about the thingy.

Canthiar Canthiar 2 years, 1 month ago

The background is just a preview of what it is about to draw. The picture is actually drawn using a set of mathematical formulas.

JoelP JoelP 2 years, 1 month ago

THIS IS A RAY TRACER?! I edited the background and it did the exact same thing as the normal one did! Am I saying you just put all the codes in there!? Tell me!

JoelP JoelP 2 years, 1 month ago

this is taking so long, I think I will just continue scratching and see what it is once it is done

Canthiar Canthiar 2 years, 1 month ago

How many are you talking about? If it's just one then it isn't that bad, but it would be fairly slow. I think it would take a lot of work to do more since Scratch doesn't have arrays.

Please Wait...