Thu, Mar 28, 4:21 AM CDT

Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Mar 27 7:17 pm)



Subject: Candle Flame Shader For Firefly... (Use Postwork Answer Is For Cowards!)


  • 1
  • 2
3dcheapskate ( ) posted Thu, 05 March 2020 at 1:42 AM · edited Thu, 28 March 2024 at 2:03 AM

Most candle models that I've seen/got use the two-billboards-with-a-photo-of-a-candleflame-intersecting-at-90° workaround. And I know that the usual advice whensomebody asks about doing it with a shader is - don't bother, just add the flame in postwork - much more realistic.

But I like a challenge. And I suck at postwork (well, any sort of work really...)

So. Here's my bestest attempt so far (a lot of work still to do, but I think it's a reasonable start):

Candles(V202FS x 4).jpg

And here's the shader:

FlameShader.jpg

What do y'all think ? (No comments about the wiggly flame morph please - I know it's crappy!)


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



infinity10 ( ) posted Thu, 05 March 2020 at 1:47 AM

??????

Eternal Hobbyist

 


3dcheapskate ( ) posted Thu, 05 March 2020 at 1:48 AM · edited Thu, 05 March 2020 at 1:50 AM

More stuff about how I got here, and the other shaders (Milkman-Andy-wax,wick, and smoke) over there - - - > https://community.hivewire3d.com/threads/poser-firefly-candles.4065/

(I don't want to repeat all that here do I !)


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



EldritchCellar ( ) posted Thu, 05 March 2020 at 3:45 AM

That looks pretty good, could spiffy it up with a little post work (motion blur perhaps) :)



W10 Pro, HP Envy X360 Laptop, Intel Core i7-10510U, NVIDIA GeForce MX250, Intel UHD, 16 GB DDR4-2400 SDRAM, 1 TB PCIe NVMe M.2 SSD

Mudbox 2022, Adobe PS CC, Poser Pro 11.3, Blender 2.9, Wings3D 2.2.5


My Freestuff and Gallery at ShareCG




3dcheapskate ( ) posted Thu, 05 March 2020 at 5:00 AM

Thanks infinity10 and EldritchCellar. After spending a fair while playing with this I can't really trust my own judgement. So having some positive responses from a few other people, both here and at Hivewire, is a good sign that I'm on a reasonable path.

Regarding motion blur - my feeling is that (thinking of cameras here) if the shutter was open long enough for motion blur then the flame would probably whiteout (or whatever the photographic term is - burnout? saturate?) in the image. However, I just tried using the in-Poser motion blur:

MotionBlur.jpg


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



Boni ( ) posted Thu, 05 March 2020 at 5:17 AM · edited Thu, 05 March 2020 at 5:19 AM

Wow! Wondering if this will work in Superfly!

Boni



"Be Hero to Yourself" -- Peter Tork


AmethystPendant ( ) posted Thu, 05 March 2020 at 6:13 AM

My only concern would be that the bottom of the flame seems a bit flat, is this a single plane, in which case seeing it from a different angle might be an issue, though you could still have a 90 degree billboard both with the same mat I suppose, really nice work


3dcheapskate ( ) posted Thu, 05 March 2020 at 7:52 AM · edited Thu, 05 March 2020 at 7:56 AM

AmethystPendant posted at 8:45PM Thu, 05 March 2020 - #4382603

My only concern would be that the bottom of the flame seems a bit flat, is this a single plane, in which case seeing it from a different angle might be an issue, though you could still have a 90 degree billboard both with the same mat I suppose, really nice work

The flame is actually a sphere - I've never really liked the 2D billboard approach. The different flame shapes are just a couple of very quickly (and badly) created morphs.

The flatness you see at the bottom is probably something to do with the way I'm using v_texture_coordinate to control transparency.

FlameSphere.jpg


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



3dcheapskate ( ) posted Thu, 05 March 2020 at 8:01 AM · edited Thu, 05 March 2020 at 8:03 AM

Boni posted at 8:57PM Thu, 05 March 2020 - #4382599

Wow! Wondering if this will work in Superfly!

It's nothing particularly clever - just Ambient and Transparency driven by a couple of Color_Ramps, an Edge_Blend, v_texture_coordinate,and a few simple math nodes.

I guess that should work the same in Superfly ? (I actually have Poser11 on my machine too, so maybe I can try that...)


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



3dcheapskate ( ) posted Thu, 05 March 2020 at 8:13 AM

