Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Product Chat / Shadow room discussion thread.

Author
Message
rolfy
20
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 6th Oct 2010 05:56


This thread is to answer any questions anyone might have on how the shadow room was created.
You can download the demo level here

http://newsfiles.thegamecreators.com/issue93/shadowroom.zip

I cannot answer any questions specific to the HLSL coding bond1 used in the shader itself (not my field) nor am I at liberty to distribute the shader but any questions on how the animations were created and applied are welcome.
DJ Almix
20
Years of Service
User Offline
Joined: 25th Feb 2006
Location: Freedom
Posted: 6th Oct 2010 09:42
How did you render the shadows? Plain and simple question.

What does the map look like for that in the editor?

How are the dynamic shadows placed?

Your signature has been erased by a mod because it's almost 1MB in size
seth zer0
20
Years of Service
User Offline
Joined: 22nd Apr 2006
Location: Fort Walton Beach, FL
Posted: 6th Oct 2010 09:57 Edited at: 6th Oct 2010 09:57
Through bond1's shader..

My question is can you have it where the entity's have collision or is there a reason why they don't. And by the way very nice job with the accuracy of all the shadows, must of been a pain in the butt to get them perfectly on que.

nikas
17
Years of Service
User Offline
Joined: 23rd Apr 2009
Location:
Posted: 6th Oct 2010 17:15
so let me anderstand...The shader is animated??The shadows are a shader effect that is animated in a way that it makes it look animated?

rolfy
20
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 7th Oct 2010 10:39 Edited at: 7th Oct 2010 10:42
Quote: "How did you render the shadows? Plain and simple question."

Quote: "so let me anderstand...The shader is animated?"

To answer in the simplest way, the textures are baked in the same way as for a static scene, instead of one texture image I rendered out the entire animation sequence. The scene is set up using one directional light, this light is attached to a bone and animated with a swinging motion, a skylight could be used to give the scene a little ambience if required.
I kept the animation length to 64 frames, instead of rendering the animation in the usual way, render each objects texture per frame. Take each frame and build into an 8x8 sprite.
The shader simply plays the sprite on each model and as the shader resets with a timer, keeping all objects texture maps in sequence is not a problem.
The only issue occured with the overhead swinging lamp, if this was to be a model as first intended the animated model would get out of sync with the sprite animations. I had to render a sequence of frames in the usual way with a camera placed below looking straight up at the ceiling in scene, as the shader uses alpha it was simply a case of placing this sequence on a flat plane and it looks fine as its above the players view and you never get far enough to the side to see its just a flat plane.

Quote: "My question is can you have it where the entity's have collision or is there a reason why they don't."


The shader set up could be static doing the same job but pulling light from static lighting, but in the case of the shadow room I am not sure how the additional lightmapping would have affected the scene, probably would have caused real problems so I didnt want it to be static for that.
I asked that this particular shader be dynamic and take its lighting from the ambience level so I could use it for other purposes in the meantime, simply to give me the chance to test it in other ways.
wanted to try it with alpha so animations could be placed on a plane and used in much same way as decals, if its dynamic then it can be set to rotate to always face player,nocol, spawned and destroyed etc.
Now that I have had the chance to play around with it a little would be better to have these shaders use an illumination map.
.
NinjaKiller
15
Years of Service
User Offline
Joined: 12th Aug 2010
Location: Nearby
Posted: 8th Oct 2010 01:01
That's real nice, exactly the appearance im attempting (though not doing so well)in my game.
DJ Almix
20
Years of Service
User Offline
Joined: 25th Feb 2006
Location: Freedom
Posted: 8th Oct 2010 02:03 Edited at: 8th Oct 2010 02:07
Quote: "Quote: "How did you render the shadows? Plain and simple question."
Quote: "so let me anderstand...The shader is animated?"
To answer in the simplest way, the textures are baked in the same way as for a static scene, instead of one texture image I rendered out the entire animation sequence. The scene is set up using one directional light, this light is attached to a bone and animated with a swinging motion, a skylight could be used to give the scene a little ambience if required.
I kept the animation length to 64 frames, instead of rendering the animation in the usual way, render each objects texture per frame. Take each frame and build into an 8x8 sprite.
The shader simply plays the sprite on each model and as the shader resets with a timer, keeping all objects texture maps in sequence is not a problem.
The only issue occured with the overhead swinging lamp, if this was to be a model as first intended the animated model would get out of sync with the sprite animations. I had to render a sequence of frames in the usual way with a camera placed below looking straight up at the ceiling in scene, as the shader uses alpha it was simply a case of placing this sequence on a flat plane and it looks fine as its above the players view and you never get far enough to the side to see its just a flat plane.
"


