Recent

Author Topic: Raycasting with Lazarus  (Read 16869 times)

laztest

  • New Member
  • *
  • Posts: 10
Raycasting with Lazarus
« on: May 06, 2011, 07:07:25 pm »
I have created a volume ray caster for Lazarus that uses the dglopengl library. This runs on Windows and Linux computers that have GPUs which support large 3D textures:
 http://www.cabiatl.com/mricro/raycast/
The page also describes three bounties I am posting with a reward of $200 for the first solution to each of these remaining issues.

Laksen

  • Hero Member
  • *****
  • Posts: 658
    • J-Software
Re: Raycasting with Lazarus
« Reply #1 on: May 06, 2011, 11:03:41 pm »
Regarding the second problem, then shouldn't it be reciprocal? And are you doing the call to glScalef in modelview matrix mode?

Andru

  • Full Member
  • ***
  • Posts: 112
    • Homepage
Re: Raycasting with Lazarus
« Reply #2 on: May 08, 2011, 12:55:06 am »
try this demo(21Mb) for MacOS X. Unfortunately I can't see result in VirtualBox, because fragment shader doesn't compile with Apple software rendering, but I think it should works on Macs and it definitely initializes OpenGL now :)

laztest

  • New Member
  • *
  • Posts: 10
Re: Raycasting with Lazarus
« Reply #3 on: May 09, 2011, 02:08:39 pm »
Laksen-
  I did solve this, and put the updated code on my website. The solution required three new parts of code:
 1.) modelview glScalef with proportions prior to drawQuads in renderbackface
 2.) modelview glScalef(1,1,1) prior to drawQuads in raycast
 3.) glTranslatef adjustment for proportions in DisplayGL (so that the center of the rotation axis is the center of the volume).
Regarding the second problem, then shouldn't it be reciprocal? And are you doing the call to glScalef in modelview matrix mode?

laztest

  • New Member
  • *
  • Posts: 10
Re: Raycasting with Lazarus
« Reply #4 on: May 09, 2011, 02:54:56 pm »
Andru-
 Yes, the code now runs without crashing, but on my OSX 10.6 MacBook (with 9400GT GPU) I now get the error "GLSL shader error ERROR: One or more attached shaders not successfully compiled". I was unable to test on my OSX 10.5 MacPro because the compiled project requires 10.6 (you can change this by setting Project/CompilerOptions/Linking and selecting the "pass options to the linker" with the option "-macosx_version_min 10.4". In any case, I do consider this half of the solution. Would you mind sending me the changes in code so I can see if there is any way to get the shaders to compile? I am happy to pay half of the bounty to you now, my email is below my picture on this web page
  http://www.cabiatl.com/CABI/People/director/

try this demo(21Mb) for MacOS X. Unfortunately I can't see result in VirtualBox, because fragment shader doesn't compile with Apple software rendering, but I think it should works on Macs and it definitely initializes OpenGL now :)

laztest

  • New Member
  • *
  • Posts: 10
Re: Raycasting with Lazarus
« Reply #5 on: May 09, 2011, 06:11:36 pm »
Andru-

  Thanks for helping getting dglopengl to run on OSX. This allowed me to get my software to run on OSX. For reference, on Apple computers the GLSL compiler tends to be much more finicky than on Linux and Windows. There appear to be many examples (supports mix but not LERP, etc), but in my case it is that each float needs to be initialized with a dot decimal. So my code would not run on OSX with
 if (isRGBA > 0)
but would run on all platforms like this
 if (isRGBA > 0.0)
Google found this solution
  http://www.mail-archive.com/pd-list@iem.at/msg28709.html

Thanks again, I will contact you via email about the bounty.

-c

try this demo(21Mb) for MacOS X. Unfortunately I can't see result in VirtualBox, because fragment shader doesn't compile with Apple software rendering, but I think it should works on Macs and it definitely initializes OpenGL now :)

georgebou

  • New Member
  • *
  • Posts: 45
