Page 1 of 1

Shadows Not Showing Up (Solved)

Posted: Sun Apr 07, 2013 3:09 pm
by Noobasaurus
Well, I created my first model in Maya, then sent it to Softimage, textured it, added a shadowvolume, then exported it to SWBF2. It shows up great, looks good, but there isn't a shadow.(the model is the plant)
Hidden/Spoiler:
Image
If you want to see my hierarchy of stuff, here it is.
Hidden/Spoiler:
Image
I've also tried renaming my shadowvolume to sv_grass_blade but that didn't work either. Adjusting the light source's angle did not do anything. I'm probably doing something wrong that's super obvious. Any help is much appreciated.

Re: Shadows Not Showing Up

Posted: Sun Apr 07, 2013 3:23 pm
by AceMastermind
Your model might be too thin for the game to generate a noticable shadow. Try shifting the light source around to see if anything emerges.

Re: Shadows Not Showing Up

Posted: Sun Apr 07, 2013 3:31 pm
by Noobasaurus
I moved the light around, nothing.
Hidden/Spoiler:
Image

Re: Shadows Not Showing Up

Posted: Sun Apr 07, 2013 3:37 pm
by AceMastermind
Export a cube with a shadowvolume using the same process you did with the grass blades and see if it works.

Re: Shadows Not Showing Up

Posted: Sun Apr 07, 2013 3:38 pm
by Cleb
To possibly confirm the proposition that the grass is too thin, you could try adding something wider (like a standard cube) temporarily to your model to see if it casts a shadow. If it does, then your model is too thin. If it doesn't, then something is wrong with your shadowvolume.

Edit: ninja'd :runaway:

Re: Shadows Not Showing Up

Posted: Sun Apr 07, 2013 4:04 pm
by Loopy53
I assume your using ZE tools right? I think thats the only exporter that works for shadow meshes. Anyhow, your shadowvolume needs to be renamed to sv_grass_blade; same as the normal visible mesh name, and then it should work. Refer to Darth Duck's making models look as good/better than pandemics tutorial for more information on shadowvolume and many other helpful topics.

Re: Shadows Not Showing Up

Posted: Sun Apr 07, 2013 4:16 pm
by Noobasaurus
Got the shadows working for the placed plants by naming the shadowvolume sv_grass_blade. Thanks guys! I also made the cube and that's what told me that it needed to be sv_whatev. I had done that before, but I don't know why it didn't work.

Now here's the problem: I used the foliage layer to place all my grass, and none of the grass placed by the foliage layer have shadows. Here's my .prp file:

Code: Select all

Layer(0)
{
    SpreadFactor(0.2);
    Mesh()
	{	
		File("grass_blade.msh", 200);
		Frequency(100);
		Scale(0.7);
		Lighting(1);
		Stiffness(0.0);
	}
}

Re: Shadows Not Showing Up

Posted: Sun Apr 07, 2013 4:22 pm
by Loopy53
Noobasaurus wrote:Got the shadows working for the placed plants by naming the shadowvolume sv_grass_blade. Thanks guys! I also made the cube and that's what told me that it needed to be sv_whatev.
:? I believe I told you to name it to sv_grass_blade one post above yours. Anyhow, glad you got it working. As for the foliage, Im not sure if swbf2 grass has shadows (I could check and see) so im not sure if it is supported, although it probably is. I didnt see anything unusual right away in the prop file other than the lighting feature. Try changing that number to 0, then make it a decimal or make it really high and see if that changes anything. I will look through the internet and see if I can find anything regarding that parameter.

Re: Shadows Not Showing Up

Posted: Sun Apr 07, 2013 4:30 pm
by Noobasaurus
Loopy53 wrote: I believe I told you to name it to sv_grass_blade one post above yours.
You posted as I was testing and I didn't refresh the page until after I got it working.
Loopy53 wrote:As for the foliage, Im not sure if swbf2 grass has shadows (I could check and see) so im not sure if it is supported, although it probably is. I didnt see anything unusual right away in the prop file other than the lighting feature. Try changing that number to 0, then make it a decimal or make it really high and see if that changes anything.
Endor is purely foliage but everything has shadows. The weird part is that Endor's .prp file does not have the "Lighting" line anywhere in it.

EDIT: Actually, no. Endor's foliage does not have shadows. They used a shadowmap and put it over the whole thing and tricked me.

Re: Shadows Not Showing Up

Posted: Sun Apr 07, 2013 4:41 pm
by Loopy53
Noobasaurus wrote:
Loopy53 wrote: I believe I told you to name it to sv_grass_blade one post above yours.
You posted as I was testing and I didn't refresh the page until after I got it working.
Ah I see. My bad. If endor is purely foliage and has shadows try removing the line altogether and see if that works. Something of interest might be the misc documentation on google sites. I didnt find anything of that particular topic on physc0fred's site, but I will keep looking. :thumbs:

Re: Shadows Not Showing Up

Posted: Sun Apr 07, 2013 5:22 pm
by Noobasaurus
My conclusion is that foliage does not have shadows. I looked at a bunch of stock maps that have different types of foliage and none of them have shadows.

This means if I want shadows on my grass I have to place it manually. :|

Re: Shadows Not Showing Up

Posted: Sun Apr 07, 2013 5:25 pm
by Loopy53
Alright then. Placing them manually wont be too hard if you have several clumps of grass together in XSI exported as one object. Good luck! :thumbs:

Re: Shadows Not Showing Up

Posted: Sun Apr 07, 2013 7:06 pm
by AceMastermind
Loopy53 wrote:...your shadowvolume needs to be renamed to sv_grass_blade; same as the normal visible mesh name, and then it should work...
A lot of objects in the SWBF2 assets use the 'shadowvolume' naming convention(ex: rep_walk_atte, imp_fly_tiebomber, geo_bldg_bunker...). It looks like this was the method originally used from the SWBF1 days but still works for SWBF2. The 'sv_' naming convention appears to be the newest method implemented by Pandemic which requires less steps and works from the naming alone.

The msh files that use the 'shadowvolume' naming convention have an additional chunk in the header when set up by the instructions provided by Pandemic. The SHVO chunk is only present when you follow this instruction prior to export:
[color=#FF8040]art_guide.doc[/color] wrote:...
2. Once created, name the shadowvolume mesh "shadowvolume". If there is more than one, name them "shadowvolume", "shadowvolume1", "shadowvolume2", etc.
3. Make the shadowvolume mesh a child of the actual mesh to which it is related.
4. Select the shadowvolume mesh.
5. In the Animate module, select Create > Parameter > New Custom Parameter.
6. In the dialogue box, rename the Parameter Name to shadowvolume. Uncheck the Animatable Characteristic Button.
...
I don't think ZETools was programmed to pull the 'shadowvolume' Custom Parameter data for producing the extra chunk which the game likely needs to recognize the shadow geometry. If you use ZETools to export just use 'sv_' naming.

Re: Shadows Not Showing Up (Solved)

Posted: Sun Apr 07, 2013 7:54 pm
by Loopy53
Ah, I see. Thanks for the info!