Tutorial - Rendering A Shadow Map

DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: Tutorial - Rendering A Shadow Map

Post by DJ99X »

I'd hazard a guess that you've typed "pickup.png.png" into your statues file, when it should just be "pickup.png".
Motoboss
Posts: 1329
Joined: Wed Apr 02, 2008 10:17 pm
Location: St Louis MO
Contact:

Re: Tutorial - Rendering A Shadow Map

Post by Motoboss »

DJ,I apreciate your help

mace-x wrote:ok, i give up, fuck shadows!
tryed on an i5 460 with 4 ddr3 gb of ram and still getting out of memory, fuck this!
Ok so I decided to do just a run through to see what would happen...I deleted all the errors POV came up with to see if I could get some sort of render (I dont know if this would work or not )

Then when it finished it said the same thing that Mace got.
Appreciate my hard work? Buy me a beer,
https://www.paypal.me/Motoboss
Check out my Facebook Page
My YouTube Channel - https://www.youtube.com/channel/UCR5gAn ... z59ykqiKyA
Motoboss
Posts: 1329
Joined: Wed Apr 02, 2008 10:17 pm
Location: St Louis MO
Contact:

Re: Tutorial - Rendering A Shadow Map

Post by Motoboss »

It says -

"Parse error:Out of memmory. Cannot allocate 8192 bytes for PNG image line."
Appreciate my hard work? Buy me a beer,
https://www.paypal.me/Motoboss
Check out my Facebook Page
My YouTube Channel - https://www.youtube.com/channel/UCR5gAn ... z59ykqiKyA
yFMX
Posts: 318
Joined: Fri May 30, 2008 9:19 pm
Team: Privateer
Location: France

Re: Tutorial - Rendering A Shadow Map

Post by yFMX »

Try rendering your shadows with like only half of the statues, then render the shadows of the other half. Then merge the 2 shadow maps with PS.
Image
DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: Tutorial - Rendering A Shadow Map

Post by DJ99X »

Is that using the file I posted in step 4? I only ever got memory issues if I used the tree .inc files, but Im pretty sure I removed them from the files I posted
Motoboss
Posts: 1329
Joined: Wed Apr 02, 2008 10:17 pm
Location: St Louis MO
Contact:

Re: Tutorial - Rendering A Shadow Map

Post by Motoboss »

@ DJ
Ya I used the shadow file .

@ yFMX
I tried your idea and it still came up with the same thing


:(
Appreciate my hard work? Buy me a beer,
https://www.paypal.me/Motoboss
Check out my Facebook Page
My YouTube Channel - https://www.youtube.com/channel/UCR5gAn ... z59ykqiKyA
yFMX
Posts: 318
Joined: Fri May 30, 2008 9:19 pm
Team: Privateer
Location: France

Re: Tutorial - Rendering A Shadow Map

Post by yFMX »

I know I had to split the statue file into 4 parts to render shadows on Beaumont MX to avoid the out of memory error. So if you only tried with half the statues that might not be enough.
Image
Motoboss
Posts: 1329
Joined: Wed Apr 02, 2008 10:17 pm
Location: St Louis MO
Contact:

Re: Tutorial - Rendering A Shadow Map

Post by Motoboss »

Ok Ill try again,
FYI -When I erased the statue lines POV RAY still came up with the same amount of bytes

I just erase the statue lines in my track folder then render the track pov right?
Appreciate my hard work? Buy me a beer,
https://www.paypal.me/Motoboss
Check out my Facebook Page
My YouTube Channel - https://www.youtube.com/channel/UCR5gAn ... z59ykqiKyA
jlv
Site Admin
Posts: 14965
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Tutorial - Rendering A Shadow Map

Post by jlv »

I don't know if this is much help, but here's the shadows.pov file I used for the Stewart compound. You'll need to copy your "track.pov" to "trackstripped.pov" and remove the stuff that you don't need shadows for.

The nice thing about it is you can make semi-decent shadows for billboards using macros like this:

#macro _birch()
billboard(30,1,"jbsc/billboard/birch.png")
#end

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 (1)
light_source {
	< 1.0, 1.66, -1.0 > * 10000, color White * 1000
	parallel
	point_at <0, 0, 0>
}
#else
light_source { < LIGHTX, LIGHTY, LIGHTZ >, color White * 1000 }
#end


#ifdef (DIM)
#declare WIDTH = DIM;
#declare LENGTH = DIM;
#else
#declare WIDTH = 2049;
#declare LENGTH = 2049;
#end
 
#ifndef (SCALE)
#declare SCALE = 0.9;
#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);

#declare billboardmesh = mesh2 {
	vertex_vectors {
		8
		<-.5,1,0>,
		<.5,1,0>,
		<.5,0,0>,
		<-.5,0,0>,
		<0,1,-.5>,
		<0,1,.5>,
		<0,0,.5>,
		<0,0,-.5>,
	}
	normal_vectors {
		8
		<0,0,-1>,
		<0,0,-1>,
		<0,0,-1>,
		<0,0,-1>,
		<0,0,-1>,
		<0,0,-1>,
		<0,0,-1>,
		<0,0,-1>,
	}
	uv_vectors {
		8
		<0,0>,
		<1,0>,
		<1,1>,
		<0,1>,
		<0,0>,
		<1,0>,
		<1,1>,
		<0,1>,
	}
	face_indices {
		8
		<0,1,3>,
		<1,2,3>,
		<3,1,0>,
		<3,2,1>,
		<4,5,7>
		<5,6,7>
		<7,5,4>
		<7,6,5>
	}
}

#macro billboard(bbsize,bbaspect,bbtexture)
	union {
		object {
			billboardmesh
			rotate <0,45,0>
		}
		billboardmesh
	}
	texture { uv_mapping pigment { image_map { png bbtexture} } scale <1,-1,1> }
	scale <bbsize*bbaspect,bbsize,bbsize*bbaspect>
#end

#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 _2girls1()
	hidden()
#end

#macro _2guys()
	hidden()
#end

#macro _2men()
	hidden()
#end

#macro _2women()
	hidden()
#end

#macro _blonde()
	hidden()
#end

#macro _girl2()
	hidden()
#end

#macro _guy1()
	hidden()
#end

#macro _guy2()
	hidden()
#end

#macro _guy3()
	hidden()
#end


#macro _birch()
	billboard(30,1,"jbsc/billboard/birch.png")
#end

#macro _bush()
	hidden()
#end

#macro _cypress()
	billboard(51,1,"jbsc/billboard/cypress.png")
#end

#macro _flowers()
	hidden()
#end

#macro _orangetree()
	billboard(61,1,"jbsc/billboard/orangetree.png")
#end

#macro _ot2()
	billboard(51,1,"jbsc/billboard/ot2.png")
#end

#macro _ot3()
	billboard(41,1,"jbsc/billboard/ot3.png")
#end

#macro _palm()
	billboard(61,1,"jbsc/billboard/palm.png")
#end

#macro _palm2()
	billboard(51,1,"jbsc/billboard/palm2.png")
#end

#macro _palm3()
	billboard(51,1,"jbsc/billboard/palm3.png")
#end

#macro _palm4()
	billboard(51,1,"jbsc/billboard/palm4.png")
#end

#macro _palm5()
	billboard(61,1,"jbsc/billboard/palm5.png")
#end

#macro _plant()
	hidden()
#end

#macro _plant2()
	hidden()
#end

#macro _tree1()
	billboard(61,1,"jbsc/billboard/tree1.png")
#end

#macro _tree2()
	billboard(48,1,"jbsc/billboard/tree2.png")
#end

#macro _trees()
	billboard(81,1,"jbsc/billboard/trees.png")
#end

#macro _treetex2()
	billboard(61,1,"jbsc/billboard/treetex2.png")
#end

#macro _weed()
	hidden()
#end

#macro _weed2()
	hidden()
#end

#macro _weed4()
	hidden()
#end

#macro _weeds()
	hidden()
#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.
22Ryann
Posts: 254
Joined: Sat Jul 09, 2011 9:44 am
Team: Thrashedkids

Re: Tutorial - Rendering A Shadow Map

Post by 22Ryann »

why doesnt anyone use 3d studio max to create shadow maps?
Motoboss
Posts: 1329
Joined: Wed Apr 02, 2008 10:17 pm
Location: St Louis MO
Contact:

Re: Tutorial - Rendering A Shadow Map

Post by Motoboss »

22Ryann wrote:why doesnt anyone use 3d studio max to create shadow maps?
Because not everyone knows the programs.

Sorry jlv I have no clue what your talking about ,rendering shadows should not be this hard :cry:
Appreciate my hard work? Buy me a beer,
https://www.paypal.me/Motoboss
Check out my Facebook Page
My YouTube Channel - https://www.youtube.com/channel/UCR5gAn ... z59ykqiKyA
DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: Tutorial - Rendering A Shadow Map

Post by DJ99X »

22Ryann wrote:why doesnt anyone use 3d studio max to create shadow maps?
That would require placing all of the objects in 3ds. Which would suck
22Ryann
Posts: 254
Joined: Sat Jul 09, 2011 9:44 am
Team: Thrashedkids

Re: Tutorial - Rendering A Shadow Map

Post by 22Ryann »

well i think im going to speak with the TD guys, and JLV about this, as those guys could use co-ordinate settings from mcm2 tracks to lay them out in 3dsmax using specialised plugins they made... im sure it wouldnt be that difficult to change this process slightly to work with mxs,

whats the terrain size in mxs?
DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: Tutorial - Rendering A Shadow Map

Post by DJ99X »

It varies. The disp maps are generally 1025x1025 or 2049x2049 in resolution. But the actual scale has infinite options
warrior462
Posts: 369
Joined: Thu May 06, 2010 10:51 pm

Re: Tutorial - Rendering A Shadow Map

Post by warrior462 »

giopanda wrote:well it is for me..and i never been able to go past the missing startgate.ppm file!
This is where I'm stuck. I tried replacing ppm "startgate.ppm" with png "dummy.png" in the track.pov file which came up when I ran the shadows file in povray. I put the dummy image in my trackfolder (just to be sure), and in the trackfolder in the new folder I created to render the shadows. It comes up with Parse Error: Cannot open PNG file at the first line where I have dummy.png. Any help would be really nice, this seems like too much of a pain in the butt.
Post Reply