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 / How do you create fog with terrain?

Author
Message
DoctorWho_3DGX
23
Years of Service
User Offline
Joined: 12th May 2003
Location:
Posted: 9th Oct 2003 19:23
Hi All...

Im' trying to use DarkBasic Pro again after upgrading it to the
newest update.. Im' trying to apply fog to my terrain..
I tried to use the Set Object Fog command considering
that according to the user's manul the terrain is reffered to as an
object! So I used the above object command thinking that it would apply fog to my terrain level... I got a Object doesn't Exist error instead.. I know you can apply fog to a matrix without any problems...But I want to use a Heightmap image instead and apply fog
to this terrain. I couldn't find any commands in DarkBasic Pro that will allow me to set fog to a terrain. Im' assuming that DarkBasic Pro doesn't support fog for terrains created from Heightmap's? I know that you can go another route to get the terrain into darkbasic pro and then apply fog to it but it would require additional steps to get it done! Or does anybody else on this darkbasic pro forum know of any other ways I may go about to achive fog for my terrain created trough a heightmap image? Any information will be greatly appreciated!

P.S. If DarkBasic Pro doesn't support fog creation for terrains created through heightmap images...Can anybody please give me an idea, Or has anybody heard when the developers of DarkBasic Pro will include such commands to allow this in the near future?

Many Thanks to All,

DoctorWho...

Best Regards, DoctorWho_3DGX
Lead Programmer/Level Designer
DoctorWho_3DGX
23
Years of Service
User Offline
Joined: 12th May 2003
Location:
Posted: 10th Oct 2003 07:00
Hmmmmmmm...

I really need help with this problem!! I have just seen that 23 other people have seen this post and I was kinda' wondering if any out of that 23 knew anything about what I was talking about? I know that there is alot of good people on here that know darkbasic pro very well and I would appreciate it alot if anyone can please help me with this annoying problem Im' having here...Many thanks in advance...

Best Regards, DoctorWho_3DGX
Lead Programmer/Level Designer
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Oct 2003 08:32
I would send an email to [email protected] regarding the usage of terrains and fog.

At this moment in time terrains are limited in commands so Im guessing they havent been worked on in regards to fog.

At a later stage the terrain command set will be updated in command usage. I cant imagine that the terrain mesh does not have that feature ready to go but just not implemented yet.


Alternative


If you consider a matrix which is a similar creature it can be affected by fog at this moment in time.

SET MATRIX Matrix Number, Wire, Transparency, Cull, Filter, Light, Fog, Ambient

if you want to keep using terrains then ask lee about when that feature might be added to the terrain commands.

DoctorWho_3DGX
23
Years of Service
User Offline
Joined: 12th May 2003
Location:
Posted: 10th Oct 2003 11:09
Hey Thanks...

I appreciate your kind response to my questions..
I have tried to use a matrix through MatEdit..But I didn't like working with the code that was produced by it and the matrix was
too blocky looking...I like using heightmaped terrains because you have more control over the shaping of the terrains for finer detail.
I wish there was a way to write some code that would take a heightmap image file and convert it into a matrix-terrain so then i could use fogging on it. But after searching through the darkbasic pro's commands in the manual & also through the language online I found no such supported commands that would allow me to accomplish this task...I will indeed write lee bamber an email and ask if they intend to implement any such commands in the near future for the support of heightmaped-terrains... Meanwhile!! I am going to load the heighmap image file into MED.. A program used in conitec's 3D GameStudio package and convert the heightmap into a 3D mesh so I will be able to load the mesh as a 3D Object so I can be able to have fog effect it like I want and still get the terrain I want too!
the only thing I hate at this point is that i will have to write a collision routine for the 3D Mesh to use it for gravity for other 3D objects in this world.. Many thanks in advance for your kind help and also to the others on this forum for there informative advice!! Thanks again!

Best Regards, DoctorWho_3DGX
Lead Programmer/Level Designer
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Oct 2003 17:14
I wish there was a way to write some code that would take a heightmap image file and convert it into a matrix-terrain so then i could use fogging on it.

thats possible bro

u translate each pixel in a greyscale map of 0 - 255 and translate that to the matrix divisions.

theres a matrix smoothing command posted in the code snippets section so smoother matrices are possible.

I asked for rotate matrix tile today as well so that will help in the texturing department of matrices.

Dont forget with the get ground height command you can create a series of primitives and using a loop u can drape a matrix over it as well as draping it over a 3d mesh.


have fun

DoctorWho_3DGX
23
Years of Service
User Offline
Joined: 12th May 2003
Location:
Posted: 10th Oct 2003 18:34
Quote: "u translate each pixel in a greyscale map of 0 - 255 and translate that to the matrix divisions.
"
Interesting...! You wouldn't happen to know where I might get a code example showing such a process would you?

Quote: "Dont forget with the get ground height command you can create a series of primitives and using a loop u can drape a matrix over it as well as draping it over a 3d mesh.
"
Really?!? Can you direct me to a code samplw showing me how this is done?

Im' terribly sorry here as I have just actually got into DarkBasic Pro and Im' learning there commands and structure in their language...
I have coded in basic before but Im' a little rusty though so please bear with me as it's been awhile...Any information & examples would be GREATLY appreciated very much so....! Thank's again indi...

Best Regards, DoctorWho_3DGX
Lead Programmer/Level Designer
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Oct 2003 18:56
well i found the matrix smoothing one i use in my editor from red eye. Ill see if i can find tdboys matrix draper now.




indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Oct 2003 18:58
and i managed to find Tdboys matrix draping idea as well.




Sorry no luck with a heightmap snippet at the momo

indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Oct 2003 19:04
what do ya know 3 for 3, heres yarbles example of a matrix heightmap

http://www.lunarpixel.com/temp/Yarbles_Mtx_Terrain_Example.zip

David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 10th Oct 2003 19:52
Quote: "well i found the matrix smoothing one i use in my editor from red eye."


I recognise that It think I gave him the theory on how to do it, very easy and clever way.

c:/dos
c:/dos run
run dos run
ReD_eYe
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 10th Oct 2003 20:30 Edited at: 10th Oct 2003 20:31
yup, Davids89's theory there, i thought i put your name at the top somewhere dude, sorry about that

#EDIT ah, i gave you credit in the codebase entry.


DoctorWho_3DGX
23
Years of Service
User Offline
Joined: 12th May 2003
Location:
Posted: 10th Oct 2003 22:19
Hey thanks guys for all of your kind help here...
I very much appreciate it alot...

Thank's again indi for helping me out with this, you're a great guy!!


Best Regards, DoctorWho_3DGX
Lead Programmer/Level Designer
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 11th Oct 2003 04:29 Edited at: 11th Oct 2003 04:30
cheers mate, have fun

btw soz dave I better credit the correct fellow

Login to post a reply

Server time is: 2026-07-07 22:20:53
Your offset time is: 2026-07-07 22:20:53