Tue, Nov 19, 7:36 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 18 10:25 pm)



Subject: How to shade backside of cloth differently in Firefly?


odf ( ) posted Fri, 09 December 2022 at 1:12 AM · edited Tue, 19 November 2024 at 7:35 AM

I'm trying to make cloth materials that work in both Firefly and Superfly. For things like skirts, it would be nice to be able to make the back of the cloth look different from the front. But I'm having trouble distinguishing front-facing from back-facing polygons within the shader. Any ideas?

-- I'm not mad at you, just Westphalian.


primorge ( ) posted Fri, 09 December 2022 at 6:03 AM · edited Fri, 09 December 2022 at 6:04 AM

Not sure if it's relevant to your query but in Firefly and Preview there's the Remove Back Facing Polys check box in render settings. I typically turn this off being that I do so much preview render stuff, back faces of one sided geometry shows up in preview. Interiors of clothing, hair cards, etc.

Also on the Poser Surface Root there is the Normals Forward check box, useful to render one sided geometry without the darkening effect of one side that happens in Firefly renders of card plants (transmapped card leaves, grass fronds, etc) and such...


primorge ( ) posted Fri, 09 December 2022 at 6:15 AM · edited Fri, 09 December 2022 at 6:15 AM

On that note I'm not sure it's possible to shade the opposite facing of a one sided geometry differently, this is typically a thing that would be handled by the UVs/mat zone and an actual thickness ( interior of cloth)... someone like Bagginsbill would be able to answer more eloquently and decisively.


Afrodite-Ohki ( ) posted Fri, 09 December 2022 at 6:57 AM · edited Fri, 09 December 2022 at 6:58 AM

Here, have an example I've saved from Bagginsbill ages ago:


d0tKKn1ZPObGdln9kW4ZUobxF9gCedoSCbgKBpjp.jpg

You can plug anything into the Blender node inputs to make whatever different material you want :)

- - - - - - 

Feel free to call me Ohki!

Poser Pro 11, Poser 12 and Poser 13, Windows 10, Superfly junkie. My units are milimeters.

Persephone (the computer): AMD Ryzen 9 5900x, RTX 3070 GPU, 96gb ram.


primorge ( ) posted Fri, 09 December 2022 at 7:22 AM

Nice one. Looks like the step and the N node are the key. Useful.


bagginsbill ( ) posted Fri, 09 December 2022 at 11:54 AM

Haha - that IS from ages ago and I didn't know as much then. That shader is distinguishing not front and back, but whether the polygon is facing +Z or -Z axis. That's not the same as what you want.  I can't remember if I found a FireFly solution.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


Afrodite-Ohki ( ) posted Fri, 09 December 2022 at 4:29 PM
bagginsbill posted at 11:54 AM Fri, 9 December 2022 - #4451304

Haha - that IS from ages ago and I didn't know as much then. That shader is distinguishing not front and back, but whether the polygon is facing +Z or -Z axis. That's not the same as what you want.  I can't remember if I found a FireFly solution.

I thought it was separating the normals forward and normals backward?

- - - - - - 

Feel free to call me Ohki!

Poser Pro 11, Poser 12 and Poser 13, Windows 10, Superfly junkie. My units are milimeters.

Persephone (the computer): AMD Ryzen 9 5900x, RTX 3070 GPU, 96gb ram.


odf ( ) posted Fri, 09 December 2022 at 5:01 PM

Thanks for all the replies! Much appreciated.

Afrodite-Ohki posted at 4:29 PM Fri, 9 December 2022 - #4451332

bagginsbill posted at 11:54 AM Fri, 9 December 2022 - #4451304

Haha - that IS from ages ago and I didn't know as much then. That shader is distinguishing not front and back, but whether the polygon is facing +Z or -Z axis. That's not the same as what you want.  I can't remember if I found a FireFly solution.

I thought it was separating the normals forward and normals backward?
Yes, that's what it does, but it's not forward or backward relative to the camera, but in global coordinates. If the camera is at an angle, or the object is too close to it, it won't work correctly.

That setup was the first thing I tried, by the way, only with the sign function instead of step.

If I had a node or combination of nodes that gave me the viewing direction as a vector, then I could wire something up in combination with the N node.

-- I'm not mad at you, just Westphalian.


EnglishBob ( ) posted Fri, 09 December 2022 at 6:44 PM · edited Fri, 09 December 2022 at 6:48 PM

