Effective "Render toTexture" in Blender

Hi all man! :slight_smile:

I’m trying to create a render to texture in B2.8 but I don’t know how to move.
Do you have any suggestions?
Actually, what interests me is to [follow this guide] (workflow)(https://blogs.unity3d.com/2019/02/05/create-high-quality-light-fixtures-in-unity/) to recreate light shadow for Unity3D.
How to act?
Ideas?
Tip?

Thanks for any help! :slight_smile:

A simple way to do it is to isolate your lamp object with a white background enviroment, place a equirectangular panoramic camera where the light should be (with [90, 0, 0] rotation), and render.

Some other tricks might be usefull for a better result… For example, opaque materials should be replaced by a simple black shader, while translucent materials can be turned into colored transparent ones, for speed.
Depending on the size of your light (the shadow smoothness), you might want to use depth of field with some low value.

There are plenty other tricks that you can use, depending on your needs… If you still don’t get what you need, post your lamps here for a more specific solution. :wink:

1 Like

I read through the document you linked, and though I am not a lighting expert (nor have I used any of the software cited - I breezed through a lot of it), it seems there are two stages to this process you refer to. One is making a “cookie” (Unity term) that acts as a gobo (something put in front of a light to affect its transmission) to produce better lighting, and the other is to bake the lighting into the meshes for real-time rendering.

The first part is done in an image editor, although some fancy node work with gradients and image textures may accomplish similar results.

As for the baking process, here’s an older tutorial from Blender Guru on baking textures in Cycles:

Although it is for an older version of Blender, it works in 2.8.

1 Like

Thanks for the answers guys!

The real goal is to use a pre-rendered map of the shadows of a given light, therefore, to create a bake. The workflow that Pierre Yves Donzallaz presents in his blog is the one most congenial to me and, since I have many defenseless lights in the level, making them all realtime absorbs a lot of resources. @Phil_n I’ve read the tut but it develops the bake not inside a sphere. Yesterday I tried a lot but to no avail…

The process it presents is to render shadows on a cube transformed into a sphere and use this map for cokies. The second phase is to render the development light. Unity has a feature in its interior but impractical. Not only that, creating maps is useful for creating databases for future jobs in realtime. For example, “Render to Texture” in 3dsmax is unbeatable for this type of work…

Thanks for the tips and tricks!

I tried to recreate the tutorial and the result and the one above. Very bad.

The samples are certainly low, but there is no way to adjust the internal lighting. With Eevee there are multiple reflections, with Cycle the shadow is not visible.

Tips?

Edit, I also insert the sample model in .obj to create the bake :slight_smile:

LightBulb.zip (9.7 KB)