Notifications
Clear all

[Closed] Bake and cut geometry at shadows

Hi

There was a tool i saw years ago that I cant find now which cut geometry along the shadow/light “edge”. There is a tool in Maya, ( although again i cant remember the name of it ) which cuts geo in based on contrast in a supplied image.

Is there a tool for this in Max? Is there one that is purchasable? Does anyone know of a script that does this?

Cheers

12 Replies
1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

it’s not hard to do without any script:

apply a Flatten map using the Unwrap_UVW

render to texture using ShadowsMap BakeElement

– if you need to contrast the result use the ColorCorrection textureMap

use this texture/texturemap as select volume in the VolumeSelect modifier

delete selected using the DeleteMesh modifier for example

cheers for the suggestion but thats not what i was after, it will select any faces it deems to have a shadow on it but will not cut that face at the point that the shadow finishes

Wasn’t it autodesk lightscape or something like that that used to do this?

Here is a bit of a tricky way to do this without scripting, of course this process can be automated using a script.

[ol]
[li]Select the object you want to cut and add a vertex paint modifier to it.
[/li][li]Go to the ‘Assign vertex colors’ rollout in the vertex color modify panel, and set the Light mode to ‘Lighting only’. Check the ‘Shadows’ checkbox in the Rendering options and hit the ‘Assign’ button. This should bake your lighting and shadows into the vertex color channel.
[/li][li]Optionally you can blur the map to get a smoother result.
[/li][li]Add a ‘UVW Mapping’ modifier and set the Mapping to ‘XYZ to UVW’.
[/li][li]Add an XForm modifier and in it’s Gizmo subobject level, scale the object to zero.
[/li][li]Add a volume select modifier and set it to Vertex mode. Set the ‘Select by’ mode to ‘Texture map’. Set the texture map channel to ‘vetrex color’ and add a vertex color map to the map slot.
[/li][li]Add another XFrom modifier and in Gizmo subobject level, drag it up 100 units.
[/li][li]Add a Mesh select modifier to deselect the current selection.
[/li][li]Add a Slice modifier and in it’s subobject level, move it up at the amount you want to delete shadows. So for instance if you want to delete dark areas that are up to 50%, move the slice plane to height 50, if you want to delete only the complete black areas, move it to height 1, etc…
[/li][li]Set the Slice type to ‘Remove Bottom’
[/li][li]Open the ‘Channel info’ tool and select channel 1 from the list. Hit the copy button. Select the mesh / poly channel (the first one from the top) and hit the paste button.
[/li][/ol]
This should do the trick

Heh. I wanted a tool to do this years ago. Cut the geometry around the edges of a shadow and fill the inside with darker vertex colours. You used to see it quite often in PS2 and N64 games.

I never did find one.

TzMtN, I don’t think that what you’re describing is what the original question is asking.

1 Reply
(@matanh)
Joined: 11 months ago

Posts: 0

Why not, it cuts around the shadow edges?

Blast from the past Max’s radiosity had a feature where it would automatically subdiv geometry to add extra details based on lighting conditions: http://docs.autodesk.com/3DSMAX/15/ENU/3ds-Max-Help/index.html?url=files/GUID-159913A5-0779-4E4B-8479-0BF5BE6626D6.htm,topicNumber=d30e425478

Yes but it still doesn’t actually cut the geometry just along the shadow edges, it subdivides it uniformly in those areas so you end up with FAR too much geometry. It was avoiding this that i was after.

I’m not seeing how you get the edges of a cast shadow. vertex colours are very low definition. So a box with no subdivisions with a teapot in would have 0 dark verts. If on the other hand you manually cut around the teapot edges from the light perspective you’d get a perfect cut.

MattRennie, I think you might be right, its so long ago i cant even remember the UI and didnt recognize it when looking for videos, unfortunately it seem that it was retired in 2003

MatanH, I shall try your steps to see the result, im not sure i can visualize right at the moment

jonadb, i have never got good results with radiosity but also didnt think on trying it again

Thanks for all the suggestions i shall have ago at them

Dave

Here is a screen capture to show what I meant:
http://vimeo.com/64229166

Page 1 / 2