<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: light direction</title>
		<atom:link href="http://cycling74.com/forums/topic/light-direction/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/light-direction/feed</link>
		<description></description>
		<pubDate>Tue, 18 Jun 2013 17:54:49 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/light-direction/#post-38433</guid>
					<title><![CDATA[light direction]]></title>
					<link>http://cycling74.com/forums/topic/light-direction/#post-38433</link>
					<pubDate>Mon, 16 Jun 2008 14:19:25 +0000</pubDate>
					<dc:creator>Brecht</dc:creator>

					<description>
						<![CDATA[
						<p>I was looking through the forum and example patches on the subject of lighting. <br />
What I couldn&#8217;t find though was how to change the direction of the light? It always seems to point at the center of the scene, but what if I&#8217;d like to make a grid of lights and point them straight down?</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/light-direction/#post-134089</guid>
					<title><![CDATA[Re: light direction]]></title>
					<link>http://cycling74.com/forums/topic/light-direction/#post-134089</link>
					<pubDate>Mon, 16 Jun 2008 17:29:24 +0000</pubDate>
					<dc:creator>Brecht</dc:creator>

					<description>
						<![CDATA[
						<p>silly me. it&#8217;s of course coming from the light position and shining  <br />
in every direction. So then the question would be, can I make a  <br />
spotlight?</p>
<p>
On 16 Jun 2008, at 16:19, Brecht wrote:</p>
<p>><br />
> I was looking through the forum and example patches on the subject  <br />
> of lighting.<br />
> What I couldn&#8217;t find though was how to change the direction of the  <br />
> light? It always seems to point at the center of the scene, but  <br />
> what if I&#8217;d like to make a grid of lights and point them straight  <br />
> down?</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/light-direction/#post-134090</guid>
					<title><![CDATA[Re: light direction]]></title>
					<link>http://cycling74.com/forums/topic/light-direction/#post-134090</link>
					<pubDate>Mon, 16 Jun 2008 17:59:42 +0000</pubDate>
					<dc:creator>vade</dc:creator>

					<description>
						<![CDATA[
						<p>Id suggest using a shader for that. You can get the light position  from within the shader, or override it and supply a vec 3 yourself.</p>
<p>If you want a spotlight, you should be able to run :</p>
<p><a href="http://www.lighthouse3d.com/opengl/glsl/index.php?spotlight" rel="nofollow">http://www.lighthouse3d.com/opengl/glsl/index.php?spotlight</a></p>
<p>:)</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/light-direction/#post-134091</guid>
					<title><![CDATA[Re: light direction]]></title>
					<link>http://cycling74.com/forums/topic/light-direction/#post-134091</link>
					<pubDate>Mon, 16 Jun 2008 18:10:49 +0000</pubDate>
					<dc:creator>pelado</dc:creator>

					<description>
						<![CDATA[
						<p>You&#8217;ve found light_position settings in  jit.gl.render then, which sets the<br />
light position all objects in your scene.  If the last value of the setting<br />
(w) is non zero then the light source is poitional and shines in all<br />
directions with its location set by the x,y and z coordinates.  If the w<br />
value is zero, them the light is directional with xyz informing the<br />
direction.<br />
If you want to have more than one light source you need to use the<br />
glcommands of jit.gl.sketch which gives access to the gllight settings.  you<br />
can have multiple lights and the commands that specify material colouring,<br />
light position light model etc can be different for each light, with the<br />
light numbers incrementing through gllight0, gllight1 etc.  light positions<br />
are affected by transforms you make to the modelview matrix.</p>
<p>You have much more control over lighting using sketch, and yes you can also<br />
have spotlights.</p>
<p>A simple example patch is below, but you should check the red book for more<br />
about lights.</p>
<p>pelado</p>
<p>
<div><span id="toggle134091-0" class="patchtoggle" onmousedown="toggleMaxPatch('post134091-0', 'er134091-0');">&#8211; Pasted Max <span id="maxversion134091-0"></span> Patch, click to <span id="er134091-0">expand</span>. &#8211;</span> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  width="110" height="14" class="clippy" ><param name="allowScriptAccess" value="always" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param NAME="FlashVars" value="copied=copied!&#038;copyto=copy to clipboard"/><param name="bgcolor" value="#FFFFFF"/><param name="wmode" value="opaque"/><embed src="/wp-content/plugins/bbpress-copy-compressed/clippy.swf"  width="110" height="14"   name="clippy"  quality="high"  allowScriptAccess="always"  type="application/x-shockwave-flash"  pluginspage="http://www.macromedia.com/go/getflashplayer"  FlashVars="text=----------begin_max5_patcher----------%0A1415.3oc0alsbihCEF9ZmmBU9ZGWHIV6qbee%2BFLUWojAYa5FK7.xSROc0u6i%0A1v6KxDPloRhInvxQe5r7KA42uLZ77xOn0iAeA7WfQi98KiFoZR1vHy9iFul7%0AQZAoVcXiWTTx1td7D8eZSEslx3DddI6sJZJWeoBBPS8l.vQP4FOyGfu2bVDd%0A5pb1xiNCO8Yn1n2Ac34rnjwYj0TkQ70pbRQiMHLmbVAkqrO39FK2xaZEYZMO%0ASc5ky%2BwqnnwGbkqy%2BW0UFJsacy5Sm%2BqMTsEJ64D93IfwyIrkiAeWdX%2B4kWje%0ALoKgWn2iBuPOWCu3AK7dXOuPW64g8FpvyO4QgmehqgG7I.OF8cw8t4Fyoen5%0A8Bd7SP55LAN1TPRo.Ovxhh7kq3.0md.x544BLKfXn3mHwOw.3zwWGmFN5izf%0ALIts7L4h7DdAdF7n7rSQnXrIaMstFjJ5SUDAB8.uFeCBA0DR61AwIcqC2E.D%0AJzM.5j.zy64HWGpgfO%2B7TWHDw20X.MHwfy8FvCQLfvtFC9C25OvSq%2BrorNWV%0AhWT3w78Mq9bbwmnndu3CxQEejUXHKomAPoJH9D6pZO45vU8E7rCHsjUyIL9a%0ADNmx1pDaYtPTFYdA0bfGz.qrZMoPvgSOHw.krIdEgUWP3TvqvoAhKlv3l.xp%0AHR%2BCw3HXYUdV8JxFp1d1e7XiGv0N5F1TjynokaYJ.4eWekP8FuP4lvV3qfr1%0AWw6YHT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xa3oQwG2E1z%0AQSfxKI1CmHm1DRrEgT%2BVfehG53IPcRGABSlFHmNGV%2BxvuamOaOzlHlSvP%2BzC%0A%2BrkZSrwk1soHw9CE2mtnifFBcjDkmu9%2BEDyif3ncfHzgAHnOc.B1lT.Xz%2BCF%0ACsQe7IdrCWmQ38hzcdGQryed4%2Bzr9ZBC%0A-----------end_max5_patcher-----------&#038;copied=copied!&#038;;copyto=copy to clipboard"  bgcolor="#ffffff"  wmode="opaque" /> </object></div>
<div id="post134091-0" style="display:none;visibility:hidden;" >
<div class="patchtoggleInfo"><small>Copy <b>all</b> of the following text.Then, in Max, select <em>New From Clipboard</em>.</small></div>
<div class="patchtogglediv">
<pre><code id="pastedcode134091-0">----------begin_max5_patcher----------
1415.3oc0alsbihCEF9ZmmBU9ZGWHIV6qbee+FLUWojAYa5FK7.xSROc0u6i
1v6KxDPloRhInvxQe5r7KA42uLZ77xOn0iAeA7WfQi98KiFoZR1vHy9iFul7
QZAoVcXiWTTx1td7D8eZSEslx3DddI6sJZJWeoBBPS8l.vQP4FOyGfu2bVDd
5pb1xiNCO8Yn1n2Ac34rnjwYj0TkQ70pbRQiMHLmbVAkqrO39FK2xaZEYZMO
Sc5ky+wqnnwGbkqy+W0UFJsacy5Sm+qMTsEJ64D93IfwyIrkiAeWdX+4kWje
LoKgWn2iBuPOWCu3AK7dXOuPW64g8FpvyO4QgmehqgG7I.OF8cw8t4Fyoen5
8Bd7SP55LAN1TPRo.Ovxhh7kq3.0md.x544BLKfXn3mHwOw.3zwWGmFN5izf
LIts7L4h7DdAdF7n7rSQnXrIaMstFjJ5SUDAB8.uFeCBA0DR61AwIcqC2E.D
JzM.5j.zy64HWGpgfO+7TWHDw20X.MHwfy8FvCQLfvtFC9C25OvSq+rorNWV
hWT3w78Mq9bbwmnndu3CxQEejUXHKomAPoJH9D6pZO45vU8E7rCHsjUyIL9a
DNmx1pDaYtPTFYdA0bfGz.qrZMoPvgSOHw.krIdEgUWP3TvqvoAhKlv3l.x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5NaJzVaB4NaJvVaB6NaBaqM46Naxa3oQwG2E1z
QSfxKI1CmHm1DRrEgT+VfehG53IPcRGABSlFHmNGV+xvuamOaOzlHlSvP+zC
+rkZSrwk1soHw9CE2mtnifFBcjDkmu9+EDyif3ncfHzgAHnOc.B1lT.Xz+CF
CsQe7IdrCWmQ38hzcdGQryed4+zr9ZBC
-----------end_max5_patcher-----------</code></pre></div>
</div>
</p><p>
On Mon, Jun 16, 2008 at 4:19 PM, Brecht  wrote:</p>
<p>><br />
> I was looking through the forum and example patches on the subject of<br />
> lighting.<br />
> What I couldn&#8217;t find though was how to change the direction of the light?<br />
> It always seems to point at the center of the scene, but what if I&#8217;d like to<br />
> make a grid of lights and point them straight down?<br />
></p>
<p>&#8211; </p>
<p><a href="http://www.pelado.co.uk" rel="nofollow">http://www.pelado.co.uk</a></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/light-direction/#post-134092</guid>
					<title><![CDATA[Re: light direction]]></title>
					<link>http://cycling74.com/forums/topic/light-direction/#post-134092</link>
					<pubDate>Mon, 16 Jun 2008 18:18:00 +0000</pubDate>
					<dc:creator>pelado</dc:creator>

					<description>
						<![CDATA[
						<p>commands that specify material colouring, light position light model etc can<br />
be different for each light, with the light numbers incrementing through<br />
gllight0, gllight1 etc.</p>
<p>
Actually, a quick correction to the above.  There&#8217;s only one light model,<br />
you don&#8217;t set different ones for each light.</p>
<p>pelado</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/light-direction/#post-134093</guid>
					<title><![CDATA[Re: light direction]]></title>
					<link>http://cycling74.com/forums/topic/light-direction/#post-134093</link>
					<pubDate>Tue, 24 Jun 2008 22:53:04 +0000</pubDate>
					<dc:creator>Kyred</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Pelado,</p>
<p>Would it be possible to get this patcher for the 4.6/1.6.3 version ?<br />
Thank you.</p>
<p>Kyred.</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

