Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / 3D lighting - equivalent settings to default

Author
Message
dcpyatt
14
Years of Service
User Offline
Joined: 17th May 2010
Location: Alliance, Ohio USA
Posted: 20th May 2010 00:52 Edited at: 20th May 2010 02:08
I am new to DBPro, but am an experienced hobbyist programmer (30+ years) and IT professional.

I am working on my first real DBPro program in 3D and need to reposition lighting from the default/no declared lighting to a lowered light source distributing the light centered evenly on a cylinder object rather than the top-down lighting that default settings give.

[/code]
I have played a little with some of the snippets in the help sections for lighting, but would like to look at something a little more direct at showing what the lighting commands can do and how they are positioned in the overall scheme of things.

I will also be looking at possibly 'spotlighting' small rectangular sections of the cylinder either with 'positive' light or dimming larger areas to make certain areas appear lit while others appear unlit.

Thanks for any samples you might be able to offer.

Dave Pyatt
Alliance, Ohio USA
dcpyatt
14
Years of Service
User Offline
Joined: 17th May 2010
Location: Alliance, Ohio USA
Posted: 20th May 2010 02:33 Edited at: 20th May 2010 04:37
I think that I may have mistakenly killed my initial post when I attempted to edit it to add a code snipet. If this shows up twice I sincerely apologize.

I am a veteran programmer (30+ years) as well as an IT professional. I am starting to work on my first major DBPro program and need some direction on how to adjust lighting on a cylinderical object as created by this code snippet:



The default lighting with no additional commands places the lighting source above the object lighting the top more than the bottom. I would like to light the center protruding portion of the cylinder equally as if the light source was dead center top to bottom so that the center is illuminated and the upper and lower edges fade equally.

I would also like to know if it would be possible to light or 'unlight' (can you do negative lighting?) square portions of the face of the cylinder.

I have looked through the basic help snippets in the lighting section hit and miss, but hoped someone might be able to help out with a more direct example that I could learn more about lighting in a real world program snippet.

Thank you for your advice!
Dave Pyatt
Alliance, Ohio USA
owlman
15
Years of Service
User Offline
Joined: 8th Apr 2009
Location: Italy
Posted: 20th May 2010 16:22
hi DC, is what I've written here helpful for you?



if effort>reward : gosub home : endif
dcpyatt
14
Years of Service
User Offline
Joined: 17th May 2010
Location: Alliance, Ohio USA
Posted: 20th May 2010 22:43
Exactly what I was needing to see to grasp the concept!

Thanks, Owlman!

Login to post a reply

Server time is: 2024-11-23 16:49:24
Your offset time is: 2024-11-23 16:49:24