My archives contain this alternative approach which extracts the diffuse node's Normals_Forward function to drive a blender. Author unknown, unfortunately, I only saved the screenshot (dated July 2008) - nor do I know enough to guarantee that it's an improvement. Offered without warranty for further discussion. :)

QasHzFKl8pbmXOrXiojvUYue8D7gc2ye307zxOUb.jpg

(and of course this is Poser 7 vintage and has no relevance to Superfly, but you knew that...)


odf ( ) posted Fri, 09 December 2022 at 7:07 PM

Nice one, EnglishBob! I've been playing with the diffuse node and Normals_Forward for the last couple of hours but hadn't gotten this far yet.

-- I'm not mad at you, just Westphalian.


odf ( ) posted Fri, 09 December 2022 at 7:17 PM · edited Fri, 09 December 2022 at 7:21 PM

Yes, still works in Poser 12 Firefly. I simplified the setup a bit by swapping the order of the diffuse nodes and ditching the Abs function.

LYfVqrSJNqAMReMjrEtUojJJ9XiVS7c2MeNrLkPP.png

ETA: Of course, as one would expect, this does *not* work for SuperFly. So, I'll have to figure out how this works in SF, as well (easier, at my guess, which is why I only asked about FF for now) and then, unlike shown here, use two separate root nodes.

-- I'm not mad at you, just Westphalian.


odf ( ) posted Fri, 09 December 2022 at 7:56 PM · edited Fri, 09 December 2022 at 7:56 PM

This is the kind of effect I was looking for:

wLVzjUNtP7zVEn2unFNfnBluH6I67TsVy0KywyGt.png

Now on to figuring out how to do it in SuperFly, and then learning how to use Bagginsbill's Matmatic Loom. 😄

-- I'm not mad at you, just Westphalian.


odf ( ) posted Fri, 09 December 2022 at 8:15 PM

(Disclaimer seeing as BB is in the thread: I realize that this is almost certainly not the correct look for the backside of a woven tartan fabric.)

-- I'm not mad at you, just Westphalian.


hborre ( ) posted Fri, 09 December 2022 at 9:37 PM

The 2 Diffuse Nodes have dashed connectors signifying that the nodes are incompatible according to the Superfly protocol.  It won't render in Superfly.


hborre ( ) posted Fri, 09 December 2022 at 9:56 PM

This is what you want for Superfly.

7zRmNDOIsJbaNgzntbqfr11YzFJdGn8NNahlYMvT.png


odf ( ) posted Fri, 09 December 2022 at 10:03 PM

Coolio! I knew there would be something obvious for Superfly.

-- I'm not mad at you, just Westphalian.


odf ( ) posted Fri, 09 December 2022 at 11:27 PM · edited Fri, 09 December 2022 at 11:28 PM

Here's an even simpler FireFly version. Just diffuse -> step -> blender is enough.

b1mzB3yV7ldAgXf6ynkcLp0y0kzXU2J5xv9VoT8J.png

-- I'm not mad at you, just Westphalian.


EnglishBob ( ) posted Sat, 10 December 2022 at 6:45 AM
odf posted at 11:27 PM Fri, 9 December 2022 - #4451375

Here's an even simpler FireFly version. Just diffuse -> step -> blender is enough. [...]

I didn't have time last night to sit down and think through the math(s) nodes, but they gave the impression of overkill at the time. Neatly simplified! Also thanks to @hborre for the Superfly version.

Encouraging to see that the good old forum samizdat still works. Now I should try to remember to put this to work next time I have a single sided mesh.


moogal ( ) posted Mon, 12 December 2022 at 12:10 PM
odf posted at 11:27 PM Fri, 9 December 2022 - #4451375

Here's an even simpler FireFly version. Just diffuse -> step -> blender is enough.

b1mzB3yV7ldAgXf6ynkcLp0y0kzXU2J5xv9VoT8J.png

Firefly or Superfly?


hborre ( ) posted Mon, 12 December 2022 at 12:51 PM

It's Firefly as mentioned above in the image.  


bagginsbill ( ) posted Mon, 12 December 2022 at 1:06 PM · edited Mon, 12 December 2022 at 1:06 PM

The use of Diffuse to either capture "negative" reflected light, or to detect a difference between Diffuse with-and-without Normals_Forward does seem to work and I recalled that this is possibly a valid approach. However, it doesn't work with indirect light, and I ALWAYS use indirect light, so be careful with that.

No IDL - works fine:
F7PBY7ZEQZNsi3n3jXZL0p5kmROMF0fmLwDlskkY.png

With IDL, failure:

T4fKgkIzWeVTIeGa4756J3LUVlVusUhJ7xoGUWZN.png

Notice also that the diffuse light reflected from the inside of the cylinder onto the floor is all green. The IDL calculation ignored the shader detection of front-vs-back


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


odf ( ) posted Mon, 12 December 2022 at 4:01 PM
bagginsbill posted at 1:06 PM Mon, 12 December 2022 - #4451548

The use of Diffuse to either capture "negative" reflected light, or to detect a difference between Diffuse with-and-without Normals_Forward does seem to work and I recalled that this is possibly a valid approach. However, it doesn't work with indirect light, and I ALWAYS use indirect light, so be careful with that.

Ah yes, there's always something, isn't there? Thanks for the heads up!

-- I'm not mad at you, just Westphalian.


moogal ( ) posted Wed, 14 December 2022 at 8:34 PM
hborre posted at 12:51 PM Mon, 12 December 2022 - #4451547

It's Firefly as mentioned above in the image.  

I see that it says that but the pic shows PBR roughness and metallic channels which I didn’t think FireFly had but which SuperFly does.


odf ( ) posted Wed, 14 December 2022 at 10:05 PM
moogal posted at 8:34 PM Wed, 14 December 2022 - #4451761
hborre posted at 12:51 PM Mon, 12 December 2022 - #4451547

It's Firefly as mentioned above in the image.  

I see that it says that but the pic shows PBR roughness and metallic channels which I didn’t think FireFly had but which SuperFly does.
I apologize for the confusing picture. As far as I understand, the PhysicalSurface node in Poser 11 and 12 is meant to support both FireFly and SuperFly. So, I'm assuming the roughness and metallic channels are being translated to the closest FireFly equivalents under the hood. Nonetheless, the shader as shown in the image will not distinguish the front and back face in SuperFly, only in FireFly.

-- I'm not mad at you, just Westphalian.


primorge ( ) posted Thu, 15 December 2022 at 5:11 AM

odf posted at 10:05 PM Wed, 14 December 2022 - #4451767

moogal posted at 8:34 PM Wed, 14 December 2022 - #4451761
hborre posted at 12:51 PM Mon, 12 December 2022 - #4451547

It's Firefly as mentioned above in the image.  

I see that it says that but the pic shows PBR roughness and metallic channels which I didn’t think FireFly had but which SuperFly does.
I apologize for the confusing picture. As far as I understand, the PhysicalSurface node in Poser 11 and 12 is meant to support both FireFly and SuperFly. So, I'm assuming the roughness and metallic channels are being translated to the closest FireFly equivalents under the hood. Nonetheless, the shader as shown in the image will not distinguish the front and back face in SuperFly, only in FireFly.
oMfj01mFIC4s6J7mR7RHzqBq41qqUjBQLBuKZ4QS.jpg


Cage ( ) posted Fri, 16 December 2022 at 2:08 PM · edited Fri, 16 December 2022 at 2:08 PM

This got me pretty excited, so I applied this new solution to the two-sided cloth cape problem I was having in that old thread, to which BB posted the Z-axis solution.  This looks really nice, until something casts a shadow on the backfaces.  Then it has a panic episode or something.  Rats and mice.  Now I hafta file this under "No Dice!  Cartoon characters aren't anatomically correct!"VvYz1kOqiEn5neJVCFHS4UO7gpQWSOoInfQ9VV5r.jpgup76SxIH0KZ8U8HQieWKwxGs0Hn0vFgp88tWDkfZ.jpg

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


primorge ( ) posted Fri, 16 December 2022 at 2:29 PM

Weird that the shader back face "poke through" isn't matching the cast shadow shape... I'm confused in general by what's going on in your screen captures. In one instance it's showing the cast shadow fine (bottom left) and in bottom right it's not?


odf ( ) posted Fri, 16 December 2022 at 4:26 PM
Cage posted at 2:08 PM Fri, 16 December 2022 - #4451874

This got me pretty excited, so I applied this new solution to the two-sided cloth cape problem I was having in that old thread, to which BB posted the Z-axis solution.  This looks really nice, until something casts a shadow on the backfaces.  Then it has a panic episode or something.  Rats and mice.  Now I hafta file this under "No Dice!  Cartoon characters aren't anatomically correct!"