The same motion blur setup as the previous render, but with a different camera angle and 'long wick' morphs applied so none of the four flames is obscured.

differentAngle.jpg


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



3dcheapskate ( ) posted Thu, 05 March 2020 at 8:21 AM

Superfly-ing...

Superflying.jpg


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



hborre ( ) posted Thu, 05 March 2020 at 8:44 AM

Very impressive.


ockham ( ) posted Thu, 05 March 2020 at 9:09 AM

After lighting an actual candle for comparison, I think you've got it. The shape and gradients are just right. The only difference I see is that the lower part of your flame is too blue, too much like natural gas. The lower part of the real candle flame is simply more transparent than the upper part, showing the background more.

My python page
My ShareCG freebies


3dcheapskate ( ) posted Thu, 05 March 2020 at 10:13 PM

Boni posted at 11:10AM Fri, 06 March 2020 - #4382599

Wow! Wondering if this will work in Superfly!

Let a Superfly render using default settings (except I also ticked Motion Blur - shutter open 0.5sec) complete. Didn't change any materials for Superfly.

superflyMotionBlurHalfSec.jpg


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



3dcheapskate ( ) posted Thu, 05 March 2020 at 10:37 PM · edited Thu, 05 March 2020 at 10:41 PM

ockham posted at 11:14AM Fri, 06 March 2020 - #4382626

After lighting an actual candle for comparison, I think you've got it. The shape and gradients are just right. The only difference I see is that the lower part of your flame is too blue, too much like natural gas. The lower part of the real candle flame is simply more transparent than the upper part, showing the background more.

I was absolutely delighted when you said "After lighting an actual candle for comparison" ! 😀

When I started this I was convinced that I knew what a candle flame looked like. Needless to say my initial attempts were so bad that I wouldn't want to post them ! It wasn't until I actually lit some candles and watched them, in daylight and by their own light, in still air and with a breeze, against both light and dark backgrounds, and from all sorts of angles,that I really started to see what they looked like. I'm actually really looking forward to trying to do some realistic candle flame morphs

Regarding the blue - agreed, definitely too much blue in the lower part of the flame. I think that we need to make the flame more transparent near the centre at the bottom. So I'd guess that the Transparency network needs something like an Edge_Blend (Inner_Color=black, Outer_Color=white) combined in some way with v_texture_cordinate using some appropriate simple Maths_Function ? And need to make sure that it doesn't affect the middle/upper part of the flame.

(In fact my first 'reasonable' attempt at a candle flame shader used an Edge_Blend for Transparency, but I had the colours completely wrong. So to avoid confusing myself I removed the transparency network and concentrated on the Ambient_Color network. When that started to look right I put a Transparency network back,but without any Edge_Blend.)


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



3dcheapskate ( ) posted Fri, 06 March 2020 at 4:21 AM · edited Fri, 06 March 2020 at 4:22 AM

PP2014 (Firefly), no lights, just IDL. Nothing changed except that.

idl.jpg

Increasing the Ambient_Strength from 1.0 for three of the flames:

idl2.jpg


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



3dcheapskate ( ) posted Fri, 06 March 2020 at 4:27 AM · edited Fri, 06 March 2020 at 4:27 AM

Higher !

idl3.jpg


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



3dcheapskate ( ) posted Fri, 06 March 2020 at 6:01 AM · edited Fri, 06 March 2020 at 6:03 AM

ockham posted at 6:47PM Fri, 06 March 2020 - #4382626

After lighting an actual candle for comparison, I think you've got it. The shape and gradients are just right. The only difference I see is that the lower part of your flame is too blue, too much like natural gas. The lower part of the real candle flame is simply more transparent than the upper part, showing the background more.

I now remember why I took the Edge_Blend out from the Transparency network - when combined with the v_texture_coordinate stuff I couldn't see what was going wrong. Simply using an Edge_Blend alone it becomes obvious. And it's not the fact that the transparent centre goes too high up the flame, although that would need to be fixed too. It's the non-transparent bottom edge of the sphere that forms the flame. I simply couldn't work out why I was getting that.

It's obvious here.

EBTx.jpg

Here's the UV mapping of the flame - a cylindrically mapped sphere.

uv.jpg

So how to make sure that lower edge of the sphere remains transparent ?


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



movida ( ) posted Fri, 06 March 2020 at 6:29 AM

looks really good to me


