Tutorial - Rendering A Shadow Map
-
- Posts: 2949
- Joined: Mon Nov 28, 2011 11:00 pm
Re: Tutorial - Rendering A Shadow Map
When I go to render out the shadows it saves the shadows file as shadows.png in my shadows folder. But when I open it up in ps and save it as a pgm image it says "error reading shadows" ingame. I have the shadows set to 2049x2049 just like the terrain. Any ideas?
-
- Posts: 2949
- Joined: Mon Nov 28, 2011 11:00 pm
Re: Tutorial - Rendering A Shadow Map
DP, what should I do when it gives me this error?
Re: Tutorial - Rendering A Shadow Map
When you save the pgm file, try converting to greyscale first. It might be saving a ppm file with a .pgm extension.
Not sure what the POV warning is about.
Not sure what the POV warning is about.
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: 2949
- Joined: Mon Nov 28, 2011 11:00 pm
Re: Tutorial - Rendering A Shadow Map
I figured out the saving issue. I didn't realize I had to save it as a portable bitmap and make a pgm extension. I was trying to do a regular bitmap image with pgm extension. I'm still trying to figure out the pov issue.
-
- Posts: 4132
- Joined: Tue Oct 21, 2008 5:20 pm
- Location: Washington, USA
- Contact:
Re: Tutorial - Rendering A Shadow Map
JLV,
Can you post your shadows.pov file (the one you use in conjunction with the shell script)?
Can you post your shadows.pov file (the one you use in conjunction with the shell script)?
Re: Tutorial - Rendering A Shadow Map
Here it is:
Code: Select all
#include "colors.inc"
#include "rand.inc"
background {rgb <0.95,0.95,0.9>}
global_settings { ambient_light rgb <0.0, 0.0, 0.0> }
#if (0)
light_source {
< -0.5, 1.0, -1.0 > * 10000, color White * 1000
parallel
point_at <0, 0, 0>
}
#end
light_source { < LIGHTX, LIGHTY, LIGHTZ >, color White * 1000 }
#ifdef (DIM)
#declare WIDTH = DIM;
#declare LENGTH = DIM;
#else
#declare WIDTH = 1025;
#declare LENGTH = 1025;
#end
#ifndef (SCALE)
#declare SCALE = 0.625;
#end
camera { orthographic location <(WIDTH/2.0-0.5)*SCALE, 1000, (LENGTH/2-0.5)*SCALE>
right <-WIDTH*SCALE, 0, 0> up <0, 0, -LENGTH*SCALE>
look_at <(WIDTH/2.0-0.5)*SCALE, 0, (LENGTH/2-0.5)*SCALE> }
#declare rangle = seed(0);
#macro person()
cylinder {
<0.0, 0.0, 0.0>, <0.0, 5.0, 0.0>, 0.75
}
#end
#macro hidden()
cylinder {
<0.0, 0.0, 0.0>, <0.0, 5.0, 0.0>, 0.75
no_shadow
}
#end
#macro _light()
hidden()
#end
#macro _30sec_30()
hidden()
#end
#macro _30sec_turn()
hidden()
#end
#macro _30sec_5()
hidden()
#end
#macro _30sec_run()
hidden()
#end
#macro _30sec_done()
hidden()
#end
#macro roost()
hidden()
#end
#macro finish_green()
person()
#end
#macro finish_crossed()
person()
#end
#macro finish_white()
person()
#end
#macro checkerwave()
person()
#end
#macro flagger_resting()
person()
#end
#macro flagger_waving()
person()
#end
#macro guy01()
person()
#end
#macro guy02()
person()
#end
#macro guy03()
person()
#end
#macro guy04()
person()
#end
#macro guy05()
person()
#end
#macro guy06()
person()
#end
#macro girl01()
person()
#end
#macro _triplight_green()
hidden()
#end
#macro _phathry()
person()
#end
#macro _sweendoggy()
person()
#end
#include "trackstripped.pov"
object {
statues
texture {
pigment { color rgb <0.0, 0.0, 1.0> }
finish { diffuse 1.0 }
}
no_image
}
object {
billboards
texture {
pigment { color rgb <0.0, 0.0, 1.0> }
finish { diffuse 1.0 }
}
no_image
}
object {
ground
texture {
pigment { color rgb <1.0, 1.0, 1.0> }
finish { diffuse 1.0 }
}
}
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: 4132
- Joined: Tue Oct 21, 2008 5:20 pm
- Location: Washington, USA
- Contact:
-
- Posts: 25
- Joined: Fri Jan 10, 2014 7:04 pm
- Team: Privateer
-
- Posts: 4132
- Joined: Tue Oct 21, 2008 5:20 pm
- Location: Washington, USA
- Contact:
Re: Tutorial - Rendering A Shadow Map
Who, on what?BETABERGGREN wrote:Can you make a movie on youtube on that?
Re: Tutorial - Rendering A Shadow Map
im gueesing he wants to know how to use the scriptwheels1758 wrote:Who, on what?BETABERGGREN wrote:Can you make a movie on youtube on that?
-
- Posts: 4132
- Joined: Tue Oct 21, 2008 5:20 pm
- Location: Washington, USA
- Contact:
Re: Tutorial - Rendering A Shadow Map
That's what I mean. If he is talking about the stuff in the first post by DJ, that's one thing.MX181 wrote:im gueesing he wants to know how to use the scriptwheels1758 wrote:Who, on what?BETABERGGREN wrote:Can you make a movie on youtube on that?
If he doesn't know how to use the script(s) JLV posted, he's probably not running linux, so it is a bit of a moot point.
-
- Posts: 907
- Joined: Mon Sep 02, 2013 6:18 pm
- Team: MotoPin Racing
- Location: idaho
Re: Tutorial - Rendering A Shadow Map
Dont think its been asked....soooo...
Ive done everything and put the resized shadow.pgm into my track folder but no shadows show up and it says this across the top of the screen,
Texture rendering with framebuffer objects
Ive done everything and put the resized shadow.pgm into my track folder but no shadows show up and it says this across the top of the screen,
Texture rendering with framebuffer objects
Re: Tutorial - Rendering A Shadow Map
You have to reshade the track in the editor. Put it in raise mode, submode lower only and then paint over the whole track.
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: 907
- Joined: Mon Sep 02, 2013 6:18 pm
- Team: MotoPin Racing
- Location: idaho
Re: Tutorial - Rendering A Shadow Map
Didnt work? Shouldnt the map change/lighten in color if its refreshed right? I tried JLV's way and also tried smoothing the entire map and nothing has changed (yes I save it and restart). Only difference is now it says at the top "rendering with textsubimage".