Chaos Corona Forum

Chaos Corona for Cinema 4D => [C4D] General Discussion => Topic started by: mrittman on 2017-04-12, 05:58:53

Title: Transparent Wireframe Render
Post by: mrittman on 2017-04-12, 05:58:53
Just trying to render a wireframe of my model, and getting some weird effects. This is with the most recent daily build.

Dropped a Corona Wire Shader into the opacity channel. Not sure where it's getting these weird colors haha.
Title: Transparent Wireframe Render
Post by: mrittman on 2017-04-12, 06:30:06
Hey guys I am doing a 3D model of a gun and want certain parts to "flicker" into a wireframe/transparent material and then fade away completely. I have attached a screen grab of a gun animation I came across online. It's kind of the effect I am going for. I am using the Cinema 4D version of Corona as well, so some things may be different. Would someone be able to help me with this?

Thanks!
Matt
Title: Re: Corona Wire Shader
Post by: houska on 2017-04-12, 10:42:37
This is actually correct. It's how opacity works :-)

The opacity value tells you how opaque the material is in the given color. So if you have the highest value in all color channels, your object will be fully opaque. If you have 0 everywhere, your object is fully transparent. Now, if you have red and blue set to zero and green to highest value - i.e. your material's base colour is green - it means that the material is transparent to red and blue, but opaque to green...

But wait a minute! That means that if you are observing a white object through the material, green will be blocked and you'll see red and blue - violet! It's a bit counter-intuitive and does not correspond with the way materials work in real world. I'd suggest you use refraction instead (you can set IOR to 1.0 to disable ray-bending), possibly together with volume. In the opacity channel, it really only makes sense to have shades of grey.

Hope this helps you :-)
Title: Re: Corona Wire Shader
Post by: mrittman on 2017-04-12, 15:42:33
This is actually correct. It's how opacity works :-)

The opacity value tells you how opaque the material is in the given color. So if you have the highest value in all color channels, your object will be fully opaque. If you have 0 everywhere, your object is fully transparent. Now, if you have red and blue set to zero and green to highest value - i.e. your material's base colour is green - it means that the material is transparent to red and blue, but opaque to green...

But wait a minute! That means that if you are observing a white object through the material, green will be blocked and you'll see red and blue - violet! It's a bit counter-intuitive and does not correspond with the way materials work in real world. I'd suggest you use refraction instead (you can set IOR to 1.0 to disable ray-bending), possibly together with volume. In the opacity channel, it really only makes sense to have shades of grey.

Hope this helps you :-)

Thanks for your reply houska! I appreciate the information about this :) Sorry, I thought it was a bug! Please feel free to move it into the appropriate forum.

Also, I couldn't quite figure out how to get the effect I was looking for. Can you tell me how I might be able to achieve the look in the second image on this page?
https://coronarenderer.freshdesk.com/support/solutions/articles/5000516240-how-to-render-wireframes-in-corona-renderer-

I did end up finding some resources yesterday about how to get an x-ray kind of look using C4Ds standard renderer. I may just end up going this route.

Thanks again though!
Title: Re: Corona Wire Shader
Post by: burnin on 2017-04-12, 16:40:00
If this is what you're after?
Diffuse is used to color the wires (even textures, procedurals, ramps... can be used).
Opacity channel with Corona Wire shader is then used to only show wires/edges on a material (you can also set to vertices only. 
Title: Re: Corona Wire Shader
Post by: Cinemike on 2017-04-12, 16:40:50
Hi mrittman,

create a Corona material, in Diffuse set the color you wish to use for the wireframe,  in Opacity use the Wire shader with Black as base color and white for the edges.
This will do the trick.

CU
Michael
Title: Re: Corona Wire Shader
Post by: houska on 2017-04-12, 17:00:25
I did end up finding some resources yesterday about how to get an x-ray kind of look using C4Ds standard renderer. I may just end up going this route.

To get an X-ray effect, I'd use volume, which simulates absorbtion and dispersion of the light rays by the material, which is pretty much what happens to the X-rays when they pass through an object :-)
Title: Re: Transparent Wireframe Render
Post by: burnin on 2017-04-12, 17:16:12
can get the similar effect
looks OK in preview, but doesn't render properly - maybe a bug in Corona's Layered Material?
Title: Re: Corona Wire Shader
Post by: mrittman on 2017-04-12, 17:57:52
Thank you all so much for your help! It's very much appreciated! Here are my settings for an X-Ray looking material for anyone interested. I kind of got away from the main topic of a wireframe...oops!
Title: Re: Corona Wire Shader
Post by: houska on 2017-04-12, 18:18:43
Also, I couldn't quite figure out how to get the effect I was looking for. Can you tell me how I might be able to achieve the look in the second image on this page?
https://coronarenderer.freshdesk.com/support/solutions/articles/5000516240-how-to-render-wireframes-in-corona-renderer-

For the wireframe effect, set red diffuse color and use the wire shader only for black and white opacity (see attachment)

Edit: Sorry, Cinemike, I should have read your reply before answering myself :-D
Title: Re: Corona Wire Shader
Post by: Cinemike on 2017-04-12, 18:57:33
Edit: Sorry, Cinemike, I should have read your reply before answering myself :-D
burnin beat me to it before, even with a file:)
Title: Re: Corona Wire Shader
Post by: burnin on 2017-04-12, 20:37:02
:)

also would be nice if this thread is combined with the other, almost identical Transparent Wireframe Render (https://forum.corona-renderer.com/index.php/topic,15711.0.html)

has anyone found the solution to mix/layer/combine both: Xray + wire? Tried with Layered but render is different than the preview - Is there a bug?

PS.
post with shader attached (https://forum.corona-renderer.com/index.php/topic,15711.msg99434.html#msg99434)
Title: Re: Corona Wire Shader
Post by: romullus on 2017-04-12, 20:49:03
Ok, since there's no bug, i'm moving this topic to C4D general board and will merge that other topic to this one.
Title: Re: Transparent Wireframe Render
Post by: mrittman on 2017-04-12, 20:56:06
Perfect. Exactly what I was looking for. Thanks again all!