Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • SOUPSOUP: just get a vpn
      August 13, 2018, 06:44:28 PM
    • jme: _^_ will answer all of your javascript questions
      August 12, 2018, 07:11:00 PM
    • doomsale: and where is boxman?
      August 10, 2018, 03:16:59 AM
    • doomsale: Where can i play the Moparscape MMORPG with the Metallica instrumentals?
      August 10, 2018, 03:16:47 AM
    • doomsale: no longer clicking on doors and dummies at east bank
      August 10, 2018, 03:16:07 AM
    • doomsale: were all grown up now huh?
      August 10, 2018, 03:15:58 AM
    • _^_: hey everyone look at my graphs [link]
      August 06, 2018, 01:52:16 PM
    • braedyn: Someone pl0x help me out with PI Lottery!!
      August 03, 2018, 02:12:25 AM
    • Travas: p3n1s
      July 26, 2018, 09:46:33 PM
    • Krackkid: You up :eggplant:
      July 23, 2018, 06:18:17 PM
    • DeathsChaos9: no
      July 23, 2018, 03:53:31 PM
    • Emulous: Come check out Emulous: [link]
      July 22, 2018, 03:37:19 PM
    • Emulous:[link]
      July 22, 2018, 03:37:00 PM
    • Travas: ur mom
      July 21, 2018, 06:04:50 PM
    • YNRDAB: Watcha big ballers up too?
      July 20, 2018, 11:01:06 AM
    • dark250: i need help for coding client
      July 19, 2018, 08:27:37 AM
    • Travas: yes
      July 14, 2018, 02:19:44 PM
    • drubrkletern: lmao racist and sexist much?
      July 14, 2018, 01:11:52 PM
    • Cole1497: yeah i got you lil boat give me a second
      July 13, 2018, 03:19:35 AM
    • B0ATY.: yo can anyone unban my ip, i got banned for saying i hope someone gets aids :p
      July 12, 2018, 09:16:00 PM

    Author Topic: Path Tracing  (Read 4076 times)

    0 Members and 1 Guest are viewing this topic.

    Offlineobject

    • Member
    • ****
    • *
    • Posts: 440
    • Thanks: +0/-0
      • View Profile
    Path Tracing
    « on: January 30, 2015, 12:38:20 PM »
    I have been writing a Java-based Path Tracer recently.

    Here is my current result:



    Edit: I forgot, it maybe should have been posted in the Java section instead.
    « Last Edit: January 30, 2015, 12:39:55 PM by object »
    Runescape Gambling

    Offlineimthenull

    • Member
    • ****
    • Posts: 2,511
    • Thanks: +1/-0
      • View Profile
    Re: Path Tracing
    « Reply #1 on: January 30, 2015, 04:17:30 PM »
    ..... just because there's a java icon in the image means this should be in the java programming section? I disagree. The java programming section should be questions/topics relating to the java programming language itself. Not a project that just so happens to be written in java (he didn't even explicitly sate anything that has to do with java).
    Runescape Gambling

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #2 on: January 30, 2015, 04:33:53 PM »
    ..... just because there's a java icon in the image means this should be in the java programming section? I disagree. The java programming section should be questions/topics relating to the java programming language itself. Not a project that just so happens to be written in java (he didn't even explicitly sate anything that has to do with java).
    I mean, he did kinda edit his post before it was moved saying it should be in the java section.
    Runescape Gambling

    Offlineimthenull

    • Member
    • ****
    • Posts: 2,511
    • Thanks: +1/-0
      • View Profile
    Re: Path Tracing
    « Reply #3 on: January 30, 2015, 05:40:44 PM »
    fair enough.

    Offlineobject

    • Member
    • ****
    • *
    • Posts: 440
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #4 on: June 23, 2015, 02:19:48 PM »
    Now I have uploaded a beta version of this project to GitHub. It can be seen at: https://github.com/macroing/Dayflower

    OfflineEcoPS GM

    • Member
    • ***
    • Posts: 110
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #5 on: June 24, 2015, 06:01:25 PM »
    ..... just because there's a java icon in the image means this should be in the java programming section? I disagree. The java programming section should be questions/topics relating to the java programming language itself. Not a project that just so happens to be written in java (he didn't even explicitly sate anything that has to do with java).
    I mean, he did kinda edit his post before it was moved saying it should be in the java section.
    Why is there even a section solely for Java programming? I don't understand the logic behind it.

    @object: This is actually very impressive. Do you plan on making the ray tracer interactive? That would be neat. Is this project for learning purposes, or for something specific?

    OfflineEyeownyew

    • Member
    • ****
    • Posts: 3,431
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #6 on: June 24, 2015, 10:39:24 PM »
    This is fascinating, and I'm really impressed that it was written without using any libraries. Was going to check it out to see how you accomplished something like this with openGL/lwjgl but you didn't use either

    Offlineobject

    • Member
    • ****
    • *
    • Posts: 440
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #7 on: June 25, 2015, 02:48:19 AM »
    EcoPS GM: Thanks! My plans are to support interaction using a movable camera. But for this to work practically, the quality of the graphics most certainly has to be lowered. At least for the time being. The images shown took around 10 hours to render on my fast laptop.

    Eyeownyew: Thanks! I have plans to port the Path Tracer to OpenCL. A few months ago I even tested using a library or framework called Aparapi, which transforms Java bytecode to OpenCL code on-the-fly. It turned out to be pretty hard to get the algorithm to work, as there are many limitations in both Aparapi and what can be done in OpenCL. You can't, for instance, use recursion in OpenCL (or on the GPU for that matter).

    OfflineLin

    • Member
    • ****
    • *
    • Posts: 4,368
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #8 on: June 25, 2015, 07:06:47 AM »
    This looks very neat! Though, I'm curious - how come there isn't any anti-aliasing? I'm not too familiar with how this works, other than this style of rendering is known as "baking" and the longer it's baked, the better the scene looks. But since the rays surely work on a geometry-based/sub-sampling basis, shouldn't the edges of lights and such be smooth? Also how did you test this if a scene took 10 hours :P

    Also, while this is HLSL and not GLSL, there are ways of cheating recursion on the GPU. Not sure how applicable that'd be though.
    Quote
    <ry60003333> i was too busy waiting for this dollar i found on the floor to respawn
    Quote
    <Avail> so it's pretty cool to throw my penis around
    A tree falls out of the bird's nest.

    :palm:

    Offlineobject

    • Member
    • ****
    • *
    • Posts: 440
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #9 on: June 25, 2015, 07:55:51 AM »
    Lin:

    Thanks!

    About anti-aliasing; it has anti-aliasing, but I don't really know why the light is not anti-aliased as you could expect. I must have done something wrong there. But I have plans to fix it at some point.

    Path Tracing is a form of Ray Tracing, in that it casts rays from each pixel into the scene. The primary rays are what constitutes Ray Casting (another more simple algorithm). Ray Tracing and Path Tracing both cast more rays, so called secondary rays, from each surface intersection point. In contrast to Path Tracing, Ray Tracing has to cast so called shadow rays, in order to determine whether the intersection point is visible. Path Tracing treats each and every shape in the scene as a light source (or emitter). But one inherent difference between the two, is that Path Tracing casts rays in a random direction in the hemisphere of the surface normal of the surface intersection point (and from the pixel itself). So it's a Global Illumination (GI) solution to the rendering equation.

    The anti-aliasing is done by 2x2 pixel sub-sampling.

    You're right in that Path Tracing gradually makes the image look better. It converges to the correct solution.

    I test it by simply starting the program. It updates all the time. So I can see the image pretty much immediately. Although it will have a lot of noise in the beginning. The longer it runs, the less noise will be reduced, as there are less noise to reduce.

    Edit: I actually found a fix for the anti-aliasing issue with the lights. If I render to a larger image and then down-sample it to the expected resolution, it works. It's a form of Supersampling.
    « Last Edit: June 25, 2015, 12:39:57 PM by object »

    OfflineEcoPS GM

    • Member
    • ***
    • Posts: 110
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #10 on: June 25, 2015, 01:15:05 PM »
    EcoPS GM: Thanks! My plans are to support interaction using a movable camera. But for this to work practically, the quality of the graphics most certainly has to be lowered. At least for the time being. The images shown took around 10 hours to render on my fast laptop.
    Holy moly! 10 hours haha, I would have never waited that long for a scene to render. Why didn't you use libraries to make the loading process faster? I mean, it's more impressive to do it without libraries, but still. That's dedication! I cannot wait to see upcoming additions to this.

    Offlineobject

    • Member
    • ****
    • *
    • Posts: 440
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #11 on: June 25, 2015, 01:30:58 PM »
    EcoPS GM: I did the rendering over night. So I didn't sit and wait for it. ;) As for additions, I'm not giving up on this project. So I may very well add new stuff in the near future. Like new shapes. Then I'm also looking at getting that SimpleCamera class replaced by my other Camera classes, that I used in an earlier version of Dayflower (the name of the engine). But I havn't been able to get it to work just yet.

    OfflineEcoPS GM

    • Member
    • ***
    • Posts: 110
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #12 on: June 25, 2015, 01:58:02 PM »
    Oh I most certainly hope you didn't wait for it! I'm not judgmental, however that would be a case I'd feel obligated to judge you on, hah. Nonetheless, I'm sure you'll get the Camera working in the near future. With hard work and dedication - workload will pay off! Honestly, I'm not active in Mopar at all, however this project is virtually the sole reason that sparks my activity here. I'm actually very interested in this.

    Offlineobject

    • Member
    • ****
    • *
    • Posts: 440
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #13 on: June 25, 2015, 04:00:16 PM »
    Now I have added support for super-sampling with down-scaling and some other minor things.

    OfflineEcoPS GM

    • Member
    • ***
    • Posts: 110
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #14 on: June 29, 2015, 02:34:10 PM »
    Bump. I hope new updates are arriving.

    Offlineobject

    • Member
    • ****
    • *
    • Posts: 440
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #15 on: June 29, 2015, 04:06:55 PM »
    EcoPS GM: Yes, new updates will arrive at some point.

    Edit: Actually, new updates were added yesterday. It's now possible to switch between "realtime"- and normal-rendering. The realtime rendering is currently not that fast, hence the quotation marks. But there are many configuration-options in the code that can make it faster. They are not exposed in the UI at this time. And, you can't move the camera yet either.

    Edit: More has been comitted to GitHub. Now it's possible to walk around using your WASD-keys. Realtime rendering is now done without actual Path Tracing. It just returns the "albedo" color of the surfaces themselves, so it's faster.
    « Last Edit: July 01, 2015, 01:00:58 PM by object »

    OfflineEcoPS GM

    • Member
    • ***
    • Posts: 110
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #16 on: July 02, 2015, 12:34:58 PM »
    Just checked up on this - very nice progress, object! Any particular reason you're making this, or just decided so on a whim?

    Offlineobject

    • Member
    • ****
    • *
    • Posts: 440
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #17 on: July 02, 2015, 02:47:42 PM »
    EcoPS GM: Thank you! :) I've been interested in 3D graphics for a long time. Both realtime- and photorealistic rendering. But I do it as a hobby project. At least for now. Although that GitHub account was created recently, the engine wasn't started on "yesterday". It has taken quite a while to get it to this state. Many such projects have been created and abandoned in the past. :P Rasterizers (Scanline Rasterizers) and Ray Tracers (Whitted Ray Tracers and Path Tracers).

    Edit: My ambision is to combine both realtime- and photorealistic rendering in one renderer. With options to favor one over the other, such as lower quality graphics and faster rendering vs. higher quality graphics and slower rendering.
    « Last Edit: July 02, 2015, 02:52:49 PM by object »

    OfflineLimits

    • Member
    • ****
    • Posts: 2,190
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #18 on: July 02, 2015, 04:17:18 PM »
    EcoPS GM: Thank you! :) I've been interested in 3D graphics for a long time. Both realtime- and photorealistic rendering. But I do it as a hobby project. At least for now. Although that GitHub account was created recently, the engine wasn't started on "yesterday". It has taken quite a while to get it to this state. Many such projects have been created and abandoned in the past. :P Rasterizers (Scanline Rasterizers) and Ray Tracers (Whitted Ray Tracers and Path Tracers).

    Edit: My ambision is to combine both realtime- and photorealistic rendering in one renderer. With options to favor one over the other, such as lower quality graphics and faster rendering vs. higher quality graphics and slower rendering.
    Don't Forza and other racing games do that? I'm pretty sure the car body and windows, etc... are ray traced and the rest of the scene is polygon modeled.

    Offlineobject

    • Member
    • ****
    • *
    • Posts: 440
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #19 on: July 03, 2015, 02:24:49 AM »
    Limits: Yes, that may very well be the case. Although, polygons can themselves be ray traced. But I'm sure you mean rasterized?

    OfflineLimits

    • Member
    • ****
    • Posts: 2,190
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #20 on: July 03, 2015, 02:25:46 AM »
    Limits: Yes, that may very well be the case. Although, polygons can themselves be ray traced. But I'm sure you mean rasterized?
    Yeah polygon modeled as in rasterized.

    Offlineobject

    • Member
    • ****
    • *
    • Posts: 440
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #21 on: May 02, 2016, 01:05:13 PM »
    In contrast to popular believes, I actually have continued to develop on this project.

    The website for it can be found at: http://www.dayflower.org.

    A picture of my new Java-based realtime renderer that is automatically compiled to OpenCL can be seen here:

    Offline_nova

    • Member
    • **
    • Posts: 31
    • Thanks: +10/-10
      • View Profile
    Re: Path Tracing
    « Reply #22 on: May 02, 2016, 08:46:18 PM »
    Wow! This looks awesome. I love the ambient reflections on some of the materials you did. Very cool. I'll have to check it out.

    Offlineobject

    • Member
    • ****
    • *
    • Posts: 440
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #23 on: May 07, 2016, 02:14:20 PM »
    _nova: Thank you! :)

    I just added Gouraud shading rather than just Flat shading to triangle meshes, as well as the ability to use multiple materials and textures on one triangle mesh. Some new screenshots have been uploaded to the website presented above.

    OfflineRodgerwilco

    • Member
    • ****
    • Posts: 3,743
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #24 on: August 05, 2016, 12:14:52 AM »
    Moar water pictures please
    RSC Update: JMods still lack interest. Lots and lots of debating.
    Another Update: Jagex still doesn't a fk. GG Community

    Offlineobject

    • Member
    • ****
    • *
    • Posts: 440
    • Thanks: +0/-0
      • View Profile
    Re: Path Tracing
    « Reply #25 on: August 06, 2016, 06:25:32 AM »
    Water does not exist in that universe.

    Edit: You can now watch a video of this 3D-renderer in action.
    « Last Edit: August 27, 2016, 06:17:43 PM by object »

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal