A community driven ray tracer

Everything else that doesn't fall into one of the other PB categories.
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

A community driven ray tracer

Post by Samuel »

Edit:
There doesn't seem to be much interest in this topic and I want to start diving further into the ray tracer.
So for the time being I'll work on the project solo, and then maybe down the line I'll share it on the forums.
If anyone does come along and is interested in helping then you'll probably have better luck reaching me by PM.


Original Post:
Hello everyone,

I have recently started to write a ray tracer. For those of you who don't know what a ray tracer is here's a wiki page that explains what one is and how it works. The reason I want to create a ray tracer is it will be a fun side project and a good learning experience. Who knows it may even come in handy down the line for someone or even myself for that matter.

What I'd like to find out is if anyone would be interested in helping to develop it. If people are interested in helping then I have no problem making the project open source and creating a topic for it here on the forums. Things like source code location and a name for it could be decided a little later on.

A little information on how I'm planning out the ray caster is in order.
I think it would be best to use PB's Ogre implementation as a base for cameras, objects, and so on.
I also think it would be a good idea to allow straight opengl and directx too, but I think the built in 3D commands might be better as the building block. I'm open to different opinions, though.

I also don't plan on adding any modeling to this software (example blender). In other words you could only render realistic images based on the objects imported into it.
I know this seems limited compared to software like blender, but this isn't meant to be a rival software.
If someone wanted to go that route they can, but I don't think I would have the stamina for that.

Currently, the ray tracer is still pretty simple. It has the basic ray triangle system already in place, but none of the fancy rays, yet (shadows, reflections, etc). It's not optimized either, but it's a base to work off of.

So, I'd like to hear what all of you have to say about it. Think it's a good or bad idea? Are you interested in helping?
Any advice on open source project handling? Anything that anyone wants to say and I'll be all ears.
Last edited by Samuel on Tue Feb 09, 2016 7:36 pm, edited 1 time in total.
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: A community driven ray tracer

Post by Kukulkan »

Hi Samuel,

try searching the forum for "raytracing" and you will find some PB coded raytracer and possibly also the users who are interested ;-)
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: A community driven ray tracer

Post by Samuel »

Thanks for the tip. The only topic (in the english forums) that I could find that covered true ray tracing was this one. http://www.purebasic.fr/english/viewtop ... =7&t=15568

It's cool to see that someone else has attempted to work with ray tracing and PB. Portions of their code may also come in handy. They wrote some geometry ray intersection routines that I haven't written, yet.
Unfortunately, that topic was over ten years old. I'm not sure if many of those people still hang around the forums, but if they do and are interested maybe they'll see my topic.

I'll just play the waiting game for a while and see what happens.
applePi
Addict
Addict
Posts: 1404
Joined: Sun Jun 25, 2006 7:28 pm

Re: A community driven ray tracer

Post by applePi »

Samuel, there is CodeArchiv_v4-Beta in http://www.purearea.net/pb/CodeArchiv/CodeArchiv.html
look in CodeArchiv\Graphics\Raytracing. there are two examples Raytracing_RenderMovingPlanets and Raytracing_RenderStatic , by the same author in your link Dreglor, but updated by Andre for PB v4.00. i have downloaded PB v4.00 from the museum in purebasic.com and the examples runs okay. you may find it useful especially the Raytracing_RenderMovingPlanets demo
EDIT: also look http://purebasic.fr/english/viewtopic.php?t=20244 look first example it looks interesting and runs okay in PB v4.00 just edit the first error msg to: If OpenWindow(1, 0, 0, Width, Height, "test")
it run in winxp but don't know if it will run in windows7++
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: A community driven ray tracer

Post by IdeasVacuum »

A very worthy project Samuel. I don't have enough spare time (or expertise) to help the code along, but I can provide sample CAD STL files.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: A community driven ray tracer

Post by Samuel »

@applePi
Thanks for pointing out those examples. I'm sure portions of their code will come in handy.

@IdeasVacuum
At the moment, I only have a Stanford PLY importer, but there are several others that need to be created to allow a wider variety of models.
Looking at the STL format it doesn't seem too complicated so it should be able to be added without that much of a hassle.

I'd also like to add importers for these formats.
Collada (.dae)
Wavefront (.obj)
Ogre3D (.mesh)
DirectX (.x)

At the moment though, my to do list is pretty full with more important features. So, it may be a while before I can add any of these importers.
User avatar
newtheogott
Enthusiast
Enthusiast
Posts: 120
Joined: Sat Apr 26, 2003 2:52 pm
Location: Germany, Karlsruhe
Contact:

Re: A community driven ray tracer

Post by newtheogott »

Instead of using your Power in a completely new project, the alternative would be to take a look into Freeware/Open Source Projects that are already on a good level and contribute your time there, for example:

Luxrender
ask "Dade" or "BYOB"
or
POV-Ray
Talk to "Clipka"

They will be happy to get new contributors that help with programming.

Take a look what you can do with it:
Note: This crystals were grown using POV-Ray.
Image
Image
--Theo Gottwald
-----------------------------------------
http://www.it-berater.org * http://www.fa2.de * http://www.smart-package.com
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: A community driven ray tracer

Post by Samuel »

Those are some nice renders, but I'm not really interested in contributing. Looking at the noise in the images I'm guessing their using path tracing and for now I'm only interested in ray tracing.
Also I usually prefer starting from the beginning instead of jumping into a project midway.

Anyway thanks for bringing those projects to my attention. I'm always interested in seeing how other peoples projects grow.
marc_256
Addict
Addict
Posts: 844
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: A community driven ray tracer

Post by marc_256 »

Hi Samuel,

I used POV-RAY for years now, and i still using it.

It is a very interesting idea,
but this is a huge work to make it work as perfection.

myself i'm a 3D designer, can give you some ideas and help you with some sources from some books I brought long time ago,
but i'm not the best 3D programmer.

what was missing in pov-ray, was a good working IDE user interface !!!
and the most important thing is speed, so maybe ASM is needed here ?

marc,
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: A community driven ray tracer

Post by Samuel »

Hello Marc,

Adding a decent user interface shouldn't be too much of a problem. If no one else wants to write one then I'll do it. I've had to write several from scratch before (non and hardware accelerated ones). Most important things are the workflow and look of it.

I agree with you on the speed being very important. In my opinion the one thing more important then that is the rendered image quality.
Idle was kind enough to give me some pointers on asm and help me with some of my math procedures in an unrelated project. I'll try to carry that knowledge over to this project.

If you have any ideas you want to talk about then I'm all ears. You can PM me or post them here.
Post Reply