Yeah, it's tricky. You'd need to make sure the front side has some light on it everywhere, but as bagginsbill discovered, can't use indirect light.

Once again, SuperFly wins. :-P

-- I'm not mad at you, just Westphalian.


primorge ( ) posted Fri, 16 December 2022 at 5:18 PM

odf posted at 4:26 PM Fri, 16 December 2022 - #4451895

Cage posted at 2:08 PM Fri, 16 December 2022 - #4451874

This got me pretty excited, so I applied this new solution to the two-sided cloth cape problem I was having in that old thread, to which BB posted the Z-axis solution.  This looks really nice, until something casts a shadow on the backfaces.  Then it has a panic episode or something.  Rats and mice.  Now I hafta file this under "No Dice!  Cartoon characters aren't anatomically correct!"

Yeah, it's tricky. You'd need to make sure the front side has some light on it everywhere, but as bagginsbill discovered, can't use indirect light.

Once again, SuperFly wins. :-P

Yawn. Well at least something is winning, thank heavens for scraps of joy. Lol.

Yeah, it's pretty useless if it doesn't work with IDL honestly. You'd have to dredge the dregs of Poser 4 aesthetic die hards to find Firefly users who don't use IDL. Toon renderers on the other hand. IBL? Does a diffuse flood from IBL effect it. Wonder how your method appears in openGL? Does it appear in openGL?


Cage ( ) posted Fri, 16 December 2022 at 5:49 PM · edited Fri, 16 December 2022 at 5:51 PM

primorge posted at 2:29 PM Fri, 16 December 2022 - #4451880

Weird that the shader back face "poke through" isn't matching the cast shadow shape... I'm confused in general by what's going on in your screen captures. In one instance it's showing the cast shadow fine (bottom left) and in bottom right it's not?

Oh, right.  I got distracted and forgot to label the lower one.  On the right, I had deactivated shadow casting for the light in the scene.  I don't know why it looks like there's still a shadow.  On the left, the shadows are activated again.  I'm not sure these are good examples of the problem, now that you point it out.  The trouble does relate to shadow-casting, at any rate.

Edit.  The problem may be the IBL, in fact.  Interesting & weird.

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


odf ( ) posted Fri, 16 December 2022 at 5:52 PM

primorge posted at 5:18 PM Fri, 16 December 2022 - #4451905

Yeah, it's pretty useless if it doesn't work with IDL honestly. You'd have to dredge the dregs of Poser 4 aesthetic die hards to find Firefly users who don't use IDL. Toon renderers on the other hand. IBL? Does a diffuse flood from IBL effect it. Wonder how your method appears in openGL? Does it appear in openGL?

I'll leave that up to folks who want to use Firefly or OpenGL to find out. What I meant to express with my admittedly flippant line up there is that over and over again I find that things that are easy in SuperFly are a big pain, if at all possible, in Firefly. So, I'm not seeing anything that would motivate me to use it and a pile of things that motivate me to stay away from it. That's just me, obviously, to each their own etc. and so on.

I was just posting my question because I imagined that if there were a practical solution, someone would have figured it out by now. It looks like, unfortunately, there is none.

-- I'm not mad at you, just Westphalian.


odf ( ) posted Fri, 16 December 2022 at 8:06 PM · edited Fri, 16 December 2022 at 8:07 PM
To be fair, the SuperFly solution should work perfectly well in FireFly and OpenGL, as far as I can tell. It's just that, apparently, we don't have a material room node that provides the necessary variable unless we use SF, so that solution is just not available to us in practice.

-- I'm not mad at you, just Westphalian.


Cage ( ) posted Tue, 20 August 2024 at 11:28 AM · edited Tue, 20 August 2024 at 11:29 AM

I wanted to note here that I have gotten useful results with the Firefly methods revealed upthread.  The images I posted above showed a problem when shadows were used on the two-sided cloth in a scene with IBL lighting.  As illustrated in the images I posted (although not explained properly at the time), the two-sided effect is broken wherever a shadow is cast upon the two-sided item.  The fix is to set all shadow-casting lights' shadow intensity below 1.0.  At shadow strength 0.95, the effect works as desired, but at strength 1.0 the whole thing fails as I've noted.

I have not tested anything with IDL and would guess that it would fail, as smarter users than I have already noted, up there in 2022.

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.