Jump to content

Projection light


AggrorJorn
 Share

Recommended Posts

File Name: Projection light

File Submitter: Aggror

File Submitted: 27 Dec 2009

File Updated: 27 Dec 2009

File Category: Lua Scripts

 

This spot light lets you choose a projector map via an extra menu. By default it display the leadwerks logo.

 

The material file contains this line:

texture0="abstract::projectormap.dds"

 

 

Click here to download this file

 

post-45-070085000 1287254892_thumb.jpg

Link to comment
Share on other sites

  • 9 months later...

File Name: Projection light

File Submitter: Aggror

File Submitted: 27 Dec 2009

File Updated: 27 Dec 2009

File Category: Lua Scripts

 

A simple Spotlight that projects a projection-map.

 

Usage:

  1. Place files with the other light (not neccesary.)
  2. Use your own dds file for the projector-map.dss.
  3. Drag a projector spotlight on screen.

 

Click here to download this file

The link is broken :D

i put a watch on this topic, just in case you come back

Windows 7 home - 32 bits

Intel Quad Q6600 - nVidia GTX 460 1GB - 2 GB RAM

Link to comment
Share on other sites

this 'projection light' isn't really nessecary any more since the point light supports a material file which can display the dds file you want.

Thank you, i had no idea how to do this.

following your suggestion i found an example in the wiki

TEntity light  = CreatePointLight(15,0);
MoveEntity   (light,  Vec3(0,5,0) );
SetShadowSoftness(light,2);
SetShadowmapSize(light,512);

TMaterial lightMaterial = CreateMaterial();
SetMaterialTexture(lightMaterial, LoadTexture("abstract::flashlight.dds"));
PaintEntity(light,lightMaterial);

i'll try it this evening :D

Windows 7 home - 32 bits

Intel Quad Q6600 - nVidia GTX 460 1GB - 2 GB RAM

Link to comment
Share on other sites

You don't have to make any script at all since the spotlight that comes with Leadwerks can do this for you already. :)

Just drag a spotlight in the scene en go to its properties. There you can choose a material file. Use an image that you want like bars of a window for example.

 

However if you still want to make it via your own scripts, just let me know. I''ll gladly help you out.

Link to comment
Share on other sites

You don't have to make any script at all since the spotlight that comes with Leadwerks can do this for you already. :)

Just drag a spotlight in the scene en go to its properties. There you can choose a material file. Use an image that you want like bars of a window for example.

 

However if you still want to make it via your own scripts, just let me know. I''ll gladly help you out.

Thank you Aggor, it's a relief to know you'r arround to provide help when we need it.

 

I have another related question. Maybe there is a way to specify the spotlight should only cast light on specified entities ?

 

if not, then i'm not sure how to do it. perhaps, disabling all entities and lights i don't want, do a renderlight with only the spotlight and wanted entities, then re-enable everything and let framework render the world ?

Windows 7 home - 32 bits

Intel Quad Q6600 - nVidia GTX 460 1GB - 2 GB RAM

Link to comment
Share on other sites

You don't have to make any script at all since the spotlight that comes with Leadwerks can do this for you already. :D

Just drag a spotlight in the scene en go to its properties. There you can choose a material file. Use an image that you want like bars of a window for example.

 

However if you still want to make it via your own scripts, just let me know. I''ll gladly help you out.

Hi Aggror,

i tryed with the editor, but when i set my selector mat file nothing happens, my selector.dds is not projected.

and if i go back to the light properties later the material property is not kept and empty again.

 

here's my material and dds selector.zip

 

and a screenshot

post-44-074695000 1287249671_thumb.jpg

Windows 7 home - 32 bits

Intel Quad Q6600 - nVidia GTX 460 1GB - 2 GB RAM

Link to comment
Share on other sites

The Spot light script that comes with LE does not inherently paint the light with the material selected. The material selected is applied to the default gmf model. So just add a new property to allow you to do this, like in this example:

 

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...