View topic - How to apply a glow texture in YafaRay?

How to apply a glow texture in YafaRay?

General discussion on lighting, backgrounds, Global Illumination, rendering parameters and tonnemapping.

How to apply a glow texture in YafaRay?

Post Tue Sep 26, 2017 4:06 pm

I'm trying to get a texture glow effect in YafaRay. The closest I got was layering the texture on top of another texture in the same material and setting the blend mode to either Add or Screen, but the problem is that it doesn't emit any light. Setting the emit property in the material doesn't work because that will cause the glow texture itself to show up in the render and I want it to just emit light and not actually show up when rendering.
while windows sucks;do rm windows;pacman -S linux;done
User avatar
pouar
 
Posts: 5
Joined: Tue Sep 26, 2017 3:50 pm

Re: How to apply a glow texture in YafaRay?

Post Fri Sep 29, 2017 7:55 am

there are only one way in YafaRay to get textured-based light emission, in fact this is a pending issue for future versions of YafaRay. The solution is using emit control in a shiny diffuse material with a diffuse texture in Path tracing. For instance, mesh light with a texture won't take the later into account when emiting light. The feature is explained in the last part of the article below:
http://www.yafaray.org/documentation/us ... ffusecolor

The thing is that emit + texture only works as light source in path tracing. It won't work in the other integrators, including DL. However, there are other tricks you can try. For instance, an emit material plus a duplicated mesh working as a portal. However, this trick is not that good, because portal won't take into account the texture applied, unless maybe if you map the same texture on the background. The best and easiest way is using shiny diffuse emit+diffuse texture+path tracing.
User avatar
Samo
 
Posts: 3072
Joined: Tue Dec 20, 2005 10:39 am
Location: Spain

Re: How to apply a glow texture in YafaRay?

Post Fri Sep 29, 2017 9:33 am

example of blender scene below
Attachments
trick.png
trick.png (269.57 KiB) Viewed 544 times
yaf_extracted_image_Texture_011.png
cornellbox278emit.zip
(148.01 KiB) Downloaded 9 times
User avatar
Samo
 
Posts: 3072
Joined: Tue Dec 20, 2005 10:39 am
Location: Spain

Re: How to apply a glow texture in YafaRay?

Post Sun Oct 01, 2017 12:38 am

I was afraid of that. I was trying to render a model of the Death Egg from Sonic The Hedgehog I got from the Source Filmmaker Workshop on Steam in Blender using YafaRay (as I like Blender way more than Source Filmmaker and I actually find it easier to use) and it uses a glow texture and a diffuse texture, and it's the glow texture that's supposed to emit light while the diffuse texture provides the color of the mesh (For example, the eyes are supposed to light up, and using the glow texture as the diffuse texture will change the appearance of the model to a solid black color for everything that doesn't light up, which is obviously not what I want)
while windows sucks;do rm windows;pacman -S linux;done
User avatar
pouar
 
Posts: 5
Joined: Tue Sep 26, 2017 3:50 pm

Re: How to apply a glow texture in YafaRay?

Post Mon Oct 02, 2017 9:46 pm

Managed to work around it by using the duplicate mesh thing, but setting it as the emit material instead of a portal, then having the material of the duplicate mesh have the transparency set to 1 and the transmit filter set to 0, though for this to work I had to make the duplicate mesh slightly bigger than the original.
while windows sucks;do rm windows;pacman -S linux;done
User avatar
pouar
 
Posts: 5
Joined: Tue Sep 26, 2017 3:50 pm

Re: How to apply a glow texture in YafaRay?

Post Sat Oct 21, 2017 2:15 pm

I'm an idiot. I just found out it's possible to render the 2 meshes separately, and use the emit render layer of the mesh with just the lighting with the combined render layer of the mesh with the color and combine the 2 in gimp with the emit layer set to screen.
while windows sucks;do rm windows;pacman -S linux;done
User avatar
pouar
 
Posts: 5
Joined: Tue Sep 26, 2017 3:50 pm

Re: How to apply a glow texture in YafaRay?

Post Mon Oct 23, 2017 6:31 am

an HDRI image as a texture will give you better results, if you can get one that fits your needs.
User avatar
Samo
 
Posts: 3072
Joined: Tue Dec 20, 2005 10:39 am
Location: Spain

Re: How to apply a glow texture in YafaRay?

Post Tue Oct 24, 2017 2:39 pm

Just tested it and in terms of lighting there seems to be no visual difference (afaict by looking at it) between having YafaRay doing the lighting by making the 2nd mesh slightly larger, and doing the lighting in GIMP by rendering them separately and setting the blending mode to additive (other than the position of the lighting due to the mesh with the emit texture being slightly larger than the mesh with the diffuse texture). Setting the blending mode to screen instead of additive seems to make it brighter than doing it in YafaRay.
while windows sucks;do rm windows;pacman -S linux;done
User avatar
pouar
 
Posts: 5
Joined: Tue Sep 26, 2017 3:50 pm


Return to Lighting and Rendering



Who is online

Users browsing this forum: No registered users and 4 guests

cron