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.

DarkBASIC Professional Discussion / Question about lights

Author
Message
Regnuar
17
Years of Service
User Offline
Joined: 25th Dec 2008
Location:
Posted: 3rd Dec 2011 13:01
Hello all,

I started to form an idea about a bit more darker project, but how they actually work? Or should i ask in different way. How do you play with lights to make nice dark atmosphere only with few light sources?

i got some issues with some kinda "global light". If you run the small demonstration i made, you can see the top of the sphere is always lighten up even the only light source i made is below the thing. Any ideas how to remove that "global light" as i call it?

Regnuar
17
Years of Service
User Offline
Joined: 25th Dec 2008
Location:
Posted: 3rd Dec 2011 13:26
Solved the global light issue. Just hide light 0 was enough. But i still gladly take some advices to create a nice lightning.
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 3rd Dec 2011 13:34 Edited at: 3rd Dec 2011 13:35
Quote: "Just hide light 0 was enough"


You have to use light 0 because is the one that makes shadows. Don't make light 1 . Have a look to this update to see shadows moving.



Cheers

I'm not a grumpy grandpa
Regnuar
17
Years of Service
User Offline
Joined: 25th Dec 2008
Location:
Posted: 3rd Dec 2011 14:02
Yes, much better indeed. Thank you for quick reply. Only thing is ( i dont know if it is about my graphics card), but the shadows seem to bug pretty much. Any ideas how to make it run more smoothly?
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 3rd Dec 2011 14:09
Test it with this piece of code. I think that is a problem of your scene.





Cheers.

I'm not a grumpy grandpa
Regnuar
17
Years of Service
User Offline
Joined: 25th Dec 2008
Location:
Posted: 3rd Dec 2011 15:27
Really nice example, thank you.

Is there possibility to make more than one light source that casts shadow? for example if we have a tunnel with 10 torches from the start to the end and every torch casts shadow, or do i need to think other possibilities?
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 3rd Dec 2011 15:33
You could use a shader for that, but it would drag the framerate down.

Evolved has done some amazing work with lighting shaders, I suggest you take a look.
clicky clicky

My signature is NOT a moderator plaything! Stop changing it!
Regnuar
17
Years of Service
User Offline
Joined: 25th Dec 2008
Location:
Posted: 3rd Dec 2011 15:50
Cheers. I'll take a look into it shortly. need to play with the basics before movinge to advanced things How radical fps drop we're talking about?
Stab in the Dark software
Valued Member
23
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 3rd Dec 2011 16:01
Quote: "You have to use light 0 because is the one that makes shadows. Don't make light 1 . Have a look to this update to see shadows moving."


All lights in DBpro will make shadows just use "set shadow light" command.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 3rd Dec 2011 17:12
Quote: "How radical fps drop we're talking about?"

Depending on your hardware, it could be a very big drop!

I'd suggest you download the advanced lighting project and run it to get an idea of how it will run.

My signature is NOT a moderator plaything! Stop changing it!
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 3rd Dec 2011 18:45
Quote: "All lights in DBpro will make shadows just use "set shadow light" command."


At the end you will need x,y,z of light 0 and you will have to writte one line more of code.

Cheers

I'm not a grumpy grandpa
Regnuar
17
Years of Service
User Offline
Joined: 25th Dec 2008
Location:
Posted: 3rd Dec 2011 19:34
Alright. Gonna work with shadows for a while. I'll post the result with heavy documentation, maybe someone in future will have use for it Thanks for all the replys. Feel free to check the result in few days.
Stab in the Dark software
Valued Member
23
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 3rd Dec 2011 22:05 Edited at: 5th Dec 2011 02:34
Regnuar

I have attached a sample project using native DBPro lighting and shadows.
I made the project to test loading of Milkshape objects but you can use .x as well.
I have included a compiled exe as well, incase you can’t compile the code.
[img][/img]



[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Regnuar
17
Years of Service
User Offline
Joined: 25th Dec 2008
Location:
Posted: 4th Dec 2011 18:37
Thank you for nice example, seems like i dont need to make my own post here since here is already two amazing examples =)

I had some problems at first ( i didnt have some dll file) but running really smooth now.

Also can't compile, which is ok as you attached the exe file
Stab in the Dark software
Valued Member
23
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 5th Dec 2011 02:25 Edited at: 5th Dec 2011 02:27
Regnuar,


You will need three third party dlls to compile this code.
They are all free and can be downloaded at the links below.
The Matrix1Utility plugins collection of dlls is a must have for programming in DBPro.
The D3D dll is also a nice addition for displaying text on the screen.
And last but not least our SITDS_Tools.dll, which contains the command for loading the MilkShape objects directly into DBPro.
If you are not familiar with installing third party dlls in DBPro it is very simple.
You just copy the dlls to the “compiler>> plugins user” folder in the DBPro install directory.
The “.ini” file goes in the “editor>> keywords” folder in the DBPro install directory.
Help files go in the help folder. Then just restart DBPro and you should be able to compile the code.

Matrix1 Utility plugins
http://forum.thegamecreators.com/?m=forum_view&t=85209&b=18

D3DFunc.dll
http://forum.thegamecreators.com/?m=forum_view&t=69221&b=5

SITDS_Tools.dll
http://forum.thegamecreators.com/?m=forum_view&t=190035&b=8

We also posted another exe on our WIP page you might want to download and run.
It demonstrates light mapping with Giles files loaded directly in DBPro.
If you still can’t get it to compile post , I will check here to see if you still need help.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 5th Dec 2011 11:52 Edited at: 5th Dec 2011 12:24
I can't seem to run your exe - it can't find "MSVCP100.dll". I guessed that was a MilkShape DLL and had a look there and I have a "MSVCP60.dll" file on my system. Do you need to have a specific version of MilkShape installed and, if so, which? Mine is probably quite old now.

In the meantime I'll check the MilkShape site and see if an update is available.

Edit Just checked my MilkShape installation. I had MS 1.8.5 Beta1 and have just this minute installed the latest beta (MS 1.8.5 beta2) but still no sign of the file "MSVCP100.dll". What is it and where can it be found?

Edit2 It seems that you need two extra DLLs, "MSVCP100.dll" and "MSVCR100.dll", both of which were lurking in the AC3D folder on my system (and nothing to do with MilkShape - they are MicroSoft DLLs). I moved copies of those to your project folder and the exe runs fine.

Now to try compiling the code ... [Edit3 Compiled and executed fine. ]
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 5th Dec 2011 13:39
MSVCP100.dll sounds like a Microsoft Visual C runtime file. Have you installed the Visual C runtimes?

My signature is NOT a moderator plaything! Stop changing it!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 5th Dec 2011 15:02
If that comes with Microsoft Visual C++ 2008 Express Edition then probably yes, otherwise I doubt it.
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 5th Dec 2011 15:03
Hi there friends.
@Stab in the Dark software
First of all, say that you've started writing and noting the name of Regnuar just because you disagree my comment about the shadows.I'm not this kind of person.

I'v been trying to execute your example, and couldn't get it working. I have got all three dlls you comment, and as Pasky says you will need more dlls to make it work properly.

Cheers.

I'm not a grumpy grandpa
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 5th Dec 2011 15:08
Quote: "I'v been trying to execute your example, and couldn't get it working."


Did you mean the DLLs I mentioned - or were you having problems with something else?

Quote: "and as Pasky says"


Has he posted on this thread?
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 5th Dec 2011 15:15 Edited at: 5th Dec 2011 15:18
@Green Gandalf

I can't find those dlls in my PC, and I can not execute the exe neither.

I'm not a grumpy grandpa
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 5th Dec 2011 15:37
Just google them, this website is always useful : http://www.dll-files.com/dllindex/dll-files.shtml?msvcp100

TheComet

chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 5th Dec 2011 16:11 Edited at: 5th Dec 2011 16:12
@Thecomet

Thanks for the link...it is good to know where to go for nex time

I have downloaded both dll, and try to execute the exe and...



Quote: "Msvcr100.dll not designed to run on windows or contains an error. Try installing the program again using original installation media, or contact the system administrator or software manufacturer for assistance"


Cheers.

I'm not a grumpy grandpa
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 5th Dec 2011 17:06
Try the four DLLs in the attached zip file. Everything works with those versions on my machine. Just put them in the project folder.

Perhaps you downloaded a different version? Or perhaps you need something else to be installed for them to work.

It would be helpful if Stab in the Dark Software simply told us exactly what we need in order to run his demo - instead of leaving us all to make random stabs in the dark.
Stab in the Dark software
Valued Member
23
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 5th Dec 2011 18:01 Edited at: 5th Dec 2011 18:02
Sorry about all the confusion. Our “SITDS_Tools.dll” requires these Microsoft dlls which can be downloaded from Microsoft at this link.


http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5555

We were unaware of this requirement because all of our machines have Visual Studio 2010 installed.


Green Gandalf,

Quote: "instead of leaving us all to make random stabs in the dark."

Now you know how came up with the name because that’s exactly what we have been doing for the past 10 years with DBPo.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 5th Dec 2011 18:10 Edited at: 5th Dec 2011 18:20
Quote: "Now you know how came up with the name because that’s exactly what we have been doing for the past 10 years with DBPo."


You are not alone.

Edit Thanks. That's a much neater solution. The demo works now without any of those extra DLLs.
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 5th Dec 2011 20:50
@Green Gandalf
Thanks for the dlls, now the executable runs, but I'm unable to compile the example. Anyway, we can get the same without all this dlls.

Cheers.

I'm not a grumpy grandpa
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 5th Dec 2011 21:20
Quote: "but I'm unable to compile the example"


What goes wrong this time? It compiles fine for me now. Do you have the utilities Stab in the Dark Software mentioned here:

Quote: "Matrix1 Utility plugins
http://forum.thegamecreators.com/?m=forum_view&t=85209&b=18

D3DFunc.dll
http://forum.thegamecreators.com/?m=forum_view&t=69221&b=5

SITDS_Tools.dll
http://forum.thegamecreators.com/?m=forum_view&t=190035&b=8

"


You'll need those as well as the MicroSoft stuff.

Quote: "Anyway, we can get the same without all this dlls."


Yes at least the Microsoft ones are installed easily now.
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 5th Dec 2011 21:36
@Green Gandalf
Yes, I have every thing in its place, but this times it remark the line saying that couldn't get D3d funtion start. I like to test all examples before to get rid of it, and I like most of your examples, and some times we can be no agree but continue to behave like civilized people. I think for this time I will continue my own method of doing shadows.

Cheers.

I'm not a grumpy grandpa
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 5th Dec 2011 23:11
Quote: "but this times it remark the line saying that couldn't get D3d funtion start"


I'm sure there's a simple explanation for that error - but I just can't recall it. Perhaps someone else can identify the problem? It could be as simple as closing and re-starting DBPro or something like that.

I'm sure you don't need all the Matrix1, D3D or MilkShape stuff for the shadows - just edit all those lines out and add new lines where necessary. That demo was illustrating several different things I think.

Quote: "I think for this time I will continue my own method of doing shadows."


A good idea - till you get something simpler working.
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 6th Dec 2011 18:33 Edited at: 6th Dec 2011 18:39
Hi there.
For all those who couldn't execute Stab in the darks sofware's example because of the annoying dlls, here's a new version that makes the same without those dlls and SITDS_Tools.dll.

I hope you don't mind Stab in the Dark sofware, as this is just an adaptation to Dbpro for all the friends that don`t have those dlls.

See example attached.



Cheers.

I'm not a grumpy grandpa
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 6th Dec 2011 20:21
Better version.
Use the attached media above.



Cheers.

I'm not a grumpy grandpa

Login to post a reply

Server time is: 2026-07-11 12:01:54
Your offset time is: 2026-07-11 12:01:54