ghostship2 ( ) posted Fri, 06 March 2020 at 9:10 AM

this is good stuff!

W10, Ryzen 5 1600x, 16Gb,RTX2060Super+GTX980, PP11, 11.3.740


bagginsbill ( ) posted Fri, 06 March 2020 at 12:36 PM

You've done a very good job so far. I have taken a stab at this before but not with any serious detail, as all I ever wanted was tiny flames in props that were not the main subject.

You made me dig out Poser for the first time in many months. Unfortunately the complexity grows fast and now the hand-built shader I have is too much spaghetti. This is a classic shader problem that really wants to just use math formulas.


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)


bagginsbill ( ) posted Fri, 06 March 2020 at 12:38 PM

A thought ...

I'm not sure I agree with the edge blend outer value having greater opacity. If you reversed that, your problem with the false bottom showing would decrease. I looked a bunch of flame photos and I don't sense them having a middle that is more transparent, except at the very bottom where the flame is blue.


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)


bagginsbill ( ) posted Fri, 06 March 2020 at 12:42 PM

My attempt so far, same shader, rendered in both SuperFly and FireFly.

FireFly

FF1.png

SuperFly

SF1.png


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)


ghostship2 ( ) posted Fri, 06 March 2020 at 4:34 PM

I haven't tried this out yet but shouldn't the diffuse be set to 0?

W10, Ryzen 5 1600x, 16Gb,RTX2060Super+GTX980, PP11, 11.3.740


ghostship2 ( ) posted Fri, 06 March 2020 at 5:21 PM

Also, transparency falloff set to 0. I thought trans falloff was like a blend function between transparency and transparency edge. Setting that to 0 would mean no difference between the edge and the rest of the object. I could be wrong?????

W10, Ryzen 5 1600x, 16Gb,RTX2060Super+GTX980, PP11, 11.3.740


3dcheapskate ( ) posted Fri, 06 March 2020 at 10:16 PM · edited Fri, 06 March 2020 at 10:17 PM

bagginsbill posted at 11:09AM Sat, 07 March 2020 - #4382768

You've done a very good job so far. I have taken a stab at this before but not with any serious detail, as all I ever wanted was tiny flames in props that were not the main subject.

You made me dig out Poser for the first time in many months. Unfortunately the complexity grows fast and now the hand-built shader I have is too much spaghetti. This is a classic shader problem that really wants to just use math formulas.

Thanks bagginsbill. I can well imagine that trying to do a shader based on the true physics/maths would get rather complicated.That's why I started with a 'what does it look like to me' approach. If I can get something that's 'acceptable' (and I know that's rather subjective, which is why I decided to post what I'm doing) for a candle flame that is prominent in a render, but probably not the main subject, then I'll be happy.


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



3dcheapskate ( ) posted Fri, 06 March 2020 at 10:57 PM · edited Fri, 06 March 2020 at 11:02 PM

bagginsbill posted at 11:31AM Sat, 07 March 2020 - #4382769

A thought ...

I'm not sure I agree with the edge blend outer value having greater opacity. If you reversed that, your problem with the false bottom showing would decrease....

Using an Edge_Blend in the Transparency network was an early idea based purely on my observation that the yellow upper half of the flame appears to be completely opaque with sharp, clearly defined sides. There's no Edge_Blend in the Transparency network for any of the renders except that Transparency Edge_Blend Attenuation one near the bottom of the previous page, where I was just trying to clarify to myself why it didn't work as I'd expected.

I originally planned to use that Transparency Edge_Blend purely to make the centre of the lower third of the flame transparent, but ran into that problem of the false bottom showing. So I changed tack and simply used v_texture_coordinate and some Maths_Functions to make the flame moretransparent near the bottom and at the very top.

bagginsbill posted at 11:31AM Sat, 07 March 2020 - #4382769

A thought ...

...I looked a bunch of flame photos and I don't sense them having a middle that is more transparent, except at the very bottom where the flame is blue.

Agreed, it's only where the flame has that blue tinge, roughly the bottom third/quarter, that the middle appears more transparent. I've noticed that when watching a candle flame the wick is usually clearly visible, but the main yellow part of the flame appears completely opaque.

Perhaps simply combining an Edge_Blend with the existing v_texture_coordinate based transparency network using a Maths_Function (Min) might work ?


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



3dcheapskate ( ) posted Fri, 06 March 2020 at 11:12 PM · edited Fri, 06 March 2020 at 11:14 PM

