3D Raytracing Version 2.0

Status
Not open for further replies.
M

Misty

Guest
Okay so my last topic got closed but I spoke with a mod and he said I can make a new one.

I am trying to make raytracing for axis aligned heightfield (aka ds grid terrain) but I dont want it to lag.
Here's what I tried, I tried Fred Frederickerson's FPS example which has terrain but he didn't bother to make the bullets collide with the terrain, so I can't use any code from that.
I also tried draw_getpixel multiple view+multiple projection color coded raytracing but it is too laggy (32 rays=6 fps). The other thing is mechanikos hieght checking + iterations but that is too laggy too.

I need a proper, speedy ray-tracing that utilizes the fact that everything is gridlocked and axis aligned.
This article gives the solution but it won't let me read it. I need to prove I am a student of some campus and I forgot my login details. Anyone who is a a student or has a professional sounding email can sign up for free. Can someone sign up and give me the pdf please?
https://www.researchgate.net/publication/242513195_Grid_tracing_Fast_ray_tracing_for_height_fields

I have a super secret solution to the raytracing, but I don't want to share it because I want to see everyone's original ideas, and see if they can make anything better. If I give my solution too early, it may cause someone to not think of the perfect solution and settle for my solution without thinking of creative solutions.
 

FredFredrickson

Artist, designer, & developer
GMC Elder
This is a ridiculous post. This forum is for asking for help with the work you're trying to do - not for withholding information and trying to coerce people into making stuff for you.

What have you tried yourself? And may we see some of it, so that we have something to work with here?
 
M

Misty

Guest
This is a ridiculous post. This forum is for asking for help with the work you're trying to do - not for withholding information and trying to coerce people into making stuff for you.

What have you tried yourself? And may we see some of it, so that we have something to work with here?
I am afraid if I share my solution, everyone will only focus on that and build on that.
But what if my solution is not the most optimized solution? Then we are just building and wasting our time making not the best code.

So I will wait until 5-10 experts come in and give me their basic ideas for optimum raytracing, rather than blabbering and revealing my idea and having people waste effort building on something I don't know is the best.
 

FredFredrickson

Artist, designer, & developer
GMC Elder
I am afraid if I share my solution, everyone will only focus on that and build on that.
But what if my solution is not the most optimized solution? Then we are just building and wasting our time making not the best code.
That is the whole point of this forum!

Programming a game is almost never about finding the best possible way to do something. It's about finding a solution that works and honing it, if possible. If you're way, way off track, someone will say so. But there's no way for us to help you here if you're not willing to show us what you've done so far.

Games aren't a cookie-cutter, one-size-fits-all thing. Nobody can make a good recommendation for what you need if we know literally nothing about your project.
 
M

Misty

Guest
Didn't say anything about making a "new" algorithm, they can make one that already exists. And how hard is it to give the basic gist of an algorithm? Im not even asking for the exact code details yet, just a basic summation of the gist of it.

Games aren't a cookie-cutter, one-size-fits-all thing. Nobody can make a good recommendation for what you need if we know literally nothing about your project.
Its a ds_grid based terrain, 9 grids of 32x32 amount. The terrain is the same as all other ds_grid axis aligned terrains compatible with Mechaniko's height checking.
 

BLang

Member
Dude, seriously, this is the second topic you've made like this in the span of ~24 hours. I get that the mods let you open it again, but I'm pretty sure that they wanted you to provide more information than this...

If you've been around a while, you should know that this forum is meant for steering people in the right direction and helping them solve their own problems, not giving out solutions. Most of the time, even when people just need help with basic movement, they won't get finished code. Instead, they'll get ideas and general help with the concept.

From what I can tell, you already have a pretty good idea of how to do raytracing, so if you don't really need finished code, and you don't wanna tell us what you're doing so we can improve upon it, what exactly is it that you want from us? To download a pdf for you? That's not what this forum is for...
 
A

Annoyed Grunt

Guest
I am afraid if I share my solution, everyone will only focus on that and build on that.
But what if my solution is not the most optimized solution? Then we are just building and wasting our time making not the best code.

So I will wait until 5-10 experts come in and give me their basic ideas for optimum raytracing, rather than blabbering and revealing my idea and having people waste effort building on something I don't know is the best.
Ok, let me get this straight: you trust the "experts" to be expert enough to write\find a good method, but you don't trust them to be expert enough to recognize if one execution is better than the other?

Returning to the problem, the ds_grid just holds a value that represents the height of the terrain in that point, right? Then you should be able to just extend 2D raytracing to a 3D grid and use a few mathematical expressions, I'm not quite sure why you're using draw_getpixel in this particular situation.
 
M

Matthew

Guest
Okay so my last topic got closed but I spoke with a mod and he said I can make a new one.

