far away buildings

Post topics regarding Level Building/Design and Entity Usage with Reality Factory
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

far away buildings

Post by psYco »

Im starting to work on my first level, and its a courtyard, with walls you can see over so you just see the sky, and thats fine, but at one point you have to posses the guard standing in a watch tower overlooking the yard off to one side, now from his perspective, you will have a complete view of the courtyard and then you see into the distance, so im going to build some buildings to the sides, but I want to give the feeling of great space, so within the skydome I wanted to have those kinda 2D backgrounds that you see in games such as quake 4, doom 3, the other quakes and I think a few times in HL2.

here are some examples of what I want:

Image

Image

So basically I want to make 'fake' skylines, does anyone have an idea how this could be done in RF???
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams »

That are just simple skybox effects with some nice textures...
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post by Jay »

The easiest way is to do this with a skybox. (that's a box with 6 sides that each represent one direction, front, back, left, right, top and bottom) But the FarClipPlane is somehow broken with Skyboxes and also you're left with a totally undynamic sky.

About the skydome, you can set the skytexture with a command, i don't remember its name right now (it's in the docs i am sure), but i am unsure what the format has to be for the texture. Maybe it has to be round?

I hope these two ideas help you. :)

EDIT: lol QoD wrote at the exact time as me!
Everyone can see the difficult, but only the wise can see the simple.
-----
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

well I know how the skydome works, but as far as I know RF only supports one BMP for the texture, and so it wouldent be possible to have the sky at the top and buildings on the sides... Im going to try just make a skydome for the sky, and then use some brushes with the Skybox entity applied and have them be the buidings, since they dont have to be dynamic at all...
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

You could actually have the buildings painted on the skydome bitmap. It would be tricky though, since the the skydome is a sphere and you would have to paint the texture accordingly.
Pain is only psychological.
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

hmmm, your idea sounds really good, but im not quite sure I understand what you mean? I think i get what I have to do (make the image of the buildings 'round') but im not sure how you would apply the texture to the skydome?
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Just to make things clear:
skydome is the spherical 'sky', the dynamic one you control with a script.
skybox is the 'cube sky' around your level that can have 6 different bitmaps.



So - if I'm not totally lost here - with a skydome you would need a texture like this:
The black blocks represent the buildings and white areas are the actual sky.
Image

The texture is then placed on the skydome something like this:
(side view, I hope you get it :) )
Image



You apply the texture to the skydome in the script.
The manual:
SetSkyTexture(texture);

Define the bmp file used to texture the skydome
Pain is only psychological.
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

oh yeah, I totally get it now, and i will try it out. But i just always thawt that the skydome texture was like looped, just like the textures on the level, so in that case that wouldent work... But I think that using what your saying i should be able to get it to work... I might have to tell the skydome to strech the texture rather than looping it some how.

I'll post back in a bit when ive tried.
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

Well, i created a basic sky texture, to let the buildings show up

here it is;

Image

I then added the sky dome entity and set it up like this;

Image

and this is the script that i told it to use;

Code: Select all

{
	Start[ ()
	{
                SetHeightOrigin(-1000);
                SetLandscapeSize(2000);
		SetSkyDome(500, 50);
                SetSkyTexture("level1sky.bmp");
                SetDesiredTriangles(2000);
                SetTerrain("flat.bmp", "desert256.bmp");
                SetDistanceFromSunFactor(4000);
                SetTwilightDistanceFromHorizon(0.6);
                SetLocation(920, 10, 16, 23);
                SetTwilightColor(255, 101, 114, 255); 
                SetSkyColor(116, 208, 241, 255);
		SetTimeScale(512);
		DisableSun(false);
                SetSunColor(255, 226, 146, 255);
                SetSunScale(8);
                SetAmbientLightColor(128, 128, 128, 128); 
                DisableCloud(false);
                UseSkyFog(false);
                
	} ]

	Run[ ()
	{
		SetWindDirection("northeast");
	} ]
}
but now when I compile the level the rite sky bmp doesnt show it just shows some random blue and purple colours which is another sky picture i used ages ago... oh and ive put the level1sky.bmp into the media/bitmaps/terrain directory. and the image is 512x512

can anyone see what im doing wrong? [/code][/quote]
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

I think that 'Start' should be the 'InitOrder' and 'Run' the 'StartOrder'.
Also, does your script have the '.s' extension? If so, you should add it in the entity properties.

Great looking texture, BTW. :)
Pain is only psychological.
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

THANK YOU!!!! It works! and for the first time ever i understand the skydome! (i never used to notice my changes but thats cause it wasnt running the script!!!!) seriously Juut, without you this game would NEVER get done... Thanks, when i get the size and that sorted out ill post a screen.
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

well ive sorted out the scale and that, and I stopped the way it cycled through the entire day in about 10 seconds, but there is still these 'blocks' and I dont think its because of the number of triangles, cause they are still there whether i use 100 triangles or 2000 triangles... anyway here it is,

Image
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post by Jay »

That looks really good! :)
I have no clue about the blocks but i just wanted to say that you made good work with the texture!
Everyone can see the difficult, but only the wise can see the simple.
-----
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Wow! That looks awesome! :D
I really like the texture, too.

I've tested skydomes a couple of times, but never had that problem with the blocks.
My sky textures have been kinda dark, though, so maybe I just haven't noticed.

The only idea I have is that the sky is rendered with the wireframe thing.
Try adding RenderWireframe(false); in the script.

Or could it have something to do with the sky colour?
Pain is only psychological.
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

hmmm, i think that just mabey, its just my PC, cause i get similar lines going across my other textures sometimes... So ill try it with the turn off wire frame command, but if it doesnt work ill try it on another PC, and then hopefuly the lines will go away... :D

oh and thanks for the compliment on the texture...
Post Reply