PDA

View Full Version : Image on one side of double sided polygons with nodes?

Dirk
05-03-2007, 08:14 AM
I remember there was an explanation in the forum how to map an image on just one side of double sided polygons, with nodes - can't find it, though. Does anybody know where to find it, or how to do that?

Sensei
05-03-2007, 08:32 AM
Perhaps with Spot Info > Polygon Side integer? Use it as alpha/blend in color mixer.. One color input comming from 2d image, 2nd whatever else you want..

MooseDog
05-03-2007, 08:53 AM
Perhaps with Spot Info > Polygon Side integer? Use it as alpha/blend in color mixer.. One color input comming from 2d image, 2nd whatever else you want..

correct me if i'm wrong, but spot info>polygon side returns a 0 for facing and a 1 for back-facing, (i might have that backwards:stop: )

which is then fed into a logic node (then to an opacity button)

Dirk
05-03-2007, 09:19 AM
@Sensei: sry, doesn't work

@Moosedog: hmm, but opacity of what? The image itself? that doesn't seem to work either...

Sensei
05-03-2007, 10:06 AM
Of course it works.. :2guns:

Example scene in attachment.. Frame 0 back side color, 60 front side color.. I've connected 2d texture > image and worked too..

Sensei
05-03-2007, 10:09 AM
correct me if i'm wrong, but spot info>polygon side returns a 0 for facing and a 1 for back-facing, (i might have that backwards:stop: )

which is then fed into a logic node (then to an opacity button)

Exactly :)
But logic node is not necessary.. Integer has just 0 or 1 and putting it to Mixer Color's Opacity input is enough, conversion is done internally between data type formats, no values between 0 and 1, which is what we want/need..

MooseDog
05-03-2007, 11:01 AM
bingo! thx :)

Dirk
05-03-2007, 11:06 AM
I don't know whats happening here - Senseis scene does work - but not mine.

I have subpatched object here with 3 bones in it. The object shows me the red side - but only once ??? After rendering another frame, where it shows the green side, it doesn't show the red side again - the object is entirely green then oO

Dirk
05-03-2007, 11:12 AM
I've attached a scene. On my machine, it does this:

- rendering frame 0 shows the object's red side, as it should

- rendering frame 20 shows the green side - ok

- rendering frame 0 *again* shows the object in green ????

Dirk
05-03-2007, 04:51 PM
Can anybody confirm this? ... Or do I need medication?

jameswillmott
05-03-2007, 05:30 PM
Yep, your scene doesn't work. How'd you do that???

Dirk
05-03-2007, 05:54 PM
I have no idea. I'll try to re-create the problem tomorrow.

Sensei
05-03-2007, 08:23 PM
LOL.. Deactivate all bones except Bone3 and render.. :D Only the last polygon controlled by this bone became green permanently.. :D

Dirk
05-04-2007, 02:52 AM
Weightmaps? Could this be a problem with weightmaps?

Dirk
05-04-2007, 02:55 AM
@Sensei: seems to make no difference for me. I can deactivate of even throw out the bones, the object renders in the same strange way.

Dirk
05-04-2007, 03:01 AM
GOT IT!

It's a problem with the classic camera! I use the classic camera because of the outlines. Switch to perspective cam and everything works as it should (except of the outlines, of course).

MSherak
03-27-2013, 08:16 PM
Of course it works.. :2guns:

Example scene in attachment.. Frame 0 back side color, 60 front side color.. I've connected 2d texture > image and worked too..

This is great and got me thinking so I thought I would take this a step further..

So I created a normal from a leaf texture that Dpont gives with his DP Verdure plugin for foliage. Like normal I placed the color in the color channel. Use the transparent texture in the clipmap for the model for ease of use. Then I replaced the colors nodes provided with normal maps. Now I added extra nodes to the back polygon allowing me to invert the Z of the normal and place an adjustment value to control the depth of the Z channel in the normal map. This makes the normal read the front side for lighting and apply it on the back faced polygon when double sided. Also gives you the control of the level of lighting. Basically making it look like it's translucent without having to use the translucency channel giving one the ability to backlit say, in this case, leaves without the render hit. So anything that hits the front side polygon will be transfered to the back polygon, including shadows.

In a GI scene with the flags set right you could render foliage without including it in GI and not rely on translucency for the back lighting. Kinda of a cool look. If you use it in something, please post.

Enjoy.
-M

PS. it still works with GI also which is even cooler. Turn on GI and look at the backside. Fun Fun!! ;)

GoatDude
03-27-2013, 09:50 PM
This is very cool

MSherak
03-29-2013, 10:37 AM
Put it to the test with some other tweaks which allow me to darken the reverse normal.

Made a tree with DP Venture. One light using DP Sunsky. Strait from LW. Render times were from 2m37s to 6m19s.

Sensei
03-29-2013, 10:53 AM
You can optimize a lot of your node tree.
Instead of Split Color etc. up to Make Color, simply Math > Vector > Multiply by 1,1,-1..

MSherak
03-30-2013, 03:30 AM
You can optimize a lot of your node tree.
Instead of Split Color etc. up to Make Color, simply Math > Vector > Multiply by 1,1,-1..

True and I will most likely use this.. this illustrates kind what is going on to others.. plus I get to use your node. ;)

Going beyond this now and doing some swizzle stuff like AO burned into the normal map then placed in.. all kinds of goodies..