bagginsbill posted at 12:02PM Sat, 07 March 2020 - #4382772

My attempt so far, same shader, rendered in both SuperFly and FireFly.

FireFly

FF1.png

SuperFly

SF1.png

Those look excellent ! Very close to many of the photos I've seen. But I'd definitely recommend lighting some candles and watching them. As I mentioned, I've noticed that when actually watching a candle flame the wick is usually clearly visible.

That raises another question regarding what I'm actually trying to achieve.Is it a photographic representation, or a representation of what the eye sees ? I have to say that I don't really know.


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



3dcheapskate ( ) posted Fri, 06 March 2020 at 11:20 PM

ghostship2 posted at 12:15PM Sat, 07 March 2020 - #4382779

I haven't tried this out yet but shouldn't the diffuse be set to 0?

Setting either Diffuse_Color to black or Diffuse_Value to 0 both seem to work, although I'd guess that you to be sure you should do both.

ghostship2 posted at 12:15PM Sat, 07 March 2020 - #4382784

Also, transparency falloff set to 0. I thought trans falloff was like a blend function between transparency and transparency edge. Setting that to 0 would mean no difference between the edge and the rest of the object. I could be wrong?????

Not sure. But with both Transparency and Transparency_Edge set to the same value I believe that Transparency_Falloff is irrelevant.


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



3dcheapskate ( ) posted Sat, 07 March 2020 at 1:00 AM · edited Sat, 07 March 2020 at 1:02 AM

If anybody wants to play I've uploaded a PP2 and LT2 for a single candle.

Not here, because this forum won't allow me.

Over there - - > Hivewire" Poser Firefly Candles ?" thread


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



adp001 ( ) posted Sat, 07 March 2020 at 6:13 AM

I'm thrilled!

Animated by this, I tried to bring a "flame" to life with Bullet. According to the Posers documentary, you can negate the gravity to achieve that parts don't fall down but rise up.

I tried that. I tied the lower part of the flame to the candle so that it doesn't fly away but dances around in its effort to rise. But no way. Poser seems to make negative values for gravity positive again (ignoring the sign). At least for me.

Ok, I tried something else. Set gravity to zero, the mass of the flame to zero and internal pressure a little higher. Turned a few other wheels and something happened. Not 100% what I wanted. But kind of useful.

By the way: I gave the Animated Constrained (a grouping object) the candle as a parent. If you move the candle now, the flame wiggles back and forth, almost as it should. However, you should refrain from playing with the wheels if you got it halfway right - a little parameter adjustment can lead to the fact that you can't get the last result right again.

Well, in the end I came to the conclusion again that Bullet has a huge bunch of bugs and is not really usable.

Anyway, there will be lit candles on all my screens tonight - just static, but still!

Translated with www.DeepL.com/Translator (free version)




adp001 ( ) posted Sat, 07 March 2020 at 6:17 AM

Sorry - the problem with the gravity is the other way around. -10 is default. Setting it to 10 makes no difference. Things go down, not up.




3dcheapskate ( ) posted Sun, 08 March 2020 at 1:27 AM · edited Sun, 08 March 2020 at 1:28 AM

adp001 posted at 2:26PM Sun, 08 March 2020 - #4382806

Sorry - the problem with the gravity is the other way around. -10 is default. Setting it to 10 makes no difference. Things go down, not up.

A bit of lateral thinking - why not turn the whole scene upside down ? Then gravity would point 'up' !


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



3dcheapskate ( ) posted Sun, 08 March 2020 at 1:31 AM · edited Sun, 08 March 2020 at 1:31 AM

I need to edit an earlier post.

But this forum won't allow me.

So here's what this post should say:

postEdit.jpg


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



3dcheapskate ( ) posted Sun, 08 March 2020 at 5:52 AM · edited Sun, 08 March 2020 at 5:53 AM

ghostship2 posted at 5:50PM Sun, 08 March 2020 - #4382784

Also, transparency falloff set to 0. I thought trans falloff was like a blend function between transparency and transparency edge. Setting that to 0 would mean no difference between the edge and the rest of the object. I could be wrong?????

I've just realized that using Transparency, Transparency_Edge,and Transparency Falloff as they're intended to be used would do more or less the same thing as using an Edge_Blend in the Transparency network. It's amazing what obvious things you can miss !


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



pikesPit ( ) posted Sun, 08 March 2020 at 2:19 PM · edited Sun, 08 March 2020 at 2:21 PM

