HomePortalFAQSearchMemberlistUsergroupsRegisterLog in
Meet the new KITO admins & hear their plans here.
You can use google search to find threads and posts here now. Example

Share | 
 

 How to make the night looking like it's the night? (Solved)

View previous topic View next topic Go down 
AuthorMessage
Witacha
3D Modeler
3D Modeler
avatar

Game username : Witacha
Server : Land Of The Wolves(Owner)
Female Posts : 1203
Join date : 2012-06-15
Age : 18
Location : France

PostSubject: How to make the night looking like it's the night? (Solved)   Sat Aug 01, 2015 7:34 pm

Ok so I found this code in "MagixSkyManager":

Code:
//Night
   if (dayTime >= 1900 || dayTime<500)
   {
      if (mSun->isVisible())mSun->setVisible(false);
      if (mSunRadiance->isVisible())mSunRadiance->setVisible(false);
      if (!mMoon->isVisible())mMoon->setVisible(true);
      if (!mStars->isVisible())mStars->setVisible(true);
      if (mSunLight->isVisible())mSunLight->setVisible(false);
      if (!mMoonLight->isVisible())mMoonLight->setVisible(true);
      if (!mMoonLight->getCastShadows())mMoonLight->setCastShadows(true);

      for (int i = 0; i<MAX_STARS; i++)
      {
         const Real tBlink = Math::RangeRandom(0, 1.0);
         mStars->getBillboard(i)->setColour(ColourValue(tBlink, tBlink, tBlink, tBlink));
      }

      ColourValue fadeColour = DEFAULT_FOG_COLOUR;
      fadeColour = fadeColour * ColourValue(0.4, 0.4, 0.5, 1);
      fadeColour = fadeColour * weatherSkyShader;
      //fadeColour += weatherSkyAdder;
      //fadeColour.saturate();
      if (mSceneMgr->getFogColour() != fadeColour || mSceneMgr->getFogEnd() != FOG_END)
      {
         mSkyDome->getSubEntity(0)->setCustomParameter(1, Vector4(0.4, 0.4, 0.5, 1) *Vec4(weatherSkyShader));
         //mSkyDome->getSubEntity(0)->setCustomParameter(2,Vec4(weatherSkyAdder));
         if (mSkyDome->getSubEntity(0)->getTechnique()->getName() == "2")
         {
            mSkyDome->getSubEntity(0)->getTechnique()->getPass(0)->getTextureUnitState(1)->setColourOperationEx(LayerBlendOperationEx::LBX_MODULATE,
               LayerBlendSource::LBS_MANUAL,
               LayerBlendSource::LBS_CURRENT,
               ColourValue(mSkyDome->getSubEntity(0)->getCustomParameter(1).x,
               mSkyDome->getSubEntity(0)->getCustomParameter(1).y,
               mSkyDome->getSubEntity(0)->getCustomParameter(1).z));
            /*mSkyDome->getSubEntity(0)->getTechnique()->getPass(0)->getTextureUnitState(2)->setColourOperationEx(LayerBlendOperationEx::LBX_ADD,
            LayerBlendSource::LBS_MANUAL,
            LayerBlendSource::LBS_CURRENT,
            ColourValue(mSkyDome->getSubEntity(0)->getCustomParameter(2).x,
            mSkyDome->getSubEntity(0)->getCustomParameter(2).y,
            mSkyDome->getSubEntity(0)->getCustomParameter(2).z));*/
         }
         mSceneMgr->setFog(FOG_LINEAR, fadeColour, FOG_DENSITY, FOG_START, FOG_END);
         mMoon->getBillboard(0)->setColour(ColourValue(1, 1, 1, 0.9));
         ColourValue cloudColour = ColourValue(0.1, 0.1, 0.1);
         cloudColour = cloudColour * weatherSkyShader;
         //cloudColour += weatherSkyAdder;
         //cloudColour.saturate();
         static_cast<MaterialPtr>(MaterialManager::getSingleton().getByName("Sky/CloudDome")).get()->setSelfIllumination(cloudColour);
      }

      return;
   }

I was wondering if you guys had any ideas on how to make the night looking darker?


Last edited by Witacha on Thu Aug 06, 2015 5:16 pm; edited 1 time in total
Back to top Go down
http://witacha-asukata.deviantart.com/
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 490
Join date : 2014-02-09
Age : 19

