Jump to content
Sign in to follow this  
icebone

bunkers, tunnels, caves - texture settings for best light/darkness effects?

Recommended Posts

hi folks,

currently i am working on a tunnel and cave addon for a mission in takistan. The tunnel/cave is a building standing somewhere at the edge of the map and players will be teleported inside/out.

As i do not wanna talk about unlaid eggs, there is a video attached, showing the layout and a walk through during multiplayer gameplay. The tunnel/cave is in unreleased alpha stage, so do not expect fancy textures, sounds, lights yet.

My problem and the reason for this post are the light effects within the tunnel/cave.

The shadows of players, which u see in the video are not from a light source inside the tunnel/cave, they are caused by the outside sun.

The same shadow effects appear, as soon as I place objects (like pallets, radios, tables, ...) inside the tunnel/cave. If the sun shines outside, then these objects are all lighted up inside by the sun.

Is this a limitation of the arma2 light engine or are there settings in the .rvmat, which could eliminate/reduce the impact of the outside sun on the tunnel/cave textures and also on the textures of the other objects, units?

Timing the mission during night or accelerating time into night time as soon as a player enters the tunnel/cave are options, but maybe there are better alternatives.

Please let me know, if you have got some ideas/experiences on this issue. Currently I only use 1 texture for the walls and the following .rvmat settings. E.g. are the other available pixel or vertex shaders better suited for textures inside buildings?

Thanks for your help!

IceBone :)

06:09 min:sec, HD

my.rvmat:

ambient[] = {0.1, 0.1, 0.1, 0.1};

diffuse[] = {0.1, 0.1, 0.1, 0.1};

forcedDiffuse[] = {0.0, 0.0, 0.0, 0.0};

emmisive[] = {0.0, 0.0, 0.0, 0.0};

specular[] = {0.0, 0.0, 0.0, 0.0};

specularPower = 0;

PixelShaderID="Normal";

VertexShaderID="Basic";

Share this post


Link to post
Share on other sites

Does the cave model itself have a Shadow LOD? If not then the model is casting no shadow upon itself, and is the reason you are seeing everything so well lit inside (save for the cave itself) and casting their own shadows.

Edited by NodUnit

Share this post


Link to post
Share on other sites

*Just a random shot*

From "Face's properties" in O2 (you know..the "E" button..)

..i think there is an option "Always In Shadow" (for selected inner faces)

You can also give it a try!

*promising and nice addon btw ;)

Share this post


Link to post
Share on other sites

I have tried many things in different ways , i came to conclusion the Light was judged by the Sun and Moon and the Texture on the building did not always over ride the texture on the Man and thus HE would always seem Bright wherever he was .during the day .

hope you Break the Myth/ problem

a good start to understand is here , not sure how relevant it is in OA

https://community.bistudio.com/wiki/ArmA:_RVMAT#Lighting

Share this post


Link to post
Share on other sites

erm

Mr. Max Power was talking about some enviroment map thing some time ago... but he couldn't explain how it could barely work

Anyhow, you could make a box like object or light blocking walls -basic geometry casting shadows- so characters inside wont be emitting sunlight...

saludeinz!

Share this post


Link to post
Share on other sites

I had a similar thought that maybe the Layers of the terrain also affected the Lighting of its surroundings , i tried to investigate but was using tools Bin which is pretty old in comparison to Game BIn so not sure what is right and whats relevant .

i may have ben way off back then but here is wher i was looking in cfgLight

// a lot of settings which were here in 1.97 were moved into CfgWorlds

// groundReflection[]={0.05,0.04,0.02}; // dark brown - ground

groundReflection[]={0.085,0.068,0.034}; // light brown - sand

//groundReflection[]={0.0578,0.068,0.0442}; // green - grass

//groundReflection[]={0.06,0.06,0.03}; // dark olive - ground

Share this post


Link to post
Share on other sites
erm