!!! BUMP !!!

Still watching this thread with baited breath.

This looks as promising as ever since 3dcheapskate gave us his great morphing book rows!

Without creative minds like him, Poser would be... well ... somewhat ... sorry!

regards

Peter


SamTherapy ( ) posted Mon, 09 March 2020 at 4:21 AM

Very impressive. Thanks for posting this.

Coppula eam se non posit acceptera jocularum.

My Store

My Gallery


3dcheapskate ( ) posted Tue, 10 March 2020 at 3:45 AM · edited Tue, 10 March 2020 at 3:48 AM

pikesPit posted at 3:39PM Tue, 10 March 2020 - #4382916

!!! BUMP !!!

Still watching this thread with baited breath.

This looks as promising as ever since 3dcheapskate gave us his great morphing book rows!

Without creative minds like him, Poser would be... well ... somewhat ... sorry!

regards

Peter

Now look what you gone an' done ! 😆Render 1.png

I'm actually hoping that bagginsbill will pop back in with an update on his shader, and also that adp001 is going to upload a video of his animated flame.

(I've actually got a bit sidetracked creating a pack of cards that can turn into a swarm of meteors, a forest, etc (using old-school geometry swapping)... more on that over on one of my DAZ threads https://www.daz3d.com/forums/discussion/comment/5394726/#Comment_5394726 )


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



bagginsbill ( ) posted Wed, 11 March 2020 at 11:42 AM

I would have shown more by now but material room bugs are preventing me from making progress. Color math doesn't work right in all cases, and worse, Poser just locks up a lot.


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)


bagginsbill ( ) posted Wed, 11 March 2020 at 11:43 AM

Ugh - now the File/Save menu item is grayed out and I can't even save what I have done before I try to render and possibly crash.


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)


bagginsbill ( ) posted Wed, 11 March 2020 at 12:37 PM

Have a look at the Wikipedia article on candles

There's a diagram in there and explanations to go with it describing the various zones of the flame. image.png


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)


bagginsbill ( ) posted Wed, 11 March 2020 at 12:38 PM

After studying that, this is what I have cooking (using your candle prop)

image.png


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)


bagginsbill ( ) posted Wed, 11 March 2020 at 12:40 PM

There's no use looking at the shader - it's a typical matmatic pile. This is like the middle 5th of it.

image.png


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)


bagginsbill ( ) posted Wed, 11 March 2020 at 12:41 PM · edited Wed, 11 March 2020 at 12:41 PM

The matmatic script which is a mess with dead ends that need removing.

AV = Bias(V, .25)

cy = .22

x = EdgeBlend(0, 1, .2) ** 2
y = (AV - cy) * .5
gy = 10
ygrad =  Clamp(1 - Abs(y * gy)) ** 2
blueopacity = Clamp(10 * x * ygrad)

py = Clamp(5 * Abs(AV - .3)) ** 2
px = (1 - EdgeBlend(1, 0, 2)) ** 2
darkpatch = 1 - Clamp((py + px) ** .5)

gy = Clamp((AV - cy) / (1 - cy))
gyp = (4 * gy * (1 - gy))**2
yellowopacity = Clamp(EdgeBlend(1, .3, 3) * Clamp(gyp - darkpatch))

yellow = rgb(255, 255, 200) 
orange = rgb(255, 200, 100) 
yellow = EdgeBlend(yellow, orange, 3)
blue = rgb(30, 30, 255)
yclr = HSV(yellow, 1, 1, yellowopacity)
bclr = HSV(blue, 1, 1, blueopacity)
clr = HSV(bclr + yclr, 1, 1, 5)


s = Surface(0, 0, 0, 0)
s.Alternate_Diffuse = clr
s.Transparency = .8
s.Transparency_Edge = 1
s.Transparency_Falloff = 1


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)


bagginsbill ( ) posted Wed, 11 March 2020 at 3:06 PM

Rendered to around 3000 samples. I see a black halo, in the zone referred to above as the "non-luminous veil". I didn't mean to make it like that. I'll need to refine it.

SF2.png


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)


bwldrd ( ) posted Thu, 12 March 2020 at 12:22 AM

Ewwww... droool..purty .. can't wait to see what you come up with as you continue to tinker with it bagginsbill. :D

--------------------------------------------------------------------------------

Consider me insane if you wish, but is your reality any better?


