Jump to content
Sign in to follow this  
Junior Taxi

Rendering out UVW with lighting

Recommended Posts

Hi Mographers,

 

I have a challenge for you all. I'm working on a slightly oddball project that requires me to render out an animated UV map of an object. To add to the complication I also have to somehow include the lighting of the objects mesh on the render.

 

To better explain myself here's a description of an overly simplified setup. Let's pretend I have a cube with a light spinning around it and a tiled texture which has an animated positional offset. Is there a way to render out the unwrapped UVW map of the cube so the texture is only showing on the parts that are being illuminated by the spinning light?

 

Any c4d heroes out there with some insight? Is it even possible to render out an objects animated unwrapped UVW map let alone somehow include the mesh's illumination data?

 

Thanks all!

 

Chris

 

 

 

 

Share this post


Link to post
Share on other sites

Sure. That's what Render --> Bake Texture is for. You would just have to trigger it via a Python Script for every frame in the scene. The rest is irrelevant. Once you have the texture as flat images, anything you want to do can be done in compositing tools. No need to jump hoops with complicated shaders just to mask out illuminated areas in 3D.

 

Mylenium

Share this post


Link to post
Share on other sites

How can you run Bake Object via Python?
Was creating a script a while back, and got stuck trying to run Bake Object. Looked high and low and talked to a ton of people, and found nothing.

 

 

Sorry to hijack Junior Taxi

Share this post


Link to post
Share on other sites

You can address any menu command using CallCommand() from within the C4D base class. You just need to know it's ID and that may be different across versions. Not sure whether the render commands accept setting flags via PY, though. I'm still learning this stuff myself. Or did you mean something else?

 

Mylenium

Share this post


Link to post
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.

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.

Sign in to follow this  

×
×
  • Create New...