I'm guessing that you remolded the room in say, 3ds max, rendered the lights in there and gave every model a transparent texture. When each frame came out it was just a transparent image with only the shadows. Then you created a 2x2 decal with those images, for the walls and different sizes for the floors and other objects. the light was then the same light from the re-model just with a bone attached to it to and animated swing?

rolfy
20
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 8th Oct 2010 02:26 Edited at: 8th Oct 2010 02:28
No not quite, the models use only a diffuse uvw texture, no transparency,, each frame is rendered with shadows baked onto them, instead of one single diffuse each uses an 8x8 animated sprite, 64 frames of anim.
The shader simply plays each texture anim.
There are no lights in the FPSC scene.
Nomad Soul
Moderator
19
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 8th Oct 2010 02:27 Edited at: 8th Oct 2010 02:28
I must say this is very clever but it looks like a lot of work to create a special effect which can only be used in special cases. I prefer not to use effects unless they can be integrated well with the rest of the game design. I think deffered lighting would be a great thing for FPSC as its performance friendly and would significantly reduce lightmapping build times.

This demonstration is a great showcase and I'll probably try using it for smaller effects like a ceiling fan shadow rotating around a segment floor which would only require 1 texture / sprite to be animated in this way.

Having said that the shader bond1 released is only for dynamic entities so I would need to make a dynamic floor segment which would look inconsistent with the rest of the static lightmapping and probably cause collision issues for characters.

I think an animated alpha decal would probably be the way to go except you are then restricted to 16 frames again

rolfy
20
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 8th Oct 2010 02:41 Edited at: 8th Oct 2010 02:53
Personally I would prefer to bake all objects in a level before import to FPSC, for one there are more ligting options and with Max you get a LOT more control over shadows, only certain areas need dynamic shadows. Not to mention the fact that you can place an animation on something more than a mere plane it has a LOT more uses than the example I have shown, as stated the shader could easily have been static I requested it be dynamic, so I could try it for other things. Such as the impact hit for say a building below.



There is also the plus that you dont hit the 2gb limit with lightmapping during build, tbh when you create a decent pipeline its not so much work, the results speak for themselves, but each to his own I guess,I wouldn't really expect most FPSC users to do things this way, just showcasing something not seen in FPSC before.

Quote: "This demonstration is a great showcase and I'll probably try using it for smaller effects like a ceiling fan shadow rotating around a segment floor which would only require 1 texture / sprite to be animated in this way."

As I said above the model animation will not sync properly with the sprite animation, even if it starts out ok it will eventually drift, the shader resets its timer so it stays tight, without this you get major artefacts in the images. You would probably be best to use a plane for the shadow image but its much more interesting when it spills onto other 3d objects, you could use a 4x4 decal easily for that too, as you only need a quarter of the frames with a symmetrical shadow like a fan has.
Nomad Soul
Moderator
19
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 8th Oct 2010 02:53
That pic looks awesome Rolfy

Yeah I guess if you were making the entire game using texture baking the overhead wouldn't be so much and you would benefit from reduced lightmapping times.

I'd be really interested in understanding how to make the sprite shader work for static objects if this has been done / can be easily done. That would make it a lot more useful for people not rendering their environments with pre baked textures.

Seeing as bond released the dynamic version for free I doubt he would mind that information being shared.

rolfy
20
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 8th Oct 2010 03:00 Edited at: 8th Oct 2010 03:01
He did say that the shader could be either static or dynamic I asked for dynamic, the best idea for this would be a shader for static entity which uses illumination map for lighting, would be nice if the model isnt affected by any lighting in FPSC adding to the baked shadows and you have more control over how bright the entity actually is.
He has plans for this type of shader but I'll leave it up to him to say what they are.

Login to post a reply

Server time is: 2026-07-03 05:01:07
Your offset time is: 2026-07-03 05:01:07