SetSkyDome allowed in SceneCreating only?

CodeKrash

24-12-2010 06:26:44

Hello. I'm trying to set a skybox or dome, or plane, during runtime, after SceneCreating, but I always end up with no change after doing the error free call. I did tinker with FarClipDistance during runtime as well, but there was still no change in background appearance (black I assume is the ambient color)
OgreWindow.Instance.mSceneMgr.SetSkyDome(true, "clouds", 5, 8);
Plane plane;
plane.d = 1000;
plane.normal = Mogre.Vector3.NEGATIVE_UNIT_Y;
OgreWindow.Instance.mSceneMgr.SetSkyPlane(true, plane, "clouds", 1500, 75);



So far I've been successful in loading textures and meshes during runtime, and It's my intention to remove all dependencies on the default "scripting system" when Ogre loads. If I have to give up on setting the sky during runtime, I might cry. :roll:

CodeKrash

24-12-2010 23:59:10

if it is in fact only possible within the scenecreating window, then does anyone have any suggestions as to how I can replicate that skybox/dome/plane behavior?

Beauty

26-12-2010 12:34:43

Did you create a tiny application by the Mogre Basic Tutorial 3?
There you learn how to setup a SkyDome.

Also you need to embedd the right resource files.
Additionally look to the file ogre.log - maybe there are helping warnings or errors.

Alternatively you can use the add-ons SkyX or Caelum for nice sky simulations.
Look to this forum topic for further links:
IMPORTANT LINKS - an overview for add-ons, topics, etc.

CodeKrash

28-12-2010 04:43:19

Thank you, but I am bypassing the scripting system completely, and I know how the examples do it (in the SceneCreating window). There are no errors/warnings that I can observe, in ogre.log or otherwise. I can only guess that the helper functions SetSky(Dome/Box/Plane/etc) only works in said window. Thanks for trying to help me. It would be nice to get a confirmation from someone who has great understanding of the underlying algorithms. I would rather work on higher level things than getting knee deep in the stock code, and hope someone can lend a helpful tip.

Beauty

02-01-2011 12:10:32

Did you try these?

SkyX - Simulation for sun, sky and clouds.
It's a wrapper for the Ogre add-on SkyX, which is fully compatible with the (M)Hydrax water add-on.
Wiki: SkyX Wrapper for MOGRE and SkyX
Forum: SkyX Wrapper for Mogre

CaelumSharp - An alternative simulation for sun, sky and clouds.
It's a C# port of the Ogre add-on Caelum, which is configurable by config files or code.
Wiki: CaelumSharp and Caelum
Forum: CaelumSharp

CodeKrash

02-01-2011 12:49:20

yes lol I have given up trying to do my own sky for now. I merged the skyxmogre svn repo with mine, and am now in the process of gathering enough courage to integrate it fully. I forgot how horrifying it can be to get the perfect combination of projects to all compile and play together nicely. I gave up on the first attempt to compile skyx when I found that you have to actually go back to the very bottom of the stack and compile ogre first (or second after mogre?). Love how SkyX looks btw, couldn't ask for much for than that :D