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.
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.
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.
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.
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.
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?
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.
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.
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)".
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.
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.
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.
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).
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.
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"?
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.
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.
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.
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.
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!
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.
Comments
You need to be logged in to post comments
Add a Comment
I'm just wondering, would a raytracer like this be used anywhere other than as an incredibly cool Scratch project?
Some early movies like Tron used raytracing to render some of their scenes.
(view all replies)what do you do
how do you do it
"Seite nicht gefunden Hoppla! Anscheinend sind Sie einem ungültigen Link gefolgt. "
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.
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.
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)The only way to make this faster is download it and set it to turbo speed.
Scratch is a pretty simple language, yet you do something in it thats almost impossible in c++? you win. you are an absolute ninja.
im going to leave my computer on, go sleep and then see if its done yet
amazing, I was trying to create a shading project when I came accross this... and it surpasses anything I think I could do =0
w..................o.................w
i might be able to speed it up!
that is complicated!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
cool
They look like Easter eggs!
*Faint* OMG. Just downloaded code and, well, I can't say no more. Outstandingly incredible.
did you say several hours?
this is amazing. i just dont have the patience to wait for it to finish, though.
LeSam: I would appreciate you didn't leave comments when logged under my name. Use your own login! ;)
kewl!ckool cool kool kcool
boring but fun!weird but clever!
how long does it take?
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.
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.
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?
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.
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.
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.
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.
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?
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)".
Uhh... which one lets me get started with them and create them?
Are you looking for the C++ compiler or the source code for a ray tracer?
Do you know a site where I can upload the C++ you use for Raytracers?
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++.
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.
sorry, I meant to say they both wait until the signal "DistacetoObject5" is broadcasted from "RayObject4".
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.
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.
Download it and check the list broadcast signals on it's pull down list to see what I mean.
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).
Yes, it is possible to draw things other than spheres.
Sorry for bothering you... ray tracers are rather interesting... both to do and to look at!
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.
(link to project) The link is another attempt at a Raytracer... if you can call it that... Download it and check the script.
I just did not understand that.
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"?
Canthiar, what exactly about my "raytracer" does not make it a raytacer? What thing am I seemingly missing to make it a true raytracer?
Sorry I meant to say "see" not se.
(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.
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.
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.
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.
(for me)
sad
BTW, I watched the whole thing complete!
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.
The background is just a preview of what it is about to draw. The picture is actually drawn using a set of mathematical formulas.
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!
this is taking so long, I think I will just continue scratching and see what it is once it is done
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.