Stencil shadows, Bump mapping, Static entities and scripting

Post topics regarding Level Building/Design and Entity Usage with Reality Factory
Post Reply
User avatar
Tabulanis
Posts: 111
Joined: Mon Jan 30, 2006 5:01 pm
Contact:

Stencil shadows, Bump mapping, Static entities and scripting

Post by Tabulanis »

Hello I am new to RF but have a few years exp un game/level design.
Looking at the capacity and potential in this engine I was extreamly pleased to see all of these features. I just couldn't belive in a free tool all this was available.

I just started building a demo in RF and have a few problems.

I have read alot of things about stencil shadows but I cannot get them to work no matter what I try. I have them on in the tests, I have the player set as "Stencil shadows True" Nothing works. They worked in the "Shadow Demo" But I cant even find that online any more.
Will they work on static entities? I would like to do these on all SE's in the level but I can't seem to get them to work at all. I have read hours of posts and gone through all the help docs. I found one bit of info I couldn't make out at all in the RF faq that says;

"to enable stencil shadows you have to call
geEngine_SetStencilShadowsEnable(geEngine *Engine, geBoolean Enable, int NumLights, geFloat r, geFloat g, geFloat b, geFloat a)
and for each actor you want to cast shadows
geActor_SetStencilShadow(geActor *A, geBoolean DoStencilShadow)

sorry, totally forgot to mention that you need an additional entry in the menu.ini file to be able to turn on/off the stencil shadows from the menu

to the video options menu add"

What does that mean and where would I find these settings?
I have a radeon 9600 and it runs damn near everything I put to it so I dont think it is the problem but in these forums it seems every one knows how to do this and I must have some sort of hardware issue.
Also what are ProjectedShadows? How do I make them work?


Also bump mapping in BSP geometry...

Read all about it, saw one post about it not working and no real answer to it. I have put into the map texttures with the names BM0_con, BMB_con etc. Man it really doesn't work. Tried it in a simplified map to make sure I didn't have a problem with my geometry touching and still doesn't work. Thats not a huge deal for me becuase I will be using main;y static ents but it seems that there is very little help as far as how that works and why it's not working. It's bit unclear as far as what to d. Do you use RFpak to put the textures in. (I assume but in the manuel it just talks about actors not level geom).

About static meshes.....
ok so after some time I got them working.

Q. Can one mesh have many textures applied? Like if I make a city and all the walls have different textures and I used a multisub style method to have seceral textures mapped onto it? I use alot of texbaking in my designs to get nice lighting but 1 texture per large mesh gets a bit blocky. So I break them up. Also can you save a light map into an ACT file? I would like to multi map the mesh and apply a nice big light map to the final product using uv channel 2.

Q. Can Static meshes cast shadows onto BSP geom? If so how?

Q. Can fog lights work for static meshes? Fog lights rock but they just dont seem to work for them.

A question about fixed cam
Can it track the player? How?

If I could get some help Id realy apreciate it I need to have this demo up and running yesterday and it's going way to slow with me doing the trial and error level building.

Thanks.
hike1
RF FAQ-Keeper
Posts: 607
Joined: Tue Jul 05, 2005 4:19 am
Contact:

Post by hike1 »

Too many questions!

Check the new asylum demo, asylum.rar
http://terrymorgan.net/asylum.htm

RF FAQ http://terrymorgan.net/rffaq.zip
stencil stuff there



Demos at http://terrymorgan.net/download.htm

Apparently stencils don't work in RF075. I've never gotten
EMBM 'BM0_' brush bumpmapping to work.

I've got 1 (1) .act file to display DOT3 bumpmapping, 1 side of a cube, failed
at 10 or more others.
hike1
RF FAQ-Keeper
Posts: 607
Joined: Tue Jul 05, 2005 4:19 am
Contact:

Post by hike1 »

Stencil shadows do work in 075, you can enable them in
asylum.rar by going to options/video and checking
' stencils' box. Then if you open up the levels, at
http://terrymorgan.net/download.htm you can make the
entities use stencils, then recompile the level.

for pawns, edit the pawn.ini to

stencilshadows=true

for each pawn.

a pic (a lot depends on where the light is positioned)

http://hosted.filefront.com/hike1

stencil.jpg

They look pretty good, I'll have to test how bad a hit they
are to the frame rate
Veleran
Posts: 900
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Shadows alpha

Post by Veleran »

As it is now the framerate hit when using Stencil shadows is high to me,and i could use the projected shadows instead if they had alpha.
Why the projected cant have alpha?

Stencil shadow of max 8 means that one actor may have 8 shadows and the rest actors could have none?
Cant all actors have one stencil shadow each?
User avatar
Tabulanis
Posts: 111
Joined: Mon Jan 30, 2006 5:01 pm
Contact:

Edit the pawn.ini

Post by Tabulanis »

