Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jun 2018
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Ray Casting - Skybox

    Hi there,

    I just wonder how to set up the Skybox while making a Ray Caster?

    I understand that you apply a texture for the wall (png), how does it work for the skybox? Same process?

    Cheers

  2. #2
    Senior Coder deathshadow's Avatar
    Join Date
    Feb 2016
    Location
    Keene, NH
    Posts
    3,331
    Thanks
    4
    Thanked 480 Times in 468 Posts
    What engine? Which ray caster? Are we talking full ray tracing like POVRay? Faux-casting in something like UDK? Using the new RTX libraries in DirectX?

    Is this even a JavaScript question? (not aware of any ray tracers in JS)
    “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.” – C.A.R. Hoare, The 1980 ACM Turing Award Lecture
    http://www.cutcodedown.com

  3. #3
    Senior Coder deathshadow's Avatar
    Join Date
    Feb 2016
    Location
    Keene, NH
    Posts
    3,331
    Thanks
    4
    Thanked 480 Times in 468 Posts
    Oh wait, are you BUILDING a ray-casting engine? IF so the approach I suggest for a skybox is to simply map it directly to heading. For example if you have a 16:9 view of 90 degrees FOV at 1920px wide, your skybox image ideally would be four times that wide. Treat the height of the image as a direct map to 0..90 degrees on yaw, and the width of the image as a 1:1 to heading. It's the simplest and fastest approach though not 100% real world accurate, it's "good enough" for most games and even simple animations.
    “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.” – C.A.R. Hoare, The 1980 ACM Turing Award Lecture
    http://www.cutcodedown.com

  4. #4
    New Coder
    Join Date
    Jun 2018
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Well, my project is not very clear yet however it will be made with HTML + JS.


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •