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 / Can't Light Up Terrain :(

Author
Message
Game Master1330
18
Years of Service
User Offline
Joined: 19th Oct 2007
Location: (GetReaderXYZ() * 42 ) / 0
Posted: 29th Nov 2011 18:36 Edited at: 29th Nov 2011 19:30
Hi,
I'm having a bit of trouble with my terrain. I'm using the default terrain commands (Code below) to create it, and even with ambient light set to 100%, it is really dark.



Here's what i mean:


Matt

Welcome down to London City where the attitudes bad and the weather is shitty...
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Nov 2011 19:25
Holy moly my phone nearly fainted... Reduce the image size and reupload ot link...

What are you using to create it?

And what is your lighting setup...

Game Master1330
18
Years of Service
User Offline
Joined: 19th Oct 2007
Location: (GetReaderXYZ() * 42 ) / 0
Posted: 29th Nov 2011 19:28
lool soz :\ im using heightmaps and the standard commands to make it and im just using ambient light... ive tried making lights above the trerrain but it makes no difference :\

Welcome down to London City where the attitudes bad and the weather is shitty...
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 29th Nov 2011 20:02
try calculating terrain normals

Game Master1330
18
Years of Service
User Offline
Joined: 19th Oct 2007
Location: (GetReaderXYZ() * 42 ) / 0
Posted: 29th Nov 2011 20:04
how?

Welcome down to London City where the attitudes bad and the weather is shitty...
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 29th Nov 2011 20:13
set object normals terrain

Game Master1330
18
Years of Service
User Offline
Joined: 19th Oct 2007
Location: (GetReaderXYZ() * 42 ) / 0
Posted: 29th Nov 2011 20:30
no its still the same

Welcome down to London City where the attitudes bad and the weather is shitty...
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 29th Nov 2011 20:48 Edited at: 29th Nov 2011 20:49
Those aren't the "default" terrain commands, those commands are apart of Advanced terrain.

The problem is that AT objects don't have any vertex normals, so you have to manually add them using the convert object fvf command. try: convert object fvf objID,0x002||0x010||0x100 ,then use set object normals.

That will cause seams along the borders of each of the terrain's limbs (which are created when you specify a "split" value). The seams appear because the set object normals command works on a per-limb basis. You should look around for some of GG's terrain shader demos; some of them show how to calculate the normals in a way which works on a per-terrain basis and doesn't produce seams.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Nov 2011 21:07
How about usimg a 3DWS terrain?

Game Master1330
18
Years of Service
User Offline
Joined: 19th Oct 2007
Location: (GetReaderXYZ() * 42 ) / 0
Posted: 29th Nov 2011 21:17
whats 3dws? also i converted it but it just went black

Welcome down to London City where the attitudes bad and the weather is shitty...
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Nov 2011 21:23
3D World Studio... I can make you a one off export... So you can see whether or not it makes a difference for you...

revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 29th Nov 2011 21:33
Hmm, that should have worked. Are you sure you the parameters for set terrain light are correct?

Mabey the lighting is using its own UVs, try replacing that 0x100 with 0x200. Are you applying any shaders to the terrain?

Could you post a simple demo which demonstrates the problem?
Game Master1330
18
Years of Service
User Offline
Joined: 19th Oct 2007
Location: (GetReaderXYZ() * 42 ) / 0
Posted: 29th Nov 2011 21:58
valentine that would be awesome thanks im uploading the demo now

Welcome down to London City where the attitudes bad and the weather is shitty...
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Nov 2011 22:01
I wkll need your terrain texture and height map...

Game Master1330
18
Years of Service
User Offline
Joined: 19th Oct 2007
Location: (GetReaderXYZ() * 42 ) / 0
Posted: 29th Nov 2011 22:01
i tried to make a simple demo but the issue only stands in the whole game...

Welcome down to London City where the attitudes bad and the weather is shitty...
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Nov 2011 22:10
Game Master just noticed your sig... I am surprised a mod did not change it yet lol but its true lol

Game Master1330
18
Years of Service
User Offline
Joined: 19th Oct 2007
Location: (GetReaderXYZ() * 42 ) / 0
Posted: 30th Nov 2011 00:23
lol ty btw the textures and height maps are in the download

Welcome down to London City where the attitudes bad and the weather is shitty...
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 30th Nov 2011 02:39
Ok will try to crack into it by tomorrow...

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 30th Nov 2011 12:19
There's a very simple way of applying light to Advanced Terrain objects. If I recall correctly you need two things: normals (as discussed above) and the object needs to be set to react to light. I believe the command is set object light. It is set to off by default for Advanced Terrain objects.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 30th Nov 2011 16:34 Edited at: 1st Dec 2011 02:25
Ive created area4 but urm I dunno how to scale tge texture lol... Will post it here shortly... Witb code

EDIT

TYPO TYPO TYPO ARGH

Game Master1330
18
Years of Service
User Offline
Joined: 19th Oct 2007
Location: (GetReaderXYZ() * 42 ) / 0
Posted: 30th Nov 2011 16:40
kk ty

Welcome down to London City where the attitudes bad and the weather is shitty...
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 30th Nov 2011 18:22 Edited at: 30th Nov 2011 18:28
http://www.akaneaya.co.uk/tgcforum/DOWNLOADS/Maps.zip

Give it a try but like I said... textures... I guess you need to create a texture in the same size of the heightmap and terrain you want recreated... but this should help you diagnose and see if 3DWS will dispell any terrain issues you are having...

Extract using your fav unzipper thats why I used .zip otherwise I usually use WINRAR .RAR format... keep the texture in the same directory as the .x terrain file...

Hope this helped...

I have not had time for my development life and have a barrage of tools to overcome... 3DWS is one of them but I will be using it a LOT very soon.

EDIT

I for i and the ever condescenting role of the Capital.

Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 1st Dec 2011 01:36
Rename the water bump image to the correct name.

Also, I could not test the example and do not have the help files but have a feeling that the first parameter should be the main texture; not the second.

Game Master1330
18
Years of Service
User Offline
Joined: 19th Oct 2007
Location: (GetReaderXYZ() * 42 ) / 0
Posted: 1st Dec 2011 20:04
Thanks a lot for that valentine, it's working great now I even bought 3DWS

Welcome down to London City where the attitudes bad and the weather is shitty...
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 1st Dec 2011 20:45 Edited at: 1st Dec 2011 23:13
Woot! 1up to me from Leadwerks lol glad I could help... Can you post a new screen to show the difference?

Glad I could help

EDIT

Also if you bought via TGC 2up for me

Login to post a reply

Server time is: 2026-07-10 21:41:29
Your offset time is: 2026-07-10 21:41:29