Mr. Max Power was talking about some enviroment map thing some time ago... but he couldn't explain how it could barely work

Anyhow, you could make a box like object or light blocking walls -basic geometry casting shadows- so characters inside wont be emitting sunlight...

saludeinz!

I couldn't explain how it works, huh?

The environment map isn't the problem in this case. The environment map gives you an ambient reflection which is governed by your specular, ambient, and diffuse settings. Protip: If you want something to look indoors, don't give it an outdoor environment map.

What this guy is talking about is shadows being cast by the sun.. ie direct light.

Share this post


Link to post
Share on other sites
I have tried many things in different ways , i came to conclusion the Light was judged by the Sun and Moon and the Texture on the building did not always over ride the texture on the Man and thus HE would always seem Bright wherever he was .during the day..

More or less right on all counts, best you can hope for is that your shadow LOD on your (building) tunnel system is working correctly. From what you've posted so far I'm still not sure you have one.

(hopefully A3 will improve this)

Share this post


Link to post
Share on other sites

Interesting addon, we (unsung) experimented with this a few years ago. We couldn't stop the light bleeding into the caverns. I hear A3 lighting doesn't bleed into the terrain so there might be hope for us yet :)

Share this post


Link to post
Share on other sites

Thanks for all your feedback on this topic so far and sorry for not replying earlier, but I had some construction workers at my home "cave" in real life.

@NodUnit & Pathetic_Berserker:

You are right. The addon in the video does not include a shadow lod. I experimented with shadow lods earlier and was not satisfied with the results.

Your early feedback, NodUnit, made me reread the shadow lod part of Mondkalb's Addon Tutorial (which is a must read). My mistake with my shadow lods was, that I did not create sharp edges by pressing 'U'.

Mondkalb writes that hitting 'U' is mandatory and in the German version of his tutorial he writes that pressing 'U' causes things being lit up correctly.

http://community.bistudio.com/wiki/Mondkalb's_Addon_Tutorial (English version)

http://www.g-g-c.de/forum/showthread.php?t=11768 (German version)

Now I implemented a lod shadowVolume 1.0 with one big box, covering all the tunnel/cave building. The results are better except for 2 things:

- in 3rd person view the player is covered in shadow (which is ok), but in 1st person view the player's arms and his weapon are still lit up by the sun (which is not ok, but less relevant to me) and

- when the player moves within the tunnel/cave or enters new areas of it, then the wall textures of the areas are first lit up and darken afterwards within 2-3 seconds (which is bad).

I give the other hints a try as well and I will post feedback asap.

Thx

IceBone

Edited by IceBone_

Share this post


Link to post
Share on other sites
Now I implemented a lod shadowVolume 1.0 with one big box, covering all the tunnel/cave building. The results are better except for 2 things:

- in 3rd person view the player is covered in shadow (which is ok), but in 1st person view the player's arms and his weapon are still lit up by the sun (which is not ok, but less relevant to me) and

- when the player enters new tunnel/cave areas, then the wall textures of the areas are first lit up and darken afterwards within 2-3 seconds (which is bad).

Ok, was the shadow box a single cube covering the whole system or a box with proper 3D walls enclosing the system? There are some issues with Arma and drawing large objects (think of your shadow as an object within a LOD) under certain circumstances, ie if you are standing within the actual shadow geometry you may get some odd results, and likewise if your shadow geometry is quite large you may get some odd results, particularly at the edge of your view as you pan about.

Edited by Pathetic_Berserker

Share this post


Link to post
Share on other sites

I tried both, if I understand your question right.

First I tried a big single cube, big enough, so that you could pack the tunnel/cave system into it and ship it as a present and second, I copied all the faces of my 1.0 resolution lod into my shadow lod and removed the textures.

In the second case the shadow lod looked identical to the Oxygen sequences of the video. (side note: all faces are triangles and I know that the second alternative causes lots of shadow calculation effort - it was just a try)

