Home Tutorials Download Beta Store Forum Documentation KnowledgeBase Wiki Blog

ShiVa3D

Return to Getting Started

Simple fog creation

You feel lost? You don't understand how to use ShiVa?

Simple fog creation

Postby vklymenko » 29 Mar 2012, 20:20

hi there, im trying to make atmosphere similar to this:
http://www.youtube.com/watch?v=QA66hrmA1pc
http://www.youtube.com/watch?v=A4Eqnwno60c (from 2:50)
for iOS.
Im trying to create fog now, but not much luck, i guess i missing something to turn on? can someone please advice me little bit in right direction? I've already checked contrast/monochrome/bloom effects and got them working. So just to start - how to get fog working - how about perfomance for iOS ?
User avatar
vklymenko
Platinum Boarder
Platinum Boarder
 
Posts: 759
Location: Europe

Re: Simple fog creation

Postby broozar » 29 Mar 2012, 20:37

hi vklymenko,

did you know there was a "fog" setting in the "general" tab of the ambience editor? http://www.stonetrip.com/developer/doc/editor/modules/ambienceeditor
bloom, monochrome etc. should not be able to help you much with fog...

fog should be available on iOS devices even in openGLES 1.1 mode without restrictions: http://www.stonetrip.com/developer/wiki/index.php?title=OpenGLES#Environment
User avatar
broozar
Platinum Boarder
Platinum Boarder
 
Posts: 3579
Location: Berlin - Germany

Re: Simple fog creation

Postby vklymenko » 29 Mar 2012, 20:41

hi, thanks,
yeap I started from this, but with any settings Im using for fog I have only this:
Image

a large plane, trees as billboards, but no fog at all : (
User avatar
vklymenko
Platinum Boarder
Platinum Boarder
 
Posts: 759
Location: Europe

Re: Simple fog creation

Postby broozar » 29 Mar 2012, 21:07

also in the editor on your PC, or only on your iOS device?
do the materials have "receive fog" enabled? just checking the basics.. do not be offended please.
User avatar
broozar
Platinum Boarder
Platinum Boarder
 
Posts: 3579
Location: Berlin - Germany

Re: Simple fog creation

Postby vklymenko » 29 Mar 2012, 21:28

nope, I didn't : ) as you know im nooby with 3d stuff, was playing much with HUDs only : ) how I can turn it on (for runtime created objects) and what about models imported from 3dsmax ?
User avatar
vklymenko
Platinum Boarder
Platinum Boarder
 
Posts: 759
Location: Europe

Re: Simple fog creation

Postby vklymenko » 29 Mar 2012, 21:32

oh, thanks very much - just founded in material editor lol : )
User avatar
vklymenko
Platinum Boarder
Platinum Boarder
 
Posts: 759
Location: Europe

Re: Simple fog creation

Postby vklymenko » 29 Mar 2012, 22:19

just figured out it works better for fps when using 3d objects instead billboards :roll:
is it because more calculations for a flat image that facing to camera (like then a low poly model?
User avatar
vklymenko
Platinum Boarder
Platinum Boarder
 
Posts: 759
Location: Europe

Re: Simple fog creation

Postby broozar » 29 Mar 2012, 23:35

hardly. my bet would be that the alpha you need for the billboards drains the performance.
User avatar
broozar
Platinum Boarder
Platinum Boarder
 
Posts: 3579
Location: Berlin - Germany

Re: Simple fog creation

Postby vklymenko » 30 Mar 2012, 21:34

hey, what about visibility distance setting? e.g. I want to have everything visible not more far then 10 units around ? : )
User avatar
vklymenko
Platinum Boarder
Platinum Boarder
 
Posts: 759
Location: Europe

Re: Simple fog creation

Postby broozar » 30 Mar 2012, 22:39

the fog api pages were just updated: http://www.stonetrip.com/developer/doc/api/scene-setDistanceFogStart etc.

you can define a fog-free space between the camera and FogStart. the thickness increase is determined by http://www.stonetrip.com/developer/doc/api/scene-setFogDensity. choose a high density if you want to make objects disappear completely.

the best illusion can be achieved if you are using fog in combination with a skybox that has the same color as the fog on its horizon.

to clip a scene completely after 10m, use http://www.stonetrip.com/developer/doc/api/camera-setMaxViewDistance
User avatar
broozar
Platinum Boarder
Platinum Boarder
 
Posts: 3579
Location: Berlin - Germany

Re: Simple fog creation

Postby vklymenko » 09 Apr 2012, 13:49

hi there,

huh, still playing with it, not that easy : )

so I decided to not use fog as is, but to try with transparent white billboards. E.g. to place 10 of them with 0.1-1 opacity far away, and its making good illusion of fog.

But the problem is that its causing big perfomance hit - using the transparency.
I founded this game
http://www.youtube.com/watch?v=QA66hrmA1pc
also using such planes and fading the objects, but there are very few objects and are very simple, and I have tens of objects at time to fade, which are about 40-300 polygons each.
User avatar
vklymenko
Platinum Boarder
Platinum Boarder
 
Posts: 759
Location: Europe

Re: Simple fog creation

Postby demosthenesk » 29 May 2014, 10:45

Hi, i implemented a fog particle.

It was realy simple. I have just took the texture from fire particle from samples and i colorize it in Gimp.

Then i change gravity and size in particle so the textures do not go upwards and fly into the sky but to go around the center of the fog.

You can try the "SpaceFog" archive if you want. :D
http://www.mediafire.com/download/z6oihc59g6ua6v1/SpaceFog_0.1.ste

This fog you can attache it on any object and you have a fog around the object and not in all scene around.
User avatar
demosthenesk
Expert Boarder
Expert Boarder
 
Posts: 112
Location: Greece


Return to Getting Started

cron