I am trying to make raytracing for axis aligned heightfield (aka ds grid terrain) but I dont want it to lag.
Here's what I tried, I tried Fred Frederickerson's FPS example which has terrain but he didn't bother to make the bullets collide with the terrain, so I can't use any code from that.
I also tried draw_getpixel multiple view+multiple projection color coded raytracing but it is too laggy (32 rays=6 fps). The other thing is mechanikos hieght checking + iterations but that is too laggy too.

I need a proper, speedy ray-tracing that utilizes the fact that everything is gridlocked and axis aligned.
This article gives the solution but it won't let me read it. I need to prove I am a student of some campus and I forgot my login details. Anyone who is a a student or has a professional sounding email can sign up for free. Can someone sign up and give me the pdf please?
https://www.researchgate.net/publication/242513195_Grid_tracing_Fast_ray_tracing_for_height_fields

I have a super secret solution to the raytracing, but I don't want to share it because I want to see everyone's original ideas, and see if they can make anything better. If I give my solution too early, it may cause someone to not think of the perfect solution and settle for my solution without thinking of creative solutions.
I wrote something like that in GM, once. In hindsight, using any other development tool would have made it much easier. Are you a psychologist, by any chance? You have an innate mastery of the subject.
 
M

Misty

Guest
If you've been around a while, you should know that this forum is meant for steering people in the right direction and helping them solve their own problems, not giving out solutions. Most of the time, even when people just need help with basic movement, they won't get finished code. Instead, they'll get ideas and general help with the concept.
Never asked for finished code, just asked for the basic gist, so you are defeating your own argument.

From what I can tell, you already have a pretty good idea of how to do raytracing, so if you don't really need finished code, and you don't wanna tell us what you're doing so we can improve upon it, what exactly is it that you want from us? To download a pdf for you? That's not what this forum is for...
Don't see any reason why you can't help me out with the PDF. No different than someone finding a Gm6 example that noone can open and then asking someone to open for them.

Returning to the problem, the ds_grid just holds a value that represents the height of the terrain in that point, right? Then you should be able to just extend 2D raytracing to a 3D grid and use a few mathematical expressions, I'm not quite sure why you're using draw_getpixel in this particular situation.
I quit using it but the draw_getpixel got the pixel color based on the fog thickness of the terrain in a second view. The fog color tells you the distance. Also, not using the 2d collision_line functions that just requires a lot of sprite_objects to be spawned.

I wrote something like that in GM, once. In hindsight, using any other development tool would have made it much easier. Are you a psychologist, by any chance? You have an innate mastery of the subject.
How much did it lag and can I see it in action? Never had any formal training on the subject, so I thankyou for that compliment.
 
A

Annoyed Grunt

Guest
I quit using it but the draw_getpixel got the pixel color based on the fog thickness of the terrain in a second view. The fog color tells you the distance. Also, not using the 2d collision_line functions that just requires a lot of sprite_objects to be spawned.
Now I'm just confused... what do you by mean "the fog color tells you the distance"?
 
R

Robert

Guest
Am I reading this thread right? This guy thinks he has created a new paradigm for ray tracing and is afraid to share his code because everyone might use it to much? Wha?
 
M

Misty

Guest
Am I reading this thread right? This guy thinks he has created a new paradigm for ray tracing and is afraid to share his code because everyone might use it to much? Wha?
An exaggeration and an over simplification


My fear is that if I release my idea, noone will put any effort to thinking of creative solutions of their own, and thus it would be killing the future potential of someone thinking and inventing a better, more optimized solution than mine.

the fog color tells you the distance"?
You create a 2nd view and camera, aim the camer where you want the ray to go, then set a fog, the color of the fog tells you the distance to collision of the ray.
Inherently laggy though because draw_getpixel is a system function that lags even in C++.

Won't help much, probably doesn't utilize the efficiency and optimization of grid locked axis -aligned ds_grid terrains.
 
R

Robert

Guest
An exaggeration and an over simplification


My fear is that if I release my idea, noone will put any effort to thinking of creative solutions of their own, and thus it would be killing the future potential of someone thinking and inventing a better, more optimized solution than mine.
Exaggeration? Over simplification? Do you know what those words mean? So it's exaggerated and over simplified, at the same time? That's interesting... Regardless my original post was right, you apparently believe you have created some grandiose algorithm that your afraid will hamper future development of raytracing because everyone, in the whole world mind you, will now just use your code and never ever again try and improve ray-tracing... Okay, sure...

And you can't figure out how to get that pdf? righttttttt
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Okay, this is going nowhere fast.. closed. Misty, I suggest you look at how other people pose their problems when posting around here, and check out the replies they get. You'll quickly see that there is a direct correlation between willingness to help and information given. ;)
 
Status
Not open for further replies.
Top