The results were identical in both cases and like described in my earlier post.

Regards,

IceBone

Share this post


Link to post
Share on other sites

So in the first instance you would be standing within the actual geometry and in the second,... did you check that your geometry was closed? Res lods usually comprise of single side faces and shadow lods don't like them.

PS. Sorry for what may be an obvious question but theres not not much else I can do from here.

Share this post


Link to post
Share on other sites

If the cave one large object, it's could be that it's not the shadow LOD that's too big, but the object itself.

Share this post


Link to post
Share on other sites

There may be to much Polys when you simple copy your 1.0 LOD. When i remember correctly, it gives you errors used when the Shadow detail is to high.

Have you tried some plates, let´s say 10*10*0.5 big, and c+p them like a hull over your tunnel? A few meters must be ok for a test.

Share this post


Link to post
Share on other sites

@Max P: Now you did explain yourself, thanks so much!

@IceBone_: You might try a cell dome covering outside, think about some kind of a half blackberry cover shape (!) made by smaller overlapping flat boxes (don't forget CTRL+A, CTRL+U) if it covers enough it should kill any flickering light... try to stay under 30 m for covering panels just to be sure that drawing distance for shadow lod do not bother... if you have some issues with that thing, pm me and I will send you a working LOD, so you can see what I mean...

Saludos Saludetes !

Share this post


Link to post
Share on other sites

Thanks for all your hints on the shadow LOD. I experimented with my big box a bit, reduced it's length, width and especially the height down to 50%.

Not all of the entrance-structure is covered within the shadow lod box now, but that doesn't really matter, because players are teleported inside anyway and do not walk from the outside into the tunnel.

The results are: the flickering has gone but the player's arms and his weapon still are lit up in first person view. Solving the flickering issue was important to me, but the second point is less relevant to me at the moment.

Regards,

IceBone

Share this post


Link to post
Share on other sites

For the Player you can try to set the time into night, something like

setDate [2012, 10, 26, 22, 0]
within your teleport script. May be very bad for mp.

Share this post


Link to post
Share on other sites

A small update:

Some months ago I started this thread and in the meantime I experimented quite a lot with bunker buildings, tunnels, terrain and lighting, ai inside narrow tunnels, ...

At present I put everything together into a large bunker building on a small island, shift everything backwards in time into the World War 2 period and script an attack and defend mission around it.

There is some more information available at my website together with a video, which shows some first alpha stage impressions:

sperrwerk_video.jpg

More to come ... :bounce3:

Regards,

IceBone

Share this post


Link to post
Share on other sites

Looking good, saw this a while back, good to see your still moving along with it..:)

Share this post


Link to post
Share on other sites

Missed this until today. This looks great, it will be an excellent development of the game and add new dimensions (literally and figuratively :) ) to mission design.

Exemplary reseach IMHO. How long did it take you to make the paper (?) model of the WW I French tank, btw?

Share this post


Link to post
Share on other sites

Orcinus, there are blueprints on the web (I don't think of the detailed, technical blueprints, but of the blueprints for cutting paper pieces by numbers and sticking them together). They are not too difficult, to find.

When I saw one of them, I had to build up the FT-17 paper model.

In case, you should verify the aspect ratio x:y of the paper printout, because mine did not reflect the historical dimensions of the FT-17.

I rescaled it, to correct the ratio and also to get a bigger paper model.

Altogether it took me one evening, to finish it up. It was fun.

Regards,

IceBone

Share this post


Link to post
Share on other sites

Thanks mate, I didn't know such blueprints existed (I'm not a modeller).

Will this only work on Takistan? - personally I'm not a great fan of desert scenarios, I've always preferrred mixed terrain like Cherno & Podagorsk, & jungles like Lingor, HIP & most recently Vietnam. The latter wars involved a lot of bunkers/tunnels. Hmm, might be nice in i44 too ofc.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×