Page 8 of 13

Re: Tutorial - Rendering A Shadow Map

Posted: Thu Jan 02, 2014 6:53 pm
by bdownen323
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?

Re: Tutorial - Rendering A Shadow Map

Posted: Thu Jan 02, 2014 6:54 pm
by bdownen323
DP, what should I do when it gives me this error?
Image

Re: Tutorial - Rendering A Shadow Map

Posted: Thu Jan 02, 2014 11:56 pm
by jlv
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.

Re: Tutorial - Rendering A Shadow Map

Posted: Thu Jan 02, 2014 11:59 pm
by bdownen323
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.

Re: Tutorial - Rendering A Shadow Map

Posted: Fri Jan 24, 2014 4:09 pm
by wheels1758
JLV,

Can you post your shadows.pov file (the one you use in conjunction with the shell script)?

Re: Tutorial - Rendering A Shadow Map

Posted: Sat Jan 25, 2014 12:23 am
by jlv
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 }
	}
}

Re: Tutorial - Rendering A Shadow Map

Posted: Sat Jan 25, 2014 12:47 am
by wheels1758
Thank you sir.

Re: Tutorial - Rendering A Shadow Map

Posted: Sat Feb 01, 2014 8:19 am
by BETABERGGREN
Can you make a movie on youtube on that?

Re: Tutorial - Rendering A Shadow Map

Posted: Tue Feb 04, 2014 12:07 am
by wheels1758
BETABERGGREN wrote:Can you make a movie on youtube on that?
Who, on what?

Re: Tutorial - Rendering A Shadow Map

Posted: Tue Feb 04, 2014 1:17 am
by MX181
wheels1758 wrote:
BETABERGGREN wrote:Can you make a movie on youtube on that?
Who, on what?
im gueesing he wants to know how to use the script

Re: Tutorial - Rendering A Shadow Map

Posted: Tue Feb 04, 2014 3:54 pm
by wheels1758
MX181 wrote:
wheels1758 wrote:
BETABERGGREN wrote:Can you make a movie on youtube on that?
Who, on what?
im gueesing he wants to know how to use the script
That's what I mean. If he is talking about the stuff in the first post by DJ, that's one thing.

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.

Re: Tutorial - Rendering A Shadow Map

Posted: Thu Feb 06, 2014 1:46 am
by slowngreen
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

Re: Tutorial - Rendering A Shadow Map

Posted: Thu Feb 06, 2014 4:11 am
by jlv
You have to reshade the track in the editor. Put it in raise mode, submode lower only and then paint over the whole track.

Re: Tutorial - Rendering A Shadow Map

Posted: Thu Feb 06, 2014 4:19 am
by slowngreen
Oh ok thanks JLV!

Re: Tutorial - Rendering A Shadow Map

Posted: Thu Feb 06, 2014 5:32 pm
by slowngreen
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".