Ray-Tracing Renderer+Modeller Project
LjSpike
Pileated woodpecker
Joined: 23 Dec 2016
Age: 26
Gender: Male
Posts: 188
Location: About 55° N, 3° W
So, in about a month and a half my AS exams will be over and I'll have some more free time, and I'm thinking of trying a bit more coding again. My chosen project this time is going to be to create a 3D Modeller and accompanying Ray-Tracing Renderer. It is a bit ambitious, but I've loved POV-Ray dearly, and It'd be nice to see if I can come up with something similar. I've begun some initial plans, I suspect I'm going to use C# or C++ because I have Visual Studio installed already, although I'll have to dedicate some time to actually properly learning C# or C++. I could also use one of the other languages supported inside Visual Studio, I potentially could try and get Java on Visual Studio (I know it's possible) and try to learn that - I'll have to make a decision on that at some point soon.
Anyway, now that I've blabbered on for a bit, I just felt like posting here in case someone has some nuggets of knowledge to share, or happens to be good with one or more of those languages (or visual studio in general) as I might end up messaging you then at some point in my development of it with the odd query on how to do a few things.
I'm feeling more and more like I'm going to settle down with C++ after doing some reading as efficiency of the program is notable (Ray-Tracers are usually quite resource intensive).
I do however need to determine which of the numerous templates from Visual Studio I should begin with. I'm wondering if a DX11 App is the way to go (as DX11 is graphics-related, potentially I should be using that template) or perhaps "An Ordinary Desktop Program" or if I should just settle for an empty project?
leejosepho
Veteran
Joined: 14 Sep 2009
Gender: Male
Posts: 9,011
Location: 200 miles south of Little Rock
I know nothing at all about any of this, but I think Minecraft must be doing some kind of ray-tracing and I know it runs in JAVA. If that is true and this might be of any help to you, I have some Minecraft servers where you could take a look and do whatever.
_________________
I began looking for someone like me when I was five ...
My search ended at 59 ... right here on WrongPlanet.
==================================
LjSpike
Pileated woodpecker
Joined: 23 Dec 2016
Age: 26
Gender: Male
Posts: 188
Location: About 55° N, 3° W
Minecraft won't use raytracing for rendering. I wouldn't expect many people to know what raytracing is, but it's a way of getting really high quality (photorealistic) renders, at the cost of being too slow for realtime rendering (making it only suitable for still images, or perhaps on a powerful PC a video which you can have the renderer running for a day to render). The Wikipedia page on my favourite raytracer is here and you can see a scene with multiple glass objects. That scene truly shows the power of the renderer.
Minecraft will use scanline rendering of a form I expect.
I wouldn't worry too much at the starting project type, a console or desktop app would probably do. The main driver behind your starting project is probably what kind of interface you want. A forms app will let you build an interface where you can set various parameters or settings you might need, but the vast majority of work is going to be unrelated to the interface, you'll be creating a lot of classes etc with algorithms, maths and so on to generate the final image which will end up in a certain file of a certain format. However you may also want to show the image as it is being made so a form will give you a canvas to do that also.
Anyway, what I'm getting at is that as the majority of work is going to be pure code\classes etc you can always take that code and what you've learned and import it to a new project type later on. So if you start with a console app that just does the raw maths etc and you later on want an interface to show the image\have menus and sliders and checkboxes etc you just create a project of that type and add your classes to it.
Ichinin
Veteran
Joined: 3 Apr 2009
Gender: Male
Posts: 3,653
Location: A cold place with lots of blondes.
This is done in javascript:
http://alteredqualia.com/xg/examples/eyes_gaze2.html
Anyone who professes to you that C++ is the best there is as a performance panacea should go back to the 1990s and kill themselves. Compilers and performance have taken giant steps since then.
_________________
"It is far better to grasp the Universe as it really is than to persist in delusion, however satisfying and reassuring" (Carl Sagan)
http://alteredqualia.com/xg/examples/eyes_gaze2.html
Anyone who professes to you that C++ is the best there is as a performance panacea should go back to the 1990s and kill themselves. Compilers and performance have taken giant steps since then.
javascript is interpreted, not compiled, and that example uses WebGL which is actually provided by your browser (likely written in C++) via a javascript API. So while you are accessing WebGL via js the actual hard work of the rendering is not done via js itself, that is just the interface . Whilst modern computers have made higher-level languages much faster than they used to be, lower-level languages like C++ are still always going to be faster.
Ichinin
Veteran
Joined: 3 Apr 2009
Gender: Male
Posts: 3,653
Location: A cold place with lots of blondes.
http://alteredqualia.com/xg/examples/eyes_gaze2.html
Anyone who professes to you that C++ is the best there is as a performance panacea should go back to the 1990s and kill themselves. Compilers and performance have taken giant steps since then.
javascript is interpreted, not compiled, and that example uses WebGL which is actually provided by your browser (likely written in C++) via a javascript API. So while you are accessing WebGL via js the actual hard work of the rendering is not done via js itself, that is just the interface . Whilst modern computers have made higher-level languages much faster than they used to be, lower-level languages like C++ are still always going to be faster.
Thanks - anything else you want to tell me that i already know while you're at it?
C++ is not NECESSARY today, its performance advantage is obsolete because of new compilers. I co do the same in C# and VB.NET, hell even Java can deliver. C++ does not come with any graphics features as well, so the same argument there.
_________________
"It is far better to grasp the Universe as it really is than to persist in delusion, however satisfying and reassuring" (Carl Sagan)
http://alteredqualia.com/xg/examples/eyes_gaze2.html
Anyone who professes to you that C++ is the best there is as a performance panacea should go back to the 1990s and kill themselves. Compilers and performance have taken giant steps since then.
javascript is interpreted, not compiled, and that example uses WebGL which is actually provided by your browser (likely written in C++) via a javascript API. So while you are accessing WebGL via js the actual hard work of the rendering is not done via js itself, that is just the interface . Whilst modern computers have made higher-level languages much faster than they used to be, lower-level languages like C++ are still always going to be faster.
Thanks - anything else you want to tell me that i already know while you're at it?
C++ is not NECESSARY today, its performance advantage is obsolete because of new compilers. I co do the same in C# and VB.NET, hell even Java can deliver. C++ does not come with any graphics features as well, so the same argument there.
There's not much to say other than everything you've just said is wrong. It's not just about compilation, you have to think about the under-the-covers memory management, bounds checking and so on that high level languages do that lower-level languages don't, and in terms of c#\vb.net you have the abstraction from the underlying OS the .net framework has. There are plenty of comparisons on the net if you care to look for them.
As for graphics support there isn't good native graphics support in any language, they all use some form of library. If you're on Windows you'd use OpenGL, DirectX etc to do all the maths but I'm guessing the OP wants to do all this stuff using his own code so in that regard the exact language chosen is less relevant.
For some tasks C++ probably isn't "necessary" to get good performance, but for tasks like the OP is suggesting I dare say C++ would be significantly faster.
leejosepho
Veteran
Joined: 14 Sep 2009
Gender: Male
Posts: 9,011
Location: 200 miles south of Little Rock
Minecraft will use scanline rendering of a form I expect.
Possibly so, and I enjoyed leaning from your link that POV-Ray began on an Amiga!
_________________
I began looking for someone like me when I was five ...
My search ended at 59 ... right here on WrongPlanet.
==================================
LjSpike
Pileated woodpecker
Joined: 23 Dec 2016
Age: 26
Gender: Male
Posts: 188
Location: About 55° N, 3° W
Please Chichikov & Ichinin don't hijack my thread for arguments over programming languages. They are both equally good languages with their own unique benefits. C++ is quite powerful and efficient (hence why many more intensive stand-alone programs use it, or Java) and Javascript is suited more to programs nested inside HTML webpages.
I won't be using Javascript as it's suited to web-based applications, the main contenders being C++ & Java.
LjSpike
Pileated woodpecker
Joined: 23 Dec 2016
Age: 26
Gender: Male
Posts: 188
Location: About 55° N, 3° W
