Tutorial - Rendering A Shadow Map
Re: Tutorial - Rendering A Shadow Map
The FBO/TexSubImage message determined by the "Terrain Rendering Method" graphics setting. You want to use FBO's if you can, which is the Hardware/Direct setting.
If the track was created in the editor and you haven't changed the lighting settings, the only thing that should change is the shadows should show up. Are you sure the file is really a PGM? Some export filters will create a PPM file with a PGM extension. Try converting to greyscale before you export it.
If the track was created in the editor and you haven't changed the lighting settings, the only thing that should change is the shadows should show up. Are you sure the file is really a PGM? Some export filters will create a PPM file with a PGM extension. Try converting to greyscale before you export it.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
-
- Posts: 907
- Joined: Mon Sep 02, 2013 6:18 pm
- Team: MotoPin Racing
- Location: idaho
Re: Tutorial - Rendering A Shadow Map
Maybe its not working because Ive not done this part?
// SCALE x (RESOLUTION - 1) = LENGTH & WIDTH ---> EG. 1.6 x (1025-1) = 1638.4
I have no clue what to do there. The rest all checks out though.
// SCALE x (RESOLUTION - 1) = LENGTH & WIDTH ---> EG. 1.6 x (1025-1) = 1638.4
I have no clue what to do there. The rest all checks out though.
Re: Tutorial - Rendering A Shadow Map
If you get that wrong, the shadows will be in the wrong places. Sounds like you're not getting any shadows at all. Does the shadow map's dimensions match your terrain's dimensions?
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
-
- Posts: 907
- Joined: Mon Sep 02, 2013 6:18 pm
- Team: MotoPin Racing
- Location: idaho
Re: Tutorial - Rendering A Shadow Map
Yep, resize it to 1025x1025 which is the same size. Im kind of at a loss on this one. Ive redone it three times, the shadow picture looks right (i think) but just will no show up even after the reshade. Might just give up on this one and try on my next track.
-
- Posts: 907
- Joined: Mon Sep 02, 2013 6:18 pm
- Team: MotoPin Racing
- Location: idaho
Re: Tutorial - Rendering A Shadow Map
Re: Tutorial - Rendering A Shadow Map
I usually lighten it a bit so you can still see rut shadows
-
- Posts: 907
- Joined: Mon Sep 02, 2013 6:18 pm
- Team: MotoPin Racing
- Location: idaho
Re: Tutorial - Rendering A Shadow Map
The image should be 1025x1025, not 1024x1024. It also needs to be greyscale rather than RGB or the export filter is likely to save it as a PPM instead of a PGM.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
-
- Posts: 907
- Joined: Mon Sep 02, 2013 6:18 pm
- Team: MotoPin Racing
- Location: idaho
Re: Tutorial - Rendering A Shadow Map
I am doing 1025x1025 for sure. Also just to double/triple check when I mouse over the shadow.pgm, it says "file type PGM".
Re: Tutorial - Rendering A Shadow Map
Try opening it in a text editor and looking at the first few lines. For a 1025x1025 PGM file it should look like this:
P5
1025 1025
255
The garbled looking binary data after the header is normal.
P5
1025 1025
255
The garbled looking binary data after the header is normal.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
-
- Posts: 907
- Joined: Mon Sep 02, 2013 6:18 pm
- Team: MotoPin Racing
- Location: idaho
-
- Posts: 6614
- Joined: Fri Feb 18, 2011 6:03 pm
- Team: me
- Location: Charleston, SC
Re: Tutorial - Rendering A Shadow Map
If you would like, upload what you have and PM it to me. Ill see if I can find the problem for you.
-
- Posts: 907
- Joined: Mon Sep 02, 2013 6:18 pm
- Team: MotoPin Racing
- Location: idaho
-
- Posts: 907
- Joined: Mon Sep 02, 2013 6:18 pm
- Team: MotoPin Racing
- Location: idaho
Re: Tutorial - Rendering A Shadow Map
JLV, barrington pointed out my problem. I wish I could find someone to blame it on but my file was named shadow.pgm instead of shadows.pgm. I fixed that and they showed up. Huge thanks for all the help.
-
- Posts: 907
- Joined: Mon Sep 02, 2013 6:18 pm
- Team: MotoPin Racing
- Location: idaho