what do the SKY flag with sphere.mdl?

Posted By: CocaCola

what do the SKY flag with sphere.mdl? - 02/07/16 08:51

if I use a model as a sky, I must scalieren it and move. that goes without SKY flag.
What exactly does the SKY falg at ball models?
Code:
ENTITY* skySphere =
{
	type = "sky1.mdl";
	layer = 3; 
	scale_x = 10; 
	scale_y = 10; 
	scale_z = 10; 
	flags2 = SKY  | SHOW;
}

Posted By: Reconnoiter

Re: what do the SKY flag with sphere.mdl? - 02/07/16 11:20

If you want to use a sky- cube, scene, dome or cylinder -> add the SKY flag to it.

Anyway, you want to move/scale a sky object? Perhaps as a SCENE?
Iirc you can change sky objects in functions lateron:

function blablabla()
{
...
skySphere.scale_x = 5;
}

But dont quote me on this, never tried it except for hiding and showing sky objects.
Posted By: CocaCola

Re: what do the SKY flag with sphere.mdl? - 02/07/16 12:11

OK wink
but i dont want use sky cube, dome or cylinder.
Posted By: Reconnoiter

Re: what do the SKY flag with sphere.mdl? - 02/07/16 12:30

What is it you are trying to do exactly?

Sky objects are mainly there if you dont want to let your sky objects cover other objects. But in some cases you could use a entity that is far away so it doesn't block other objects and e.g. set the NOFOG flag for it.
Posted By: CocaCola

Re: what do the SKY flag with sphere.mdl? - 02/07/16 13:29

I would like that a mdl object do not other objects obscuring.
now i will try the NOFOG flag
edit: i have no problems with fogs
edit2:
in the manual the example works only for sprites
Code:
ENTITY* skyMountain =
{
  type = "mountainsphere.mdl";
  layer = 3; 
  scale_x = 0.25; 
  flags2 = SKY | SCENE | SHOW;
}

Posted By: Reconnoiter

Re: what do the SKY flag with sphere.mdl? - 02/07/16 14:02

This seems to work for me for models too:

Code:
ENTITY* skyModel =
{
  type = "mymodel.mdl";
  layer = 3; 
  scale_x = 0.25; 
  flags2 = SKY | SCENE | SHOW;
}



However, normal entities do not seem to always cover the sky object , which they should. I think this a bug (?) and remember a thread of myself of it with a solution: http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Main=54891&Number=457187#Post457187
Posted By: CocaCola

Re: what do the SKY flag with sphere.mdl? - 02/07/16 14:16

i have realy enought about thinking about bugs.
I remember it was a fbx import in med and in wed, i have maked a video and oneday the future was not more.
but i have the same versions like everybody.

would You give me a demo Projekt? You can use my sky.mdl.
sky1.mdl
Posted By: Reconnoiter

Re: what do the SKY flag with sphere.mdl? - 02/07/16 16:18

I am having a bit of trouble following you, and besides from the bug I mentioned in my previous post there seems to be nothing wrong with your sky1.mdl for this example. Except that its mesh is open, but that is not important now.

I think the easiest fix for you is to make it very big and far away so it doesn't cover anything else.

Or if you want to use the model as a sky sphere, than model a hollow sphere and let it move every frame with your camera xyz.
Posted By: CocaCola

Re: what do the SKY flag with sphere.mdl? - 02/07/16 16:49

i dont want move the Modell by the script by a while function.
But 1st i have to read waht you wrote in the link
Posted By: MasterQ32

Re: what do the SKY flag with sphere.mdl? - 02/08/16 14:40

use a simple shader with custom vertex shader and adjusted blend and z-pass modes. the vertex shader just doesn't apply any camera transformation (only matModel * matProjection) and renders only in the background (ZFunc = Greater)
Posted By: CocaCola

Re: what do the SKY flag with sphere.mdl? - 02/08/16 20:02

@MasterQ32: a DirectX or OpenGL Shader? wink

I think Reconnoiter is right and maby it is realy a bug but I make a Pause with my space Project for this weak.
Posted By: Steempipe

Re: what do the SKY flag with sphere.mdl? - 02/09/16 01:08

This is the sky sphere shader with fog contribution that I have. Maybe it will assist you.

Everything is in the download link.

http://steempipe.painthorsestudios.net/skysphere/skysphere_cd.zip

Posted By: Reconnoiter

Re: what do the SKY flag with sphere.mdl? - 02/09/16 12:15

@Steempipe, thanks for sharing, nice (better) sky_cube for us fog lovers.

@CocaCola, you can use Steempipe's shader example for your ball. If just want to use your ball as a skyscene-like object and not as a hollow sphere, just use the lines in the vertexshader for your own shader or grab e.g. a shader from the shader tutorials examples and modify that ones vertexshader.
Posted By: Steempipe

Re: what do the SKY flag with sphere.mdl? - 02/10/16 18:52

No prob! Love fog laugh
© 2024 lite-C Forums