Jump to content

Instanced Lights Shadowmap Files


Recommended Posts

So I have them...few hundreds of lights instanced to points of some geometry. I'd really like them to cast some nice soft shadows and I'd really like the shadows NOT to be raytraced:)

My question is obvious but I don't have a clue what should I write after the "$" in the name of shadowmap file to automatically generate a different file for each light?

Does it look like : "shadowmap.$something.pic"?

Bow to all that wish to answer:)

Peter

Link to comment
Share on other sites

Thanks a lot, now it creates the maps but doesn't cast shadows:)

I'll play some more to find out what's wrong.

By the way...

What should I include after the dollar if there are many not instantiated lights, what is the variable for "current light" while creating shadowmaps?

Peter

Link to comment
Share on other sites

$OS should do it..

from the help:

"

To store the name of the current operator (say in the name of a Z-depth map, you want the name of the light within the filename), you can use $OS.

$OS-$F.pic

Gives filenames like: light1-1.pic, light1-2.pic, light1-3.pic, etc. Changing the name of the operator (say from "light1" to "light1wHalo") automatically updates the output filenames as well.

"

Link to comment
Share on other sites

Thanks a lot, now it creates the maps but doesn't cast shadows:)

I'll play some more to find out what's wrong.

A couple more hints:

Remember that you must turn on "Autogenerate Depth Maps" from the light you're instancing.

Also, you must assign a shadow shader - and the best way to only have a single shader assignment that knows how to index the individual shadowmaps is to use $OBJ in the shader. $OBJ is substituted with the name of the entity (object or light) to which the shader is bound.

So, often enough you'll have something like:

  `chs("/obj/$OBJ/depthmap")`

... in the Shadow Shader's Depth Map field.

Play with that for a while :)

Link to comment
Share on other sites

No problem...

This is definitely something that would be great to have as an Example in the helpcards.  What also might be nice is if you can post it :)

20948[/snapback]

I will but I have to feel more comfortable with this stuff and finish my scenes without errors.

A moment ago I was sure there have to be a separate shadowmap file for each light.

I plan on making some tutorials in the future but I have to gain more knowledge.

This software has many gotchas:)

Thanks

Peter

Link to comment
Share on other sites

There is a strange thing with pointlights and shadowmaps:

when I create a pointlight and set it up for depthmap shadows, it doesn't cast shadows in all directions.

After switching to cone light, adjusting the rotation and switching back to point, everything is allright.

With raytrace shadows pointlight behaves as expected (omni light)

That was the cause of my troubles with strange shadowmaps.

But why a pointlight works so oddly?

There is no reason to use pointlights with depthmap shadows then.

Link to comment
Share on other sites

That was the cause of my troubles with strange shadowmaps.

But why a pointlight works so oddly?

20958[/snapback]

The reason is that Mantra does not generate cubic (or raytrace panoramic) zdepth shadowmaps for Onmidirectional lights. This is quite common out there in the world of depthmap shadows for many renderers.

Link to comment
Share on other sites

The reason is that Mantra does not generate cubic  (or raytrace panoramic) zdepth shadowmaps for Onmidirectional lights. This is quite common out there in the world of depthmap shadows for many renderers.

20959[/snapback]

Thanks for explanation.

I just used max for too long:)

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.

×
×
  • Create New...