3dcheapskate ( ) posted Thu, 12 March 2020 at 5:50 AM · edited Thu, 12 March 2020 at 5:50 AM

Looking very good indeed !

You've probably thought of this,but just in case - the smoke on that prop may be interfering with the top of the candle flame so you might want to make it invisible. Your 3000 samples render with levels adjusted

edit.jpg


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



vagabondfantasist ( ) posted Sun, 08 May 2022 at 10:44 PM

I'm trying to rebuild bagginsbill's shader from the matmatic script posted earlier, but I'm having problems - matmatic doesn't appear to be seeing my MM1


vagabondfantasist ( ) posted Sun, 08 May 2022 at 11:11 PM · edited Sun, 08 May 2022 at 11:11 PM

Okay, solved the matmatic problem (configuration)

Now to the bagginsbill's "matmatic script which is a mess with dead ends that need removingfor the flame - there appears to be an error in it (I'm running matmatic 1.6.0 (although the debug tells me it's 1.3.0 the first time in a Poser session that I run matmatic

lxI7gFwAwTmJTYxHpVnT9lvoplNbW1slvPL8bDUQ.png


3dcheapskate ( ) posted Mon, 09 May 2022 at 3:03 AM · edited Mon, 09 May 2022 at 3:04 AM

Removing the spectacles that conceal my super-secret Clark Kent identity, and hoping that nobody spotted that, I'll continue...

Having a quick shufti through the PP2012.mm1.txt that was included in the MatmaticDemos I noticed that IColor seemed to be used in the same sort of way that rgb was. Neither IColor nor rgb appear in the NodeReference.html. But since PP2012.mm1.txt compiled okay I thought it was worth a try.

Success

Here's the amended matmatic script below the line




# bagginsbill's matmatic script for a candle flame

# https://www.renderosity.com/forums/threads/2943991?page_number=2#msg4383217

# The compiler errors on the yellow = rgb line

# changed the 3 rgb references to IColor which is what the PP2012.mm1.txt seems to use, and that complied


AV = Bias(V, .25)


cy = .22


x = EdgeBlend(0, 1, .2) ** 2

y = (AV - cy) * .5

gy = 10

ygrad =  Clamp(1 - Abs(y * gy)) ** 2

blueopacity = Clamp(10 * x * ygrad)


py = Clamp(5 * Abs(AV - .3)) ** 2

px = (1 - EdgeBlend(1, 0, 2)) ** 2

darkpatch = 1 - Clamp((py + px) ** .5)


gy = Clamp((AV - cy) / (1 - cy))

gyp = (4 * gy * (1 - gy))**2

yellowopacity = Clamp(EdgeBlend(1, .3, 3) * Clamp(gyp - darkpatch))


yellow = IColor(255, 255, 200) 

orange = IColor(255, 200, 100) 

yellow = EdgeBlend(yellow, orange, 3)

blue = IColor(30, 30, 255)

yclr = HSV(yellow, 1, 1, yellowopacity)

bclr = HSV(blue, 1, 1, blueopacity)

clr = HSV(bclr + yclr, 1, 1, 5)



s = Surface(0, 0, 0, 0)

s.Alternate_Diffuse = clr

s.Transparency = .8

s.Transparency_Edge = 1

s.Transparency_Falloff = 1




And here's the result of applying it to the flame of the Poser candle that I posted over on the corresponding Hivewire thread. Note that all lights were deleted so illumination is from the flame itself

Superfly:
sl3rdQtQRpzt5cFI3aruTpbseYLc7K6G6inQ9rjK.jpg

Firefly:
scxyW2UyuSdetjSrLMSAOGJX1da71Y83XXYaipYR.jpg



I'll post the MT5 (or MC6) over on the Hivewire thread as I can't do that here.


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



3dcheapskate ( ) posted Mon, 09 May 2022 at 3:40 AM · edited Mon, 09 May 2022 at 3:41 AM

Adding the corresponding point light, also supplied in that Hivewire post:

Superfly:

Rx8cTiiCDdSvJsDxfeJc84YleCr9NIuadaxE28Nf.jpg


Firefly:

zAOcXEJNDnSzGzUEaMhbnp0OQHeHxpG5uL7ATfKX.jpg


So now I'm definitely back to where we'd* got up to two years ago :)


*or to be more precise, bagginsbill ;)


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.

*also available in ShareCG, DeviantArt, DAZ, and CGBytes flavours.



  • 1
  • 2

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.