Jump to content

..Distance Fog..


Naughty Alien
 Share

Recommended Posts

..hi guys..right now, im slowly converting my stuff to 2.3 .. also im playing a bit with framewerk so I wanted to ask something about distance fog..so, if I do this

fw.renderer.SetDistanceFog(1)

fw.renderer.SetDistanceFogRange(Vec2(0, 10))

 

I guess every object within range 0-10 should be visible, while objects with distance bigger than 10 should be invisible because of fog?? So far, as i can see, fog doesnt behave on that way..am I missing some parameters here ?

 

Link to comment
Share on other sites

If you want no fog from 0-10 meters, then you should use Vec2(10,100). The distance between the values only means how rapidly the fog density should grow from 0% to 100% fog. You need also to set the FogColor, and control the translucency of the fog with the alpha value. Then there is also a FogAngle command, which sets how far the fog should raise above the horizon.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

..ahh..i see..thanks Lumooja..now it makes sense..and works too :) .. one questions about this 'layers' exposed in framework..layers are actually, how i can see from source, specific worlds used for rendering? therefore, i should use them to switch between worlds i have to load in geometry or particles , etc?

 

Link to comment
Share on other sites

..ahh..i see..thanks Lumooja..now it makes sense..and works too :) .. one questions about this 'layers' exposed in framework..layers are actually, how i can see from source, specific worlds used for rendering? therefore, i should use them to switch between worlds i have to load in geometry or particles , etc?

 

i am not sure if i am following you but here are the three worlds used in framewerk (fw):

fw.main.world
fw.transparency.world
fw.background.world

 

as for emitters... if you just place one in the editor scene then load the scene into a framewerk bmx program you should see it...

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

..hi macklebee...im not using editor..actually im just familiarizing myself with 2.3 trough framework since i never used it, so i can adopt my stuff easier after i see how everything works..basically I was asking about layers because it seems they are worlds so i wanna throw my particles(heat haze, or ice blocks with animated melting refraction, etc) on to proper place later..so I just wanted to see how its done in framewerk.. :)..so far i am VERY happy what i see, especially speed wise..its way faster than 2.23 I used before..nice so far..

 

Link to comment
Share on other sites

you should take a look at the firepit example model that comes with the Editor... has heat haze and fire built in via lua script... makes all of these things basically a part of a object now that gets created when loaded...

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

one questions about this 'layers' exposed in framework..layers are actually, how i can see from source, specific worlds used for rendering? therefore, i should use them to switch between worlds i have to load in geometry or particles , etc?

Yes, thats basically correct. You need to switch between the rendering worlds when you add your various objects such as emitters etc. I don't know what the BMax equivalent is (I'm sure its very similar) but I'm using the framewerk in C++ and would add an emitter as follows:

 

// Set transparent world
m_pFramewerk->GetTransparency().SetWorld();

//  Emitter code
....
....

// Set main world
m_pFramewerk->GetMain().SetWorld();

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...