Re: Raycasting with Lazarus
« Reply #6 on: May 14, 2011, 12:58:29 pm »
Hi man.

I have converted your code to work with Delphi XE.

Email me when you have time to get the code.
« Last Edit: May 16, 2011, 06:10:48 pm by georgebou »

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1072
    • Burdjia
Re: Raycasting with Lazarus
« Reply #7 on: May 16, 2011, 10:36:28 am »
Hi man.

I have converted your code to work with Delphi XE.

Email me at ····@hotmail.com to get it since i can't find yet your email.
This is the same than

Hey, SPAMMERS, I'm here: ····@hotmail.com
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

georgebou

  • New Member
  • *
  • Posts: 45
Re: Raycasting with Lazarus
« Reply #8 on: May 16, 2011, 03:01:19 pm »
Why do you consider me a spammer?

This guy asks in his web page someone to help him to make this component work on Delphi XE and i can't find his email.

If the admins consider this is spam then they can delete my posts easily.

Shebuka

  • Sr. Member
  • ****
  • Posts: 422
Re: Raycasting with Lazarus
« Reply #9 on: May 16, 2011, 06:01:42 pm »
Why do you consider me a spammer?

This guy asks in his web page someone to help him to make this component work on Delphi XE and i can't find his email.

If the admins consider this is spam then they can delete my posts easily.

ROTFL!!! Read better next time... He doesn't say you are spammer, he says that publish your personal email in that clear way makes you a very appetitive to any spammer with email crawler bot's.

At least you can mask it like your_name [at] hotmail (dod) com or some sort of this

michalis

  • Full Member
  • ***
  • Posts: 108
    • Homepage
Re: Raycasting with Lazarus
« Reply #10 on: May 16, 2011, 06:03:52 pm »
Why do you consider me a spammer?

I think that by "Hey, SPAMMERS, I'm here:" he only wanted to warn you that you have revealed your email to the spammers. Which is a little moot, since all our emails are visible anyway (click on an envelope icons at the left of the post).

And this is how you can contact with anyone on this forum through email: click on the envelope link. Or go to the profile page (click on username on the left of the post), there the email is visible too.

georgebou

  • New Member
  • *
  • Posts: 45
Re: Raycasting with Lazarus
« Reply #11 on: May 16, 2011, 06:09:52 pm »
Ok guys thank you very much.
I took it wrong.

However i trust my email's spam filters :)

Anyway thanks for the tips.
« Last Edit: May 16, 2011, 06:11:45 pm by georgebou »

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1072
    • Burdjia
Re: Raycasting with Lazarus
« Reply #12 on: May 17, 2011, 11:41:50 am »
I think that by "Hey, SPAMMERS, I'm here:" he only wanted to warn you that you have revealed your email to the spammers. Which is a little moot, since all our emails are visible anyway (click on an envelope icons at the left of the post).

And this is how you can contact with anyone on this forum through email: click on the envelope link. Or go to the profile page (click on username on the left of the post), there the email is visible too.

« Last Edit: May 17, 2011, 11:43:45 am by Ñuño_Martínez »
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

laztest

  • New Member
  • *
  • Posts: 10
Re: Raycasting with Lazarus
« Reply #13 on: May 17, 2011, 02:34:54 pm »
georgebou
 Thanks. I have emailed you. Please tell me if you will allow this to be distributed as open source (BSD license).

Hi man.

I have converted your code to work with Delphi XE.

Email me when you have time to get the code.

georgebou

  • New Member
  • *
  • Posts: 45
Re: Raycasting with Lazarus
« Reply #14 on: May 17, 2011, 05:33:47 pm »
Hi.
I sent you the source code.

I have explained you in the email what changes i have made it to work :)

About the BSD license distribute it as open source, i have no problem :)

I'm glad you made things simple for opengl in delphi and that's the reason i made it work for Delphi XE :)

 

TinyPortal © 2005-2018