Lazarus

Announcements => Third party => Topic started by: laztest on May 06, 2011, 07:07:25 pm

Title: Raycasting with Lazarus
Post by: laztest 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.
Title: Re: Raycasting with Lazarus
Post by: Laksen 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?
Title: Re: Raycasting with Lazarus
Post by: Andru on May 08, 2011, 12:55:06 am
try this demo (http://andru-kun.inf.ua/tmp/simple.zip)(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 :)
Title: Re: Raycasting with Lazarus
Post by: laztest 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?
Title: Re: Raycasting with Lazarus
Post by: laztest 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 (http://andru-kun.inf.ua/tmp/simple.zip)(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 :)
Title: Re: Raycasting with Lazarus
Post by: laztest 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 (http://andru-kun.inf.ua/tmp/simple.zip)(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 :)
Title: Re: Raycasting with Lazarus
Post by: georgebou 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.
Title: Re: Raycasting with Lazarus
Post by: Ñuño_Martínez 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
Title: Re: Raycasting with Lazarus
Post by: georgebou 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.
Title: Re: Raycasting with Lazarus
Post by: Shebuka 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
Title: Re: Raycasting with Lazarus
Post by: michalis 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.
Title: Re: Raycasting with Lazarus
Post by: georgebou 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.
Title: Re: Raycasting with Lazarus
Post by: Ñuño_Martínez 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.

Title: Re: Raycasting with Lazarus
Post by: laztest 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.
Title: Re: Raycasting with Lazarus
Post by: georgebou 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 :)
Title: Re: Raycasting with Lazarus
Post by: laztest on May 17, 2011, 08:33:37 pm
George -
 Thanks. I have updated the code on my webpage with your Delphi XE additions. One curious thing is that when compiled with Delphi XE I get some flicker, and setting doublebuffered does not seem to correct this.
Title: Re: Raycasting with Lazarus
Post by: laztest on May 18, 2011, 03:29:07 pm
George Boudouris has solved the flickering problem on Delphi XE. Therefore, I have updated the downloads on the web page
  http://www.cabiatl.com/mricro/raycast/
For anyone who sees flicker with dglOpenGL controls on Delphi XE, the solution was to add the line
  GLBox.ParentBackground:= false;
after
 GLBox.Align := alClient;

Thanks George!
Title: Re: Raycasting with Lazarus
Post by: georgebou on May 18, 2011, 07:27:11 pm
No problem :)
TinyPortal © 2005-2018