ok but do I put this line in? It doesn't seem to be there, can anyone just write a "Well here is what you do.." Type answer? I mean theoreticly if they do fucnction then there is a method to get them to work in any game, what is it?
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Hi...

About that your EMBM bumpmapping to brushes thingie. I got it working by adding those textures (BM0_ , BMB_ and BMS_) to my .txl file with rfPack and enabling the use of multiple textures in the d3d24.ini file.

d3d24.ini can be found in the folder of realityfactory.exe. Just change the line "ExtraTextures" to 1.
Pain is only psychological.
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams »

I have read hours of posts and gone through all the help docs. I found one bit of info I couldn't make out at all in the RF faq that says;

"to enable stencil shadows you have to call
geEngine_SetStencilShadowsEnable(geEngine *Engine, geBoolean Enable, int NumLights, geFloat r, geFloat g, geFloat b, geFloat a)
and for each actor you want to cast shadows
geActor_SetStencilShadow(geActor *A, geBoolean DoStencilShadow)

sorry, totally forgot to mention that you need an additional entry in the menu.ini file to be able to turn on/off the stencil shadows from the menu

to the video options menu add"

What does that mean and where would I find these settings?
If you would have read the next part in the FAQ you would have found the answer to your question... the above information is just for programmers who wish to use genesis3d in their own projects

you need an additional entry in the menu.ini file to be able to turn on/off the stencil shadows from the menu

to the video options menu add

; define Shadow Box
; format : screen_X screen_Y image# width height image_X image_Y mouseover_X mouseover_Y set_X set_Y Animation# AnimationOver# AnimationSet#

shadowbox=100 352 1 19 19 38 85 19 85 0 85 -1 -1 -1


; define Shadow text
; format : screen_X screen_Y font

shadowtext=150 354 FONT10

to change the default text "Enable Stencil Shadows" add
vshadowtext=your text

To control the alpha and color of the stencil shadows and the maximum number of lights that cast shadows there are some new entries in the EnvironmentSetup entity:
SShadowsAlpha -e.g. 200
SShadowsColor - e.g. 0 0 0 all black
SShadowsMaxLightToUse - 8 is the maximum

to enable stencil shadows for pawns add
stencilshadows=true
to the pawn definition in the pawn.ini file

other entities have a UseStencilShadows option which must be set to true
Also what are ProjectedShadows? How do I make them work?

projected shadows are the actor geometry projected on a flat plane
to make them work set UseProjectedShadows to true in the entity dialog
Q. Can one mesh have many textures applied?
yes, like any other actor
Also can you save a light map into an ACT file?
no
Q. Can Static meshes cast shadows onto BSP geom? If so how?
no
Q. Can fog lights work for static meshes?
no
A question about fixed cam
Can it track the player?

yes
How?
scripting
User avatar
ZenBudha
Posts: 285
Joined: Wed Aug 17, 2005 6:06 am
Contact:

Post by ZenBudha »

As far as bumpmapping goes the deal is it works but it works poorly. Not because of the bumpmap code but I think it has to do with some of the original lightmap code of the Genesis engine.

Basically anything more than some surface imperfections, and you will get weird black spots all over your textures, and without a dynamic light moving around you can't tell anything is bumpmapped.

Basically it's a style of bumpmapping that IMHO is better faked by simply drawing the imperfections into the texture. So if you want a scratched up metal surface you paint a scratched up metal surface.

As well the style of bumpmapping is only noticed on unsimiliar textures. For example you have a texture with rivets that you apply a bumpmap to in order to make the rivets stand out. You'll get the little black spots depending on lighting conditions and the rivets will look no better than they did before.
Where if you take the rivet bumpmap and apply it to a texture that say for example looks like a plain metal sheet it will look somewhat like it has little rivet bumps in the metal.

However your using 3 textures to achieve it when the little bumps that the bumpmap create could be simply painted into the original texture.

Of course the little black spots are from the lighting code. The bumpmapping technically works fine. People just try to use it like Normal mapping or something. I've used other engines with EMBM bumpmapping and the results were the same without the little black spots. An effect that can easily be faked by having the imperfections painted into the texture.

Which is why in most every screenshot I've ever posted especially my newer ones as my texturing ability has gotten better. Looks like they have EMBM but do not. It looks like it has EMBM in game when your moving around as well.

However it takes a lot of lighting and level layout prior to texture work to get it right. Or when I say right I mean perfect. It generally looks pretty decent anyway.
Fear not the textures for the almighty stylus is with thee - Book of Zen
User avatar
Tabulanis
Posts: 111
Joined: Mon Jan 30, 2006 5:01 pm
Contact:

I agree

Post by Tabulanis »

Yes I have moved away from the idea of bump mapping. I still cannot get shadows working. I have all the settings on and the button checked in my menu but still no shadows.

For now I'l just forget about it. Too much els still to do.
Post Reply