PostSubject: Re: How to make the night looking like it's the night? (Solved)   Sun Aug 02, 2015 1:19 am

change the ambient at night time to a darker shade

________________________________
Back to top Go down
http://azoptaos.boards.net/
Witacha
3D Modeler
3D Modeler
avatar

Game username : Witacha
Server : Land Of The Wolves(Owner)
Female Posts : 1203
Join date : 2012-06-15
Age : 18
Location : France

PostSubject: Re: How to make the night looking like it's the night? (Solved)   Tue Aug 04, 2015 8:35 pm

Thanks hyper !

Do you know how to add a darker ambient to the terrain,character,objects and items in night time?
Back to top Go down
http://witacha-asukata.deviantart.com/
Claire
Very Helpful
Very Helpful
avatar

Game username : SoftMoon | MissDiealot
Server : Vaellerios (admin) | Lair of the Wolf (admin)
Female Posts : 328
Join date : 2015-03-03
Age : 16

PostSubject: Re: How to make the night looking like it's the night? (Solved)   Tue Aug 04, 2015 8:57 pm

I think you'll need to edit the materials.
also you could post what you changed in the code to make the night look darker? I'm curious on how it's working ouo
Back to top Go down
http://missdiealot.deviantart.com/
Witacha
3D Modeler
3D Modeler
avatar

Game username : Witacha
Server : Land Of The Wolves(Owner)
Female Posts : 1203
Join date : 2012-06-15
Age : 18
Location : France

PostSubject: Re: How to make the night looking like it's the night? (Solved)   Tue Aug 04, 2015 9:07 pm

Softie wrote:
I think you'll need to edit the materials.
also you could post what you changed in the code to make the night look darker? I'm curious on how it's working ouo

Like Hyper said just edit the ColourValue to "0" to make it black:

Spoiler:
 

I know for the material but it need to function as when it's night it must be darker, so I need to edit or add a function in the compile but i literaly have no idea where and what to write ^^
Back to top Go down
http://witacha-asukata.deviantart.com/
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 490
Join date : 2014-02-09
Age : 19

PostSubject: Re: How to make the night looking like it's the night? (Solved)   Wed Aug 05, 2015 10:49 pm

yes, the colourvals during the different times change the sky's colour

the ambient light is what sets the shading

Code:
mSceneMgr->setAmbientLight(ColourValue(AMBIENT_LIGHT_OUTDOOR));

________________________________
Back to top Go down
http://azoptaos.boards.net/
Witacha
3D Modeler
3D Modeler
avatar

Game username : Witacha
Server : Land Of The Wolves(Owner)
Female Posts : 1203
Join date : 2012-06-15
Age : 18
Location : France

PostSubject: Re: How to make the night looking like it's the night? (Solved)   Wed Aug 05, 2015 11:25 pm

Hyper wrote:
yes, the colourvals during the different times change the sky's colour

the ambient light is what sets the shading

Code:
mSceneMgr->setAmbientLight(ColourValue(AMBIENT_LIGHT_OUTDOOR));

Oh alright, thank you ^^
Back to top Go down
http://witacha-asukata.deviantart.com/
-INACTIVE-
Texture Artist
Texture Artist


Male Posts : 447
Join date : 2014-05-03

PostSubject: Re: How to make the night looking like it's the night? (Solved)   Thu Aug 06, 2015 5:02 pm

If is this solved,goin to move this //-^
Back to top Go down
Witacha
3D Modeler
3D Modeler
avatar

Game username : Witacha
Server : Land Of The Wolves(Owner)
Female Posts : 1203
Join date : 2012-06-15
Age : 18
Location : France

PostSubject: Re: How to make the night looking like it's the night? (Solved)   Thu Aug 06, 2015 5:15 pm

Cyris ßlack♥ wrote:
If is this solved,goin to move this //-^

It is ^^
Back to top Go down
http://witacha-asukata.deviantart.com/
Sponsored content




PostSubject: Re: How to make the night looking like it's the night? (Solved)   

Back to top Go down
 
How to make the night looking like it's the night? (Solved)
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Keeping I.T. Open :: SUPPORT :: Support :: Solved Support Issues-
Jump to: