Jump to content

Camera fog??


Yue
 Share

Recommended Posts

 

Hello, here there is nothing to do the fog of the camera. Any suggestions? These are the values I have, but I do not see anything meaningful on the screen.

 

--Entity Camera.

function Script:Start()

self.entity:SetFogRange (0,1000)
self.entity:SetFogColor (0.72,0.73,0.67,1.0)
self.entity:SetFogAngle (0, 180)


self.entity:SetClearColor(0.721, 0.352, 0,1)
	
end




 

Mars.png

 

 

Link to comment
Share on other sites

  • 2 weeks later...

I'm looking to create a dark green fog that is very dense (sewer system), but I keep getting a too bright green when dense or almost no fog when I let up on the alpha value. I am confused as to HOW to get the RGBA values - it's not like I can grab them from photoshop and input them - they seems to be 0.v, 0.v, 0.v,0.v where v = some value. I know they are in order (R, G, B, A), but I have no idea how to get a specific color with this format.  How do I set this predictably?

Here is the code:

--Set Fog


    self.camera:SetFogMode(true)
    self.camera:SetFogRange (0,25)
    self.camera:SetFogColor (0,0.10,0,0.5)
    self.camera:SetFogAngle (0, 180)
    self.camera:SetClearColor(0.0, 0.0, 0,0)

What is the correct settings for a very dark green dense fog (and i'd love floating particles in the air as well - how would I do this in Leadwerks?

Mike

MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 980 GTX with 16gb vram / SSD drives

MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1060 GTX with 8gb vram / SSD drives

Alienware Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1070 Ti with 16gb vram / SSD drives

My Patreon page: https://www.patreon.com/michaelfelkercomposer

My music for sale: https://www.tgcstore.net/category/513?format=all&perpage=30&textures=undefined&price=all&order=default&artists[]=87213

Custom synths and sounds - http://www.supersynths.com

Link to comment
Share on other sites

To acquire the values for SetFogColor you will need to divide each RGBA value by 255.

Script.fogcolor = Vec4((14/255),(79/255),(0/255),(255/255))

...

self.camera:SetFogColor (self.fogcolor.r,self.fogcolor.g,self.fogcolor.b,self.fogcolor.a)

You could also use the colour selector:

Script.fogcolor = Vec4(1.0,1.0,1.0,1.0) --color "Color Picker"

 

SpEcIeS

Link to comment
Share on other sites

17 hours ago, karmacomposer said:

(and i'd love floating particles in the air as well - how would I do this in Leadwerks?

Mike

Should be pretty simple with with LWs particles.   Sometimes with particles you need to combine a number of emitters to get what you want in a smart way (i.e. without harming performance, or with a particular look)Try attaching the emitter as a child of your character controller and maybe see if a second emitter also attached deals with more distant particles or a variation so it's doesn't look like the particles are just around your character.

 

Link to comment
Share on other sites

Thank you.  Got the fog working perfectly and the particles kick tushy!!!  Very atmospheric now.

Mike

MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 980 GTX with 16gb vram / SSD drives

MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1060 GTX with 8gb vram / SSD drives

Alienware Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1070 Ti with 16gb vram / SSD drives

My Patreon page: https://www.patreon.com/michaelfelkercomposer

My music for sale: https://www.tgcstore.net/category/513?format=all&perpage=30&textures=undefined&price=all&order=default&artists[]=87213

Custom synths and sounds - http://www.supersynths.com

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...