Forum: Poser - OFFICIAL


Subject: Underwater submarine

Helgard opened this issue on Jun 26, 2010 · 195 posts


Helgard posted Sat, 26 June 2010 at 6:50 PM

I want to render a submarine underwater. I want the water to be murky green as in the attached picture. I can get a pretty good effect using the atmosphere settings, but I was wondering if it was possible to do it just with coloured lights. Basically I need something that can render fast in an animation, and the atmosphere set-up I have is going to take literally weeks to render all the shots I need.


Your specialist military, sci-fi, historical and real world site.


Helgard posted Sat, 26 June 2010 at 6:51 PM

And just to be clear, i don't want a surface with caustics and godrays coming down, thisis slightly deeper and darker. And I am not looking for something like in this picture.


Your specialist military, sci-fi, historical and real world site.


Helgard posted Sat, 26 June 2010 at 6:52 PM

Maybe this will be more of the idea of what I am trying to achieve.


Your specialist military, sci-fi, historical and real world site.


Helgard posted Sat, 26 June 2010 at 7:09 PM

Possibly a better shot of what I am after. Just a little bit more green.


Your specialist military, sci-fi, historical and real world site.


kawecki posted Sat, 26 June 2010 at 10:42 PM

You can try with a background plane, one or more planes with transparecy and textures and a little depth fog.
The transparency planes can give you caustics effects and a curved background with some lights the background illumination.
Use few transparent planes, transparency renders much slower.

Stupidity also evolves!


raven posted Sun, 27 June 2010 at 7:47 AM

Have you tried just using depth cue on the atmosphere node?



raven posted Sun, 27 June 2010 at 7:48 AM

Those are the settings I used for this picture (which uses the free sub (scaled to 22% ) available at the DAZ archive here http://free.daz3d.com/free_weekly/detail.php?free_id=173 )



raven posted Sun, 27 June 2010 at 8:01 AM

And here's a quick anim of the sub emerging from the depth cue effect. 



Helgard posted Sun, 27 June 2010 at 8:05 AM

Perfect. Thanks, setting it up now.


Your specialist military, sci-fi, historical and real world site.


bagginsbill posted Sun, 27 June 2010 at 11:53 AM

One thing to note - the depth-cue effect in Poser is linear falloff, all the way to 0, which is not realistic. It makes the sub anim above look like the sub is materializing by passing through an opaque portal, instead of merely approaching the camera. True depth-based light transmission (such as fog or murky water) is actual an inverse linear effect, which never goes to zero at any distance, but approaches zero forever.

Some people don't notice things that are at least directionally correct, even if they are wrong in a numerical sense. This is the case with distance falloff. Some people notice, others don't. I notice very badly and it looks to me as bad as rendering without shadows.

If you find this a problem, I can show how to fix it.


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)


Helgard posted Sun, 27 June 2010 at 11:59 AM

I just needed something that will render very fast, and look sort-of acceptable.

This is not for any high end purposes, or for a gallery, but just to demonstrate an effect to people working on an idea.
 
If I wanted to do a high end render or animation I would just use Vue, much easier to get this effect in Vue.

I know the above is not the ideal solution, but it renders fast which is my main criteria for this.

Thanks for the offer though.


Your specialist military, sci-fi, historical and real world site.


bagginsbill posted Sun, 27 June 2010 at 12:07 PM

I'm talking about the above solution - using depth-cue - not something else.  It simply involves connecting a couple nodes to the Atmosphere node. If you're happy with it as is, that's fine. My point was that with no cost to speed, you can get a quality improvement.


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)


seachnasaigh posted Sun, 27 June 2010 at 12:09 PM

I'd be interested in the asymptotic depth cue, BB.  I've got an elvish submarine in the works which could use it.

Poser 12, in feet.  

OSes:  Win7Prox64, Win7Ultx64

Silo Pro 2.5.6 64bit, Vue Infinite 2014.7, Genetica 4.0 Studio, UV Mapper Pro, UV Layout Pro, PhotoImpact X3, GIF Animator 5


Helgard posted Sun, 27 June 2010 at 12:27 PM

Bagginsbill, yes, then I am definitely interested.

Just a question, what do you have your units set to in Poser? I was trying one of your shaders from one of the other threads, and it wasn't looking right, but I assume it was because I have my units set to something different to yours.

Thanks in advance...


Your specialist military, sci-fi, historical and real world site.


bantha posted Sun, 27 June 2010 at 12:45 PM

 BagginsBill uses Inches. 


A ship in port is safe; but that is not what ships are built for.
Sail out to sea and do new things.
-"Amazing Grace" Hopper

Avatar image of me done by Chidori


Helgard posted Sun, 27 June 2010 at 12:50 PM

Thanks. I was using the metric system.

(Inches: a measuring system so old that even the people who invented it don't use it anymore, lol)


Your specialist military, sci-fi, historical and real world site.


SamTherapy posted Sun, 27 June 2010 at 6:45 PM

Oh yes we do.  Well, some of us do.  I use both.  :) 

Coppula eam se non posit acceptera jocularum.

My Store

My Gallery


raven posted Mon, 28 June 2010 at 6:23 AM

I never said it was perfect! :)  I did delete about eight frames at the start of the anim in Animation Shop to make the file size smaller, so it didn't quite just materialize :)

At the end of the day it was just a quick idea that required no node wizardry for people (example me) who don't know the ins and outs of the nodes.  I'd love to have the better version of depth cue too.

And I know, it didn't have GC enabled either! :)



bagginsbill posted Mon, 28 June 2010 at 7:10 PM

Hi folks. I have done some experimenting with the Depth Cue to get it perfect.

I need to go make something to eat, but meanwhile I thought I'd show you the effect.

Later, I'll post the shader, and an explanation of how it works. You don't need to know how it works to use it. But for those interested, I will show how I constructed it.

First a little explanation of my test scene.

I have two of those subs from Daz. There are also a bunch of poles. The small poles (which are red in the renders) are every 20 feet from the XY plane. Every 100 feet is a large (white) pole.

The camera is in the XY plane.

The closer sub's conning tower is even with the pole that is 100 feet from the camera.

The farther sub's conning tower is 250 feet from the camera, halfway between the 200 foot and the 300 foot pole.

The attached image shows the layout looking from the "Top" camera.


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 Mon, 28 June 2010 at 7:13 PM

I set up a "traditional" depth cue, with the start distance at 0 and the end distance at 160 feet.

This means that the "transmission" of light from the objects is 50% at 80 feet, and 0% at 160 feet.

If you count the poles, the last one you can see is the one at 140 feet. The pole at 160 feet (and everything behind it) is invisible. The sub seems to materialize out of nowhere at 160 feet.

This is not how it should look.

Click for full size.


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 Mon, 28 June 2010 at 7:17 PM

Now I do the math. As before, the transmission is 50% at 80 feet. But, with the correct asymptotic falloff, the transmission is 25% at 160 feet, not 0. At 250 feet (where the second sub conning tower is) the transmission is about 11.5%. At the tail of the second sub, about 360 feet away, the transmission is about 4.4%. The transmission *never* goes to 0.

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)


DarkEdge posted Mon, 28 June 2010 at 7:48 PM

Another absolute work of beauty BB, that last pic looks very real.
If I may indulge you for 2 things:
1- What the heck does a asymptotic look like in Poser terms, nodes, etc?
2- How did you get such realistic caustics? Again in Poser terms, nodes, etc.

Can you post pics if you are using nodes for this please? 😄

Comitted to excellence through art.


bagginsbill posted Mon, 28 June 2010 at 8:05 PM

Will do - but first I have to get in my car, go to my apartment, and eat something. I'm starving!


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)


Miss Nancy posted Mon, 28 June 2010 at 9:37 PM

Attached Link: http://www.renderosity.com/mod/forumpro/showthread.php?message_id=2741994&ebot_calc_page#message_2741994

bill posted sub caustics method in 2006.  as usual, find by searching poser forum, username bagginsbill.  inverse square falloff plugged into volume colour/density channel is more recent addition to his earlier technique**. ** whilst carrara can calculate wave-generated caustics quickly, mark bremmer (carrara expert) recommended method similar to bill's. ** **



bagginsbill posted Thu, 01 July 2010 at 12:29 AM

Hi all - just a quick note to let you know I haven't forgotten about this. It got me thinking about some other things, such as how the light should decrease with increasing depth, as well as with distance, and how the scattering from particles should appear.

Here's a little demo of where I'm at. The water surface is 200 feet above the bottom (ground). You can see sky through it. Notice the area of total internal reflection. But! There's an anomaly due to the fact that reflections of the distant areas, which should be dark, come from the surface which is much closer. The Atmosphere effect does not respect the total distance that info has traveled - it only deals with the direct distance between the surface and the camera. I'll have to fix that with some more math - seriously complicated math.


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)


richardson posted Thu, 01 July 2010 at 6:31 AM

book


Helgard posted Thu, 01 July 2010 at 6:33 AM

We are not impatient!! We can wait for perfection, lol, and we demand nothing less. :-)


Your specialist military, sci-fi, historical and real world site.


bagginsbill posted Wed, 07 July 2010 at 10:17 PM

Well, after another week's work on it, I'm happy to say I think I've got this pretty well nailed.

It took a rather large amount of work with algebra, trigonometry, and calculus. I don't often find much need for calculus in shader work. But to get the correct behavior of the attenuation and scattering of light caused by tiny particles, I needed it. I had to do line integrals in a 3D field.

78 nodes later, this is the result. Click for full size.

Now the question is - does anybody want to see how I did it, or do you just want the shader?

Note: I really should sell this shader as it is truly a masterpiece, even for me, but what the heck. I'll give it away. There's probably not a very big market for this effect.


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, 07 July 2010 at 10:35 PM

In the previous render, the camera was at a depth of 75 feet below the water surface. (The ground is 100 feet down.)

In this render, the camera is only 20 feet below. Observe how the scattered light is arranged differently, because of the camera position.


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)


nruddock posted Thu, 08 July 2010 at 2:59 AM

Quote - Now the question is - does anybody want to see how I did it, or do you just want the shader?

I for one want to see the workings behind the final shader.
Maybe do a PDF so that it's easier to reproduce the calculus equations.


Helgard posted Thu, 08 July 2010 at 5:05 AM

I am not too old to learn. I would like to see how it was done, although I am not guaranteeing that I will understand it the first time.


Your specialist military, sci-fi, historical and real world site.


richardson posted Thu, 08 July 2010 at 5:52 AM

In this render, the camera is only 20 feet below. Observe how the scattered light is arranged differently, because of the camera position.

Impressive results. This makes the render that holds the eye,, captivates.

I wonder about the reflection of the subs under the surface of water. If you get this much "caustic" effect below, shouldn't the reflection be almost destroyed? The reflection there truly is a moving target...

This is "groundbreaking" for poser. I hope you post some rendertimes.


Helgard posted Thu, 08 July 2010 at 6:34 AM

Bagginsbill,

If you made this a product, and included the ground, water surface, shader, lights, etc, all ready and set-up in a PZ3, that all the user has to do is to add his underwater object, be it a submarine or an Orca or underwater city, then I for one would buy this.

I think one of the great drawbacks of Poser is the shortage of ready made scenes for rendering. It doesn't help having 20 boats in your runtime, and no place to put them, or having aircraft and no decent aerial scenes to put hem into.

I always default to using background pictures for aerial scenes, which is not ideal, but the results I get with most skydomes are not as good as I get with background pictures. For most surface water scenes I just render in Vue, because the water scenes are ready made and available, in Poser I would have to create most of the scenes from scratch.

To me, the challenge in Poser is to animate and pose characters, not to spend hours creating the scene in which I want to animate my characters. There are hundreds of indoor scenes, sci-fi interiors, etc, for indoor scenes, but for outdoor scenes, Vue is always the thing I have to move to.

Just my two cents.


Your specialist military, sci-fi, historical and real world site.


bagginsbill posted Thu, 08 July 2010 at 6:58 AM

That's a great point, Helgard. While developing the shader, it was obvious that the Atmosphere alone wasn't convincing. I had to make a ground prop and a decent vegetation shader for it. I had to make the caustic light shader, and the water plane shader, and a custom IBL. Putting that all together in various combinations would, indeed, be much more valuable than the Atmosphere shader alone. So that's what I'll do.

richardson - You make a good point, and I think I can remedy that.  Note that the caustic effect is just something I threw in for good measure, and is not a feature of the Atmosphere effect. It's simply a procedural mask applied to the main light, and not based on physics, but just a quick cheat. I don't have a lot of reference material to go by. The interesting thing about the scattered light effect is that I didn't plan it - I didn't look at reference images and then set out to imitate that. I simply set up a fairly accurate assessment of the physics, and how it looks just came out. On the other hand, the caustics are totally faked. They are going to do what I tell them to do, no more, no less, so I need to know more specifically what they do so I can program that into the approximation.

If you guys know of some good references, that would be helpful. Particularly ones involving deep water and large objects. Most of the images of submarines I see are actually renders and I suppose if they are convincing, it would be fair to copy what they look like. But I'd prefer real photos.

 


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 Thu, 08 July 2010 at 6:59 AM

Oh - forgot to say - render times are the same as not using the effect. It's really cheap. Those renders were under 8 minutes on my craptop.


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)


richardson posted Thu, 08 July 2010 at 7:33 AM

When things get interesting, one of two things happen; my "craptop" lol crashes or I have to go to work...


EnglishBob posted Thu, 08 July 2010 at 9:07 AM

Attached Link: http://www.dualheights.se/caustics/

> Quote - Most of the images of submarines I see are actually renders and I suppose if they are convincing, it would be fair to copy what they look like. But I'd prefer real photos.

I would think that most real photos of submarines underwater would be murky and uninteresting. They don't venture into those shallow, clear tropical waters that make for attractive photos very often. By a similar token, although I don't know the physics, pretty effects like caustics drop off quite quickly with depth. You might need them for the jug of water in a sunbeam (the new CGI standard image, now replacing reflecting spheres over water) and for a swimming pool, but not for a submarine unless it was close to the surface.

There's a free (fake) caustics generator at the link, for anyone who doesn't know about it. I've seen its output being sold at stock photo sites, but that's another matter entirely...


Helgard posted Thu, 08 July 2010 at 9:40 AM

When looking for reference images, don't look for submarine. Underwater nature pictures, like whales and sharks, etc, taken by nature photographers are generally far better than photo's taken by military photographers.

http://poseidonwebdesigns.com/Dolphins/whaleindex1.htm

Two years ago I did a lot of work with the team that made the movie U-571, they were going to make a follow-up about a Gato class submarine in the Pacific (I had to model the submarine), so I did a lot of research on submarines, but as I wasn't going to render any of the shots I didn't do the research on the underwater rendering. Unfortunately their financing fell through and the movie never got made... missed my shot at the big time, lol.


Your specialist military, sci-fi, historical and real world site.


kawecki posted Thu, 08 July 2010 at 12:38 PM

Quote - I always default to using background pictures for aerial scenes, which is not ideal, but the results I get with most skydomes are not as good as I get with background pictures.

I use a fake curved background that is a plane.
"fake curved plane"?????
Well..., it is a big vertical rectangle with one face that has several tiny horizontal rectangles intersecting it from behind. How it works? It is still a plane, but adjusting the vertical position and the number of horizontal faces sharing the same edges the plane has the same normal as it was a curved cylinder.
This is very much better than a sky dome or background cylinder, it doesn't produce texture distortion, is easily scaled (after all is nothing more than a rectangle) and produce the same illumination as a curved background does. Changing the light angle you can have a highlight in the horizon or middle sky.
The only missing thing that would be great is a light that is able to illuminate only one object and you would have total control of the background illumination.
Take a look at my gallery.

Stupidity also evolves!


Helgard posted Thu, 08 July 2010 at 12:49 PM

Kawacki, I see what you are saying, but what I meant was something like the attached picture. To do something like this in Poser with a skydome and a ground plane is very hard, and most probably easier to do with a background picture.

Also, any sort of aerial dogfight scene, where you want to be able to animate aircraft from above, below, behind, etc, with moving camera's, is almost impossible in Poser, and much easier to just move to Vue to do that.


Your specialist military, sci-fi, historical and real world site.


Miss Nancy posted Thu, 08 July 2010 at 2:58 PM

one would suggest helg give bill $100 worth of freebies from helg's store as remuneration.



bagginsbill posted Thu, 08 July 2010 at 3:37 PM

Helgard,

I don't get why you said that. I don't have time to render an animation, but here's a still, using a full 360 degree sphere.

Perhaps you're using crappy low-res images? Or perhaps you focal length is too long?

Click for full size. I can get the same quality in any direction. If that isn't quite convincing and you want to see another angle, let me know.


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)


Helgard posted Thu, 08 July 2010 at 4:17 PM

Bagginsbill,

I know it is possible, I said in my post that it was just hard to do. It is easy to open Vue, add a terrain, an atmosphere, and you are ready to start animating dogfights. I have done scenes like this before in Poser, and I know Poser can do it, but it takes time to find the right hi-res pictures, etc.

It comes back to what I was saying earlier, that there is a lack of pre-made ready to render scenes into which you can just drop ships and planes into and animate. Each time you want to do it, you have to create the entire scene, find the images, etc. In Vue those scenes already exist in the provided sample scenes.

I am not saying Poser can't do it, I am saying that there is a lack of scenes like the one you show above.

It comes down to time. If I have to animate something, do I want to spend time modelling the thing I want to animate. No, I just buy it. So if I need to animate something in a scene, do I want to spend time creating the scene from scratch.

Like with the original start of this thread. I wanted to animate a submarine in Poser. In Vue this would consist of opening an underwater scene, putting the sub into it, and moving the sub. In Poser, as you have demonstrated, you have to create a shader for us, which you said yourself doesn't work properly without the lights, ground, water surface, light gel, etc.

I know that everything is possible in Poser. If it hasn't been done, someone will find a way to do it. But for the average user, he wants to do one thing, for example, animate a dogfight. That means he has to find a sky dome, find the pictures to map onto it, etc. If he knows he can do it in Vue without these hassles, which will he choose?

Helgard


Your specialist military, sci-fi, historical and real world site.


Helgard posted Thu, 08 July 2010 at 4:27 PM

Ok, let me just justify a bit, before I start sounding like a lazy git, lol.

I have to render 900 pictures at 800x800 pixels. I have the objects I want to render. For each image I want to render, I have to create a scene. For some simple objects, like a car, it is easy to load a model like one of Stonemasons sets and render the car. But if I want to render a ship, I have to create the entire scene from scratch, because there is no pre-made water scene. Then I have to render a submarine, another scene to build. Then I have to render a plane, another scene to build. etc etc.

So I was just saying that Poser lacks pre-made scenes. If you look in the market place, how many of the products are scenes? Lots of things to put into scenes, but very few scenes.


Your specialist military, sci-fi, historical and real world site.


bagginsbill posted Thu, 08 July 2010 at 4:28 PM

I'm curious about the reason for wanting to render in Poser then, since you already have Vue and it's certainly better at one-click terrain creation.

Note: If you have a need to render in Poser, but want to use a Vue environment, why don't you one-click the environment in Vue, then render it out as an equirectangular projection. Then you can load that onto my Environment Sphere in Poser.


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)


Helgard posted Thu, 08 July 2010 at 4:38 PM

Bagginsbill,

These are product images for my site, I do not believe it is fair on the customer to render all the promo images in Vue, if the products are Poser products. It gives a false impression of what the model looks like.

Helgard


Your specialist military, sci-fi, historical and real world site.


bagginsbill posted Thu, 08 July 2010 at 5:29 PM

Right - figured there was a reason. That makes sense.

So - how about you export the equirectangular image from a Vue-generated world?


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)


Helgard posted Thu, 08 July 2010 at 7:34 PM

*So - how about you export the equirectangular image from a Vue-generated world?

*Yep, trying that now. The first two attempts weren't too good, but that was me not paying attention to what I was doing or rendering the images too small. When I do something that looks decent I will post an image.


Your specialist military, sci-fi, historical and real world site.


richardson posted Thu, 08 July 2010 at 8:43 PM

Attached Link: http://www.oceanlight.com/html/gray_whale.html

Actually,,, anything is possible. Even the big clear subsurface reflections but we expect dark and murky when it comes to subs. Caustic effects are way more fun..

bagginsbill posted Fri, 09 July 2010 at 12:32 AM

Thanks for the links to pictures and to that caustic generator program. That sidetracked me a bit while I explored how best to use that effect.

It looks to me like the caustics are most pronounced near the surface, and less so as depth increases. So I changed the main light to behave that way.

Sorry about the delay on the "how to".


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, 09 July 2010 at 12:46 AM

So I'll just get started with the explanation. I don't have it all prepared and it will take quite a few posts. But I think it will be interesting. It was for me.

So to begin, we need first to understand how the Atmosphere's Depth Cue effect works.

There are two things it deals with. Both are caused by tiny particles suspended in the water. One is attenuation - light becomes weaker as it travels farther through the water. The other is scattering - as light strikes the particles, instead of continuing to travel forward, it bounces off the particles with a color that comes from whatever color the particle happens to be.

Let's understand attenuation first.

Attenuation is usually expressed as a fraction or ratio. Given an initial luminance coming off an object, after traveling through a certain distance, it is reduced before it reaches an observer. The ratio of the starting and ending luminance is the attenuation.

If we represent the emitted luminance with the letter I, and the final observed luminance with the letter F, the attenuation is defined to be the ratio F/I. For a given distance, this ratio is always the same, regardless of the initial luminance level.

So we can basically understand that attenuation is a function of distance (as yet unknown), that produces a characteristic ratio:

F/I = Attenuation(distance)

Clearly the observed luminance, F, can never be more than the starting luminance, I. Otherwise we're talking about light amplification, rather than absorption and scattering. So we know that Attenuation(x) can never be more than 1. And in fact it can only be equal to 1 when x = 0, i.e. when the light hasn't yet travelled any distance at all.

Let's ignore scattering for the moment, and just try to understand how (Depth Cue) DC implements attenuation, and why that is a problem.


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, 09 July 2010 at 12:53 AM

The DC feature uses two numbers to define the attenuation.

The first is the DepthCue_StartDist(ance). Until the distance is bigger than this value, the attenuation is 1.

The second is the DepthCue_EndDist(ance). This is the distance at which the attenuation is 0.

For any distance between those two, the attenuation is a linear decrease from 1 to 0.

If we denote the start distance with the letter a, and the end distance with the letter b, then the function that is implemented inside the Atmosphere node for DC is shown in the attached graph.

The linear decreasing region is implemented by 1 - (x - a) / (b - a). Of course that is a straight line forever, so the effective value is Clamped. Clamped just means the value is constrained to be at least 0 and no more than 1.

So the full equation is Clamp(1 - (x - a) / (b - a)), but I'm not going to keep writing the Clamp part. Just keep in mind that attenuation is always in the range 0 to 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 Fri, 09 July 2010 at 12:58 AM

Now it's totally silly to have DepthCue_StartDist be anything but 0, at least for underwater attenuation. Unless there is an air bubble around the camera, attenuation begins immediately.

So we're going to set a = 0, and only deal with the end distance, b.

This simplifies our equation a bit. With a = 0, the equation is just:

1 - x/b

In the attached graph, b = 6.

I'd like to introduce another idea here that will be very useful later. This is the notion of "half distance". This is the distance at which the attenuation function is precisely 1/2. The half distance is exactly b/2. In this case, that would be a distance of 3.


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, 09 July 2010 at 1:11 AM

So is this straight line really how light is attenuated in water? No.

From first principles, I could show that the attenuation function is actually exponential decay, via calculus. But while that's an interesting little diversion, it's kind of OK to just accept it as truth.

Exponential decay can be expressed in many ways. But the way that I find most useful with regard to a comparison to what we've seen already is like this:

.5 ^ (x / h)

Where h is the distance where the attenuation is exactly 1/2, i.e. the half distance I mentioned.

It's easy to verify why that works. Consider the case where x  = h. Then the function is

.5 ^ ( h / h)

which is

.5 ^ 1

which is exactly 1/2.

Now if I want to understand how exponential decay looks compared to the linear falloff that DC implements by default, I would choose to line up the half distance of the exponential decay function with the half distance of the linear DC function.

Recall earlier that the linear DC half distance is b/2. So I want to use b/2 for my h.

.5 ^ (x / (b / 2))

With a little rearranging it should be clear that this is:

.5 ^ (2(x / b))

And so I have changed the graph - the old linear attenuation is now a dotted blue line. The new, correct exponential decay attenuation is the green line.

Some things to note:

They coincide at x = 0 and x = 3, which is the half distance.

In the range 0 <= x <= h, they aren't very different. I like to use the phrase "directionally correct" in a case like this. By that I mean that the linear DC attenuation is pretty close to what it really should be in that range. It starts and ends in the right places, and stays pretty close to the correct value everywhere in between.

After x is greater than h, the linear DC is not directionally correct. It goes to 0, first of all, while the real function never goes to 0. That could be tolerated if it didn't go to zero until the real function was very close to 0. But instead it goes to zero damn fast, while the real function keeps on going with significant non-zero values for quite a while.

This is why the built-in attenuation doesn't look right except for stuff that is close to the camera, closer than the half distance. Those things look pretty much how they should. But everything after the half distance looks totally wrong.
 


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, 09 July 2010 at 1:26 AM

To help visualize how extremely wrong this is, I did another graph. Also, in this graph I've changed the notes to use h instead of b/2.

So again we have the case of h=3. In addition, I've graphed the case where h=1.

In that case, when x = 2, the linear attenuation has already reached 0 - no light is transmitted to the camera.

Whereas, the exponential decay can be seen to get close to 0, but not until the distance is at least 8 times the half distance.

That's a huge difference. With the standard use of linear attenuation, you're completely unable to see anything from x = 2 to x = 8, things you should be seeing in the render.

Note I haven't talked about units here. The units really don't matter, but let's use some units that mean something to us. Suppose h = 100 feet. Then the linear attenuation makes everything invisible after 200 feet. But with the correct attenuation, we should still be able to easily see things out to 600 feet, and if we look hard, we should be able to detect objects out to 800 feet.

If you're used to metric, then imagine 200 meters versus 800 meters.

Whatever units you're used to thinking in, it should be intuitively obvious that this is a serious departure from reality.

So what do we do about it?


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)


kawecki posted Fri, 09 July 2010 at 1:38 AM

Nothing to do with submarines, only an aerial scene with simple planes:

Stupidity also evolves!


kawecki posted Fri, 09 July 2010 at 1:39 AM

The scene setup:

Stupidity also evolves!


bagginsbill posted Fri, 09 July 2010 at 1:59 AM

In any system that does something wrong, it sometimes seems there is no way to make it right. But quite often, there is. Any time the wrongness is reversible, then there is a way to transform what you have into what you want. This comes up all the time. For example, monitors display luminance wrong. Dark things appear darker than they should. But if we have an understanding of what it does mathematically, as a function, and that function can be inverted with precision, then we can transform what we pass into that bad function such that it ends up doing nothing wrong. In the case of bad monitor response functions, we know that the displayed luminance is a power function, and if we pre-condition our output with the opposite power function, those things will cancel out and we'll get what we want. That's what gamma correction is. Feeding a bad function precisely constructed wrong data will cause the badness to go away.

So we know our "bad" function is:

1 - x/b

Well what can we manipulate here? We can't change the number 1 - that's a constant. We can't change x - that is the distance between the camera and the object and it is what it is. We're running out of options. What's left? Can we mess with the end distance, b, in some way as to make the bad function into a good one?

Hmmm.

What I'm saying is we want to arrange things so that 1 - x / b (the bad function) becomes the same as .5^(x/h), the good function. Algebra to the rescue!

We want to force this to be true:

1 - x / b = .5 ^ (x / h)

I'm suggesting that if I can solve for b, I'll end up with a new "wrong" function that will produce exactly what I want.

In order to avoid some typing, let's let G represent the good function I want, so G = .5 ^ (x / h)

Rewriting with G I have:

1 - x / b = G

Subtract G from both sides:

1 - x / b - G = 0

Add x / b to both sides:

1 - G = x / b

Multiply both sides by b:

b ( 1 - G) = x

And divide both sides by 1 - G.

b = x / (1 - G)

We have to pause for moment. During a proof, you have to make sure that each step is legal. For adding, subtracting, and multiplying, everything is legal. But for dividing, we must promise not to divide by 0, otherwise we can get into trouble, since dividing by 0 is impossible. I just divided by 1 - G. Can that ever be 0? 

Indeed it can. Remember that G is the correct and good attenuation function, and that this function does equal 1 at some point. Therefore, 1 - G could be 0. But where is it that G is 1? Only when the distance is 0. Meaning, we're talking about dividing by 0 if and only if we're rendering an object that is actually touching the camera. I happen to know that will never happen - renders can't render anything that is touching the camera. That would entail a divide by 0 when trying to do the perspective projection. So - we can safely ignore the possibility that G is 1, and therefore ignore the possibility of dividing by 0 in this proof.

OK. With that safely out of the way, we've managed to isolate b, the end distance. All that remains is to put back the definition of G:

b = x / (1 - .5 ^ (x / h))

Wow - Yay! This is exactly the compensation function we need to make the Poser Atmosphere attenuation function do what we want. We need to plug a node network into DepthCue_EndDist, also known as "b", that implements the function we just arrived at.

Great. So all we need is the distance from the camera to the point being rendered.

Uhoh. There is no node that does that. I wish there was. Are we dead?

Nope. If we accept a tiny bit of manual work setting up a shader, we can get this done.

But ... it's really late and I've got to go to bed. So, more tomorrow.


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)


kawecki posted Fri, 09 July 2010 at 2:11 AM

I did a trick with the ground plane. I perspective UV corrected with Poser because the original aerial image didn't look good with planar projection, also had to correct with other program the mapping that Poser did that was also not good.
Of course that this setting only will works with the defined camera angle, but it will not hard to do a morphing ground plane that adjust itself its UV mapping with the different cameras angles.
Also added a little distance fog with transparent planes. I have not used Poser's depth cue because Poser has not control of the height of the fog.

All this works fine for static scenes and the scene easily can be mount picking the right background and ground images. Instead of a ground plane you can use a terrain if it is properly mapped.
For animation things get very much more complicated due the different cameras angles and so the ground and background planes becomes big and to achieve a good quality the image textures would be very huge and impossible to render. Also is waste of resources, you load a huge resource and use a tiny fragment for a scene rendering.
Tiling  can help a little because you can use normal textures, but for animation it won't look good to the repetitive and boring pattern of the textures.

Vue solve this problem easily. Vue can generate procedural clouds, sky and terrain mapping, also you have a great control of fog, haze and atmospheric effects.
Vue only creates what the camera see in the rendering, move the camera and it will create other things that the camera see and is fast.

I have very little experience with Poser's atmosphere, when I tried to do something the renderings were so slow that I quit and most things thet I wanted was unable to do.
I want smoke, fire, fog limited to a volume, ghosts, ghostly effects......

Stupidity also evolves!


kawecki posted Fri, 09 July 2010 at 2:58 AM

And now the submarine:

The attenuation is some function of the distance (x), in general can be exp(x) or some polynomial approximation of exp(x).
Now what is x? Is supposed to be the distance between the camera and a point of an object.
The problem is from where do we get the value of the distance(x)?
We can get the distance from the z value in the camera space, but where is z = 0 and the zscale factor that depends on the scene?
The distance can be  d = scale.(Zcamera - Zpoint).
Now the z value in the camera space is perspective corrected:  Zcamera = k/(d + Zreal)
where a and d are parameters that depend on the camera setting.
We must know all those parameters and scales, then invert the perspective transformation and only then we can have the real and correct distance to be used in the attenuation function.
For complicating more the illumination of a point depend on how much the light illuminating the point attenuated traveling through the water.
And much more the attenuation in water depend on the frecuency or wave lenght of the light, longer wave length attenuate much more that shorter and illumination turn more blueish as light travel more distance. Deep water is not green as generally painted, is blue!

Stupidity also evolves!


Helgard posted Fri, 09 July 2010 at 2:59 AM

Bagginsbill, amazingly, I understand everything so far. It all makes sense and the logic works for me.

kawecki - that system works, but how long does it take you to set up a new scene from scratch, to find the images, size them, apply them, correct them, etc.


Your specialist military, sci-fi, historical and real world site.


Helgard posted Fri, 09 July 2010 at 3:03 AM

Mmmm, after reading kawecki's last post, I have some questions for both kawecki and Bagginsbill, but I think i will wait until the explantion is over, because maybe they are still to be answered.


Your specialist military, sci-fi, historical and real world site.


kawecki posted Fri, 09 July 2010 at 3:26 AM

Quote - kawecki - that system works, but how long does it take you to set up a new scene from scratch, to find the images, size them, apply them, correct them, etc.

Well, as I almost don't do aerial scenes, I already have all what I need, a background plane, a fog plane and a tiled ground plane and some tiled terrains. The setup is very fast.
Now comes the textures and here is the problem, it can take hours to find one.
I can make a scene, pose the figures and even make some props in 30 minutes, render in few minutes and spend five hours finding a texture.
Is not by itself so difficult, I have a good presellected textures of excellent rendering quality (some textures can be bad and very low quality if you look at them, but render in a marvelous way).
I have 5GB of this textures in my HD, the models that I have have a good mapping.
The problem is to find one that express what I wanted to do, sometimes the first that picked was exactly what I wanted, so it takes seconds and the final image is done in less than an hour, other time I have to pick tens, render to see how it looks and try again and sometimes I quit.
As for aerial images I discovered with my example is that I need to make a morphing ground plane, once is done it will be very easy to use for aerial scenes and other.

As for pre-made scenes I only have done a forest. A ground with a lot of trees, you can move and rotate the camera within some limits and there are trees there, even has a road.
For keeping the number of polygons low the tree have no top and are only a low poly 8 side cylinder. For what the top if your camera doesn't see it?

Stupidity also evolves!


kawecki posted Fri, 09 July 2010 at 3:49 AM

The forest

Stupidity also evolves!


kawecki posted Fri, 09 July 2010 at 3:51 AM

And what it is.

I didn't like the original textures, so I spend a little time finding other.
I did this prop several years ago and not finished, one day I'll continue and improve it.

Stupidity also evolves!


bagginsbill posted Fri, 09 July 2010 at 9:58 AM

> Quote - Now what is x? Is supposed to be the distance between the camera and a point of an object. > The problem is from where do we get the value of the distance(x)? > We can get the distance from the z value in the camera space, but where is z = 0 and the zscale factor that depends on the scene? > The distance can be  d = scale.(Zcamera - Zpoint). > Now the z value in the camera space is perspective corrected:  Zcamera = k/(d + Zreal) > where a and d are parameters that depend on the camera setting. > We must know all those parameters and scales, then invert the perspective transformation and only then we can have the real and correct distance to be used in the attenuation function.

Sorry, but everything you said after the underlined sentence is not true. What you describe is the Z-Depth, but that's not the "x" that DepthCue is using. It is using the exact straight line distance from the camera to the object. Nothing about the camera rotation or focal length or perspective mode matters at all. It is doing exactly what it is supposed to do, as you said in the second sentence above.

This is easily proven by a simple test. Set up a tile pattern on the ground. Point the camera down a bit. Set the Depth_Cue start distance (a) to something within your view. Set the Depth_Cue end distance (b) just slightly past that. I used a = 10 feet, and b = 10.1 feet. Thus, the linear decrease in attenuation will start at 10 feet and end at 10.1 feet, forming a pretty sharp gradient that is only 1 inch thick.

If what you say is true, the gradient will appear to be a straight line. If, on the other hand, it is actual radial distance, not Z-depth, the gradient will appear to be an ellipse. If you point the camera straight down at the ground it will be a circle.

Observe the curve (sometimes I am poetic).

So, having established that all the problems you anticipated do not exist, can you figure out how we can calculate the distance from the camera to the object?


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, 09 July 2010 at 10:01 AM

This is looking straight down at the ground. Clearly a circle, despite the fact that the Z-depth is a constant. It's not Z-depth.

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)


Helgard posted Fri, 09 July 2010 at 10:33 AM

Bagginsbill, you are right, but one thing that kawecki said is also true, and I don't know yet if you have taken this into account, and it may be a bit over the top for the purposes of what we want. To explain:

  1. We are trying to find a "correct" system of depth cue for an underwater scene.

  2. We are going to handle distance as well as the scattering of light by particles.

  3. But as kawecki said, the deeper you go, the light should fade, and as he also said, and this is really finicky, the light should become bluer, until it eventually fades almost totally to black at real deep depths.

While I was looking at all the reference pictures I saw this effect but wasn't really thinking about it until kawecki mentioned it. I think for what we want to do, and the depth at which we are working (100 feet), this is maybe not really a consideration or something that needs to be taken into account.

I think in this picture you can see the darkening effect of depth.

http://fc05.deviantart.net/fs13/f/2007/047/8/f/Underwater_Light_and_Bubbles_by_Della_Stock.jpg 

But at the depths we are working at, you don't really see as much of an effect:

http://www.hawaiipictures.com/pictures/gallery/underwater/underwater11600x1200-1.jpg


Your specialist military, sci-fi, historical and real world site.


bagginsbill posted Fri, 09 July 2010 at 1:19 PM

I will get to that. I've already taken care of it. Apparently you guys don't recognize the depth influenced changes in the attenuation and the scattering in my images. Yes we're only dealing with 100 feet, but there is already a big difference, versus the constant amount of scattering that the built-in math does.

My math takes into account not only what depth you're at, but whether you're looking up, across, or down, automatically.

When I do the side-by-side comparisons, you'll be much more aware of the fact that I've already shown what you're talking about. Just not in deep water.


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)


Helgard posted Fri, 09 July 2010 at 1:51 PM

Cool, as I was saying earlier, I thought you would still get to that, lol, so I should have kept my mouth shut, lol.


Your specialist military, sci-fi, historical and real world site.


Coleman posted Fri, 09 July 2010 at 2:02 PM

I like the turbulence emphasis in Red October.

I think they decided to fake deep water lighting and use turbulence for dramatic effect. In deep water you probably couldn't visually see anything anyways.

Could you make some turbulence prop for your animated sub, Helgard? That would be very cool.

http://movieclips.com/watch/the-hunt-for-red-october-1990/escaping-torpedoes/


Helgard posted Fri, 09 July 2010 at 2:23 PM

Coleman,

I have a script by Ockham called Bubbles or something like that, that emits bubbles, which I have used before in underwater animations. I am sure I could get a good effect with that, although, in reality, there will be no bubbles from a submarine, lol, it will sort of defeat the purpose of being a stealthy ship. :-)

In films and movies they often cheat for effect. In most submarine clips, because there is no external markers, you cannot actually see that something is moving, so adding bubbles gives a visual market to make the viewer think the object is moving. If they didn't add the bubbles, the submarine would literally look like it is standing still, unless it was moving past something like rocks or the surface ot the ocean bed.

It is the same with muzzle flashes in movies. Real guns, in daylight, make very little of a muzzle flash and the flash that it does make lasts for hundreths of a second, but in movies you always see massive brusts of flame. if they didn't add this, you would actually not realise that the gun has been fired. If you look at news clips where this effect has not been added in the guns look a lot different when they fire compared to the guns in movies.


Your specialist military, sci-fi, historical and real world site.


kawecki posted Fri, 09 July 2010 at 8:56 PM

Quote - While I was looking at all the reference pictures I saw this effect but wasn't really thinking about it until kawecki mentioned it. I think for what we want to do, and the depth at which we are working (100 feet), this is maybe not really a consideration or something that needs to be taken into account.

The effect is still important even at low depth. At depth of 30 m we can ignore the attenuation of sun light coming from above, but we cannot ignore the effect of light traveling in horizontal direction through water.
A red submarine that is near the camera should look red and another red submarine that is one kilometer far away must look black, while a near blue submarine will look blue and another far away blue submarine still will continue to look blue.
This problem can be solved if we can assign different attenuation values for each RGB component with Red component having the bigger attenuation and blue the smaller.
I suppose that we can continue to use the same function for each component only changing the factors for R,G and B

Stupidity also evolves!


kawecki posted Fri, 09 July 2010 at 9:32 PM

Quote - Sorry, but everything you said after the underlined sentence is not true. What you describe is the Z-Depth, but that's not the "x" that DepthCue is using. It is using the exact straight line distance from the camera to the object. Nothing about the camera rotation or focal length or perspective mode matters at all. It is doing exactly what it is supposed to do, as you said in the second sentence above.

Poser does all the calculation internally, you only can set the start and end point of depth cue in Poser will do by itself all the calculation of distances and attenuate the light I suppose in linear way.
But if you want to change the attenuation function to be different what Poser does internally you must calculate the distances by yourself and apply your transfer function.
There are only two ways to calculate distances, no matter if you or Poser does.
You can calculate distance in the World Space or in the Camera Space.

In World Space you need the x,y,z values for the Camera and the x,y,z for each point of the objects in scene.
For the distance calculation you must perform three substractions, three squares and one square root for each vertex of the scene, something very time consuming.

In Camera Space to calculate distances you only need to know the z value of the camera and the z value for each point, values that you get from the Z buffer.
With a linear Z buffer the distance is nothing more than the difference of z values.
For a perspective Z buffer you must first perform a division and then the difference of the z values, is more time consuming than a linear Z buffer.
Even so, all is very must faster than in the World Space because you only need to calculate distances for each pixel of the scene and not all vertices of all objects. You calculate only what you see and not what is obscured by other objects.
Of course that Poser must do it internally in the Camera Space.

In either case you also need to know the scale factor of the World or Camera Space and in case of the perspective Z buffer also the Camera parameters.

Stupidity also evolves!


seachnasaigh posted Sat, 10 July 2010 at 2:22 AM

(BB)

Quote - So - how about you export the equirectangular image from a Vue-generated world?

That was what prompted me to get Vue - I wanted to generate texturing images for a large Poser environment model i'm working on, one large enough to accommodate my elvish tree & cottage models, yet feasible for populating a forest setting with trees.

Poser 12, in feet.  

OSes:  Win7Prox64, Win7Ultx64

Silo Pro 2.5.6 64bit, Vue Infinite 2014.7, Genetica 4.0 Studio, UV Mapper Pro, UV Layout Pro, PhotoImpact X3, GIF Animator 5


Coleman posted Sat, 10 July 2010 at 3:02 AM

Thanks for the explanation.

Quote - Coleman,

I have a script by Ockham called Bubbles or something like that, that emits bubbles, which I have used before in underwater animations. I am sure I could get a good effect with that, although, in reality, there will be no bubbles from a submarine, lol, it will sort of defeat the purpose of being a stealthy ship. :-)

In films and movies they often cheat for effect. In most submarine clips, because there is no external markers, you cannot actually see that something is moving, so adding bubbles gives a visual market to make the viewer think the object is moving. If they didn't add the bubbles, the submarine would literally look like it is standing still, unless it was moving past something like rocks or the surface ot the ocean bed.

It is the same with muzzle flashes in movies. Real guns, in daylight, make very little of a muzzle flash and the flash that it does make lasts for hundreths of a second, but in movies you always see massive brusts of flame. if they didn't add this, you would actually not realise that the gun has been fired. If you look at news clips where this effect has not been added in the guns look a lot different when they fire compared to the guns in movies.


Helgard posted Mon, 13 September 2010 at 6:48 AM

Bagginsbill: Just bumping this up again. Any idea when and if you will ever make the product. If you don't have time I am willing to help out. I sort of need it.


Your specialist military, sci-fi, historical and real world site.


bagginsbill posted Mon, 13 September 2010 at 8:26 AM

I'm overwhelmed with paid work already. Want to make a joint product? I almost think that's the only way I'll ever get anything commercial published.


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)


Cyberwoman posted Mon, 13 September 2010 at 8:33 AM

I would be interested in seeing the work behind it (although I second nruddock's suggestion that a PDF might make it easier to work with the equations). Not sure if it will make any sense, since I think I've forgotten almost everything from my high school calculus class, but I'd like to take a look at it anyway. Maybe it will inspire me to go find my old textbooks and learn some of it again.

~*I've made it my mission to build Cyberworld, one polygon at a time*~

Watch it happen at my technology blog, Building Cyberworld.


bagginsbill posted Wed, 15 September 2010 at 12:37 PM

I am almost ready to post the scene. There are a lot of parameters that have to be adjusted whenever you move the water surface, change the scatter color, or move the camera. I wrote a Python script to fully automate all this. It will synchronize values across:

Atmosphere shader
SunLight shader
IBL shader
Environment Sphere
Water Plane

Pretty cool. Will post soon.

Here is a render with the water surface 100 feet above the ground.


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, 15 September 2010 at 12:38 PM

Change surface to 200. The water plane and the environment sphere move. And all the lighting and shading is adjusted.

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, 15 September 2010 at 12:38 PM

Here at 300 feet.

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, 15 September 2010 at 12:40 PM

Observe how the light and caustics change with depth.

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, 15 September 2010 at 12:43 PM

Look up and you see the sky through the water, in a physically correct way.

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, 15 September 2010 at 12:50 PM

Scattering color and intensity are easily adjusted in one place.

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, 15 September 2010 at 12:55 PM

I'll eventually make other ground covers, but I think this one works pretty well even up close. It's 100% procedural.

The ground prop I made myself. You can easily make others using any terrain generator. I used Sculptris.


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)


Helgard posted Wed, 15 September 2010 at 12:57 PM

baginsbill, sending you an e-mail now.


Your specialist military, sci-fi, historical and real world site.


Snarlygribbly posted Wed, 15 September 2010 at 12:59 PM

Wow. You've done some pretty impressive things in the past but this might be the best yet!
Amazing stuff. Sometimes I'm impressed when I see something done in Poser that I wouldn't have been able to work out how to do myself. But this is on an altogether different level, because this is stuff I wouldn't have thought anybody could do in Poser.

Free stuff @ https://poser.cobrablade.net/


Helgard posted Thu, 16 September 2010 at 8:38 AM

OK, the project is almost ready, we are adding some props for extra underwater detail, so there will be a WWI ship, WWII submarine and modern freighter in two halves, all low polygon and low detail, with rust textures, to add to the scenes. There will also be a few other typical underwater props, an anchor, old 18th century cannon barrel, and a few other things. The product will be designed for both underwater and surface scenes.

There is also an optional animated caustic map for those who want to animate underwater scenes, as well as a script to create bubbles from any prop in the scene.

So, what else do you want (and will actually use) in a product like this?

Fish, ships, submarines, scuba gear, etc, are things that should be seperate products, lol, so don't ask for those.


Your specialist military, sci-fi, historical and real world site.


flibbits posted Fri, 15 July 2011 at 10:41 PM

Was this ever completed?



bagginsbill posted Fri, 15 July 2011 at 11:02 PM

I pretty well finished the technology part, if I recall. I remember working on automating it so that all the shader tweaking that had to be done based on the y-coordinate of the water surface would be handled without user intervention. Prior to that, when you moved the water surface prop up or down, or you moved the camera, you had to go into several places in shaders and update some numbers. 

I'm pretty sure that all that remains is to document it and package it up.


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)


Anthony Appleyard posted Fri, 05 August 2011 at 12:30 AM

Please, in summary, how do I get these various caustic and linear-fade amd asymptotic-fade effects, and the seen-from-underwater surface light refraction effect?And the  waves-on-water-seen-from-below? Which of them need Poser 8 rather than Poser 7? How did you make the seabed seen in some of the scenes? Any chance of a brief tutorial?


bantha posted Tue, 04 October 2011 at 1:21 AM

BB, did you publish the python scipt for your underwater shader somewhere? 


A ship in port is safe; but that is not what ships are built for.
Sail out to sea and do new things.
-"Amazing Grace" Hopper

Avatar image of me done by Chidori


bagginsbill posted Fri, 25 July 2014 at 4:52 PM

Bumping my thread.

If people want this I'm happy to dig it up and show how it's done.


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)


seachnasaigh posted Fri, 25 July 2014 at 5:16 PM

     I certainly want it.  I'd like to see the math too, if you have a means of posting scribbles.

Poser 12, in feet.  

OSes:  Win7Prox64, Win7Ultx64

Silo Pro 2.5.6 64bit, Vue Infinite 2014.7, Genetica 4.0 Studio, UV Mapper Pro, UV Layout Pro, PhotoImpact X3, GIF Animator 5


willyb53 posted Fri, 25 July 2014 at 5:36 PM

I am also very interested :D Bill

People that know everything by definition can not learn anything


bantha posted Sat, 26 July 2014 at 1:39 AM

I'm still interested.


A ship in port is safe; but that is not what ships are built for.
Sail out to sea and do new things.
-"Amazing Grace" Hopper

Avatar image of me done by Chidori


bagginsbill posted Sat, 26 July 2014 at 7:17 AM

OK I found the underwater runtime. I have to do some work to use it. Upon loading the scene into PP2014, it changed the names of my props, adding _1 to them all. This messed up the script which expected names like "WaterPlane", not "WaterPlane_1".

I'm improving some of the materials. Here's a demo.


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)


parkdalegardener posted Sat, 26 July 2014 at 9:00 AM

Very cool



Anthony Appleyard posted Sun, 27 July 2014 at 5:27 AM

Attached Link: https://en.wikipedia.org/wiki/Bow_thruster

This image is a Poser render of my surface (and short-dive-submersible) grab-dredger. The sea surface is the ground plane re-colored and 50% transparent (edge transparency = 0%); the deep sea beyond visibility limit is the background with color red=0, green=128, blue=255. How could I make the effect of underwater visibility decreasing with depth, while keeping the air above water level clear?

(The big hole each side in its bows is the inlet and exit of a bow thruster)


FightingWolf posted Mon, 28 July 2014 at 9:39 PM

I'm interested.  The enviro-dome is awesome and I can't wait to get a chance to render underwater scenes.



bagginsbill posted Mon, 28 July 2014 at 10:43 PM

Sorry been working on updates to this but my PP2014 keeps crashing.


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 Mon, 28 July 2014 at 10:46 PM

Quote - This image is a Poser render of my surface (and short-dive-submersible) grab-dredger. The sea surface is the ground plane re-colored and 50% transparent (edge transparency = 0%); the deep sea beyond visibility limit is the background with color red=0, green=128, blue=255. How could I make the effect of underwater visibility decreasing with depth, while keeping the air above water level clear?

(The big hole each side in its bows is the inlet and exit of a bow thruster)

There are several ways to do this, none of which are obvious or great. Given that Poser lighting has real volumetric scattering ability, we have various cheats.

If you have most of the light coming from a single infinite for the sun, you can set it to provide less light as the depth increases below a certain level in world coordinates.

It is not obvious how you'd do this, but it's fairly easy once you know how.

I will show.


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 Mon, 28 July 2014 at 11:09 PM

Given that you want to place a water plane at some height in the Poser scene, you can set up a shader on your infinite light that will attenuate the light based on light frequency (color) as the light descends below the surface.

Set up your infinite (sun) like this.

The key parameters are identified with boxes and arrows:

 

Transmission Attenuation Color - This is where you get to say what happens to white light as it descends through the water. Water attenuates red faster then green or blue so the red component should be lowest. Depending on the impurities also absorbing and scattering certain colors, the green can be more or less than the blue. You decide. In this case, I put RGB 160, 190, 200. I use gamma correction so those turn into RGB coefficients according to the rules of gamma correction. If you don't use GC, you may need to adjust this color.

Transmission Distance - This is the distance at which white light turns to the color you gave above. I set the shader up for inches, so this is saying white light becomes the Attenuation Color at 1200 inches. (100 feet) If you decrease the number, light will diminish more quickly. If you increase it, it will stay stronger deeper.

Water Level - This is the level of your virtual water surface, in inches. I have it here set to 2400 inches (240 feet). 

So - in this setup, the "ground" is 240 feet underwater and that is where my bottom is.

 

 


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 Mon, 28 July 2014 at 11:11 PM

Here is a test setup.

I have a curved backdrop with a "ground" or "bottom" at 0 inches. The ship rests at ground level.

At 2400 inches above it, I have a board that intersects with the curved backdrop wall. This is so you can see where 2400 inches is.

As you can see, the sun light decreases and changes color below 2400 inches. Above 2400 inches it is at its normal strength and is white.


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 Mon, 28 July 2014 at 11:19 PM

Now when I add a (flat) water plane 200 feet above the ground, and look down from above, I see the depth is darker and bluer than above the water.

Note that I'm using refraction. You were using transparency. Don't use transparency - it's completely fake looking.

The water surface bends the light. What is at the bottom should look flattened.


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 Mon, 28 July 2014 at 11:22 PM

If I decrease the Transmission Distance to 400 inches (from 1200) things get quite dark in the deep blue ocean.

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 Mon, 28 July 2014 at 11:27 PM

Add some realistic wave shapes and it's starting to look like the real thing.

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 Mon, 28 July 2014 at 11:30 PM

And with a ship on the surface, looking across, not down, we mostly can't see anything under the water.

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 Mon, 28 July 2014 at 11:34 PM

I used the same techniques to make this image recently.


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 Mon, 28 July 2014 at 11:38 PM

To get realism under the water, we have to do much more. We have to simulate the effects of the missing volumetric lighting equations. All I did here was move the camera. It's not going to give the volumetric lighting and floating particle attenuation.

Poser doesn't have any of that. I will show you how to add all of it.

Notice, also, that Poser doesn't know how to do the reflections from under the water surface correctly. This is a sore point with me. But no matter. I will show how to get them.

If you don't want to follow the math, you can skip, as I will be supplying the shaders. But there is a lot of math and knowing it will help you deal with realism in other situations.


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 Mon, 28 July 2014 at 11:46 PM

For those who want to know the math of the Sun shader...

 

The P node gives absolute world coordinate position of whatever is being lit. It does so in units that are 1/10th of a Poser inch, or 1/1032 Poser Native Units.

I multiply the Y coordinate by .3 because I want inches (.1) and because the XYZ values get averaged as the output goes into a number. In other words, the output will be .3 * 10 * (Y in inches) / 3 which is Y in inches. Voila. We'll call this Y. In matmatic:

Y = P(0, .3, 0).asNumber()

Letting W stand for the water level in inches,

W = 2400

we need to know the depth (d) of the point being shaded below the water surface, so

d = W - Y

We don't want negative depth, so everything less than zero should be treated as 0. (Negative depth means above the water, and should be left alone).

d = Max(d, 0)

We're going to want to scale that depth according to some adjustable attenuation distance, D

D = 1200

d = d / D

The attenuation of light happens according to the exponential function. The attenuated light color RGB(160, 190, 200) goes into an exponentiation with the depth as the exponent and the color as the base.

C = IColor(160, 190, 200) ** d

That's the math for the sun shader.

Why does the negative depth (i.e. stuff above the water) not get changed?

Because for things above the water, we saw to it that d is 0. Any color to the power 0 is white.

Here's the entirety

C = IColor(160, 190, 200) ** (Max(2400 - P(0, .3, 0).asNumber(), 0) / 1200)


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)


Anthony Appleyard posted Tue, 29 July 2014 at 5:01 AM

Here is my attempt:-

Anthony Appleyard posted Tue, 29 July 2014 at 5:02 AM

Here is the maths (light4, and the ground plane). (Lights 1 2 3 are off.)

I always work in Poser units (1 = about 100 inches.)


Anthony Appleyard posted Tue, 29 July 2014 at 5:33 AM

It's found something down there.

 

Transmission distance = 15 (= 1500 inches = 125 feet, here.


Anthony Appleyard posted Tue, 29 July 2014 at 5:46 AM

Got it.

 

To Bagginsbill :: hanks for the underwater light texture setting info; where could I get the realistic wave shapes from in your images above?

Do those wave shapes cause appropriate light refraction in light passing through the water surface?

Anthony Appleyard posted Tue, 29 July 2014 at 6:37 AM

As I use y=0 as water level, is it possible to use maths nodes in the Atmosphere texture to make one atmosphere setting above water level (= in air) and another atmosphere setting (including underwater visibility limit) below water level (= underwater)?

Light penetrates by diffusion underwater much further than the underwater visibility limit.


bagginsbill posted Tue, 29 July 2014 at 6:41 AM

Quote - As I use y=0 as water level, is it possible to use maths nodes in the Atmosphere texture to make one atmosphere setting above water level (= in air) and another atmosphere setting below water level (= underwater)?

Yes. No matter what the water level, atmosphere settings can use the y coordinate to change behavior.

The one thing that can't is IBL (image based light). In an IBL, the P node doesn't do what we expect it to at all. Pity.


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 Tue, 29 July 2014 at 6:45 AM

Quote - Here is the maths (light4, and the ground plane). (Lights 1 2 3 are off.)

I always work in Poser units (1 = about 100 inches.)

It may be that you work in PNU, but I set the shader to work in inches, because the P node is always 1/10th of an inch and ignores your Poser Display Unit.

So you actually set the transmission distance to 10 inches.

That's ok - sometimes water is that densely filled with particles. But if you meant 1000 inches you should type 1000 there.

When simulating very dense particle concentration, you would use brown or green, not blue, since the attenuation of water is not the main factor - it's the particulate matter suspended in the water.

If you really want to work in PNU, so that you can express the water level and the transmission distance in PNU, then you should change the Subtract node's Value_2 from 1.000 to 1/103.2 which is 0.00968992248.


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 Tue, 29 July 2014 at 6:49 AM

Anthony you're still using transparency in your water plane, and adding a very blue diffuse reflection. Neither of those things should be happening.

The light color now shifts to blue and you don't need to fake it in the water plane.

Use refraction and reflection, modulated by a Fresnel_Blend node.


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)


Anthony Appleyard posted Tue, 29 July 2014 at 7:38 AM

Thanks for your help. I have now tried Fresnel on the the surface node’s refraction_color channel. I always get all sky reflection :: I see that in Poser the water is absolutely flat, but in a real harbor there would be wind-raised small waves all over the dock water, making different refraction effects.


bagginsbill posted Tue, 29 July 2014 at 7:46 AM

One step at a time. Waves are difficult. First show me your water shader with the Fresnel setup. If it's not right I'll notice.


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)


Anthony Appleyard posted Tue, 29 July 2014 at 9:03 AM

Here:-

The sea surface (= the ground plane recolored) is transparency=1, edge transparency=0, Diffuse Value = 0. (If I set both transparencies = 0, I always get the sea surface opaque.)

I have linked the refraction color to a Fresnel Blend mode, outer color = 0 10 200 (red first), inner color = 127 127 127


bagginsbill posted Tue, 29 July 2014 at 1:13 PM

For the third time - no transparency. That does not bend the light. Water bends the light. You want to use refraction.

Here is a basic (no waves) water setup using Fresnel_Blend. The Fresnel_Blend node determines the amount of reflection versus refraction according to the Fresnel reflection coefficient equation. (i.e. real life)

Turn off shadows for the water prop and put this shader in.

Once you get to this, then you can experiment with waves in the bump channel.

However, that will be many days of discussion, so start with simple water and get used to that. I bet you will still have questions or do things wrong.

For example, I repeat: TURN OFF SHADOWS FOR THE WATER PROP.

Also: You need to enable raytracing and have at least 1 bounce.

Also: You will need a full 3D environment behind the water (at least an environment sphere) for it to reflect things like the sky.


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)


Anthony Appleyard posted Wed, 30 July 2014 at 6:04 AM

Attached Link: http://larashots.com/appleyard/temp/renderosity/info.htm.

Thanks for you advice. My next attempt is at this link.

 


bantha posted Wed, 30 July 2014 at 9:43 AM

Looking good so far. 


A ship in port is safe; but that is not what ships are built for.
Sail out to sea and do new things.
-"Amazing Grace" Hopper

Avatar image of me done by Chidori


Anthony Appleyard posted Wed, 30 July 2014 at 10:40 AM

Attached Link: http://larashots.com/appleyard/temp/renderosity/info.htm.

This is the same run as before, except that:

The ground plane (= sea surface) uses Ground Default Texture as a displacement map, with 'Displacement' = 0.1

The dock wall's brick pattern reflects distorted on the dock water, as would be with reflecting from waves. I suppose that the circular white scrawling on the sea is a maths side-effect aberration. But the sea level on the dock wall and the side of the dredger is flat level without wave humps.


bagginsbill posted Wed, 30 July 2014 at 1:24 PM

The circular scrawling is an artifact of Poser's texture filtering of the image you're using for a bump map. I don't use images for this because Poser has trouble with maps and displacement.

I have been working all day on refining my procedural waves, so that I can give good advice about it. I've never felt I had it really right before for high-wind situations.

Here is a test render I just did.

I'm trying to get results consistent with a 45-knot wind. The waves are over 10 feet here.


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)


Anthony Appleyard posted Wed, 30 July 2014 at 5:21 PM

Attached Link: http://larashots.com/appleyard/temp/renderosity/suw_01i_lightmat.jpg

"*But the sea level on the dock wall and the side of the dredger is flat level without wave humps.*" :: On a closer look I can see 2 water levels :: a wavy edge caused by waves, OK; and a horizontal line caused in the light material as at the attached link, by treating the water level as constant 0.0000 . It seems that I must replace that 0.0000 water level by some maths to calculate the water level at that point from the displacement value at the water surface point above point P.

Please where is information about the procedural waves that you mention?


bagginsbill posted Wed, 30 July 2014 at 6:29 PM

Working on it.

You might start with ripples.

Ripples are nearly sinusoidal and we can get such shapes from a single node such as the Clouds node. Also, we don't really need displacement for it since the amount of displacement is very small. But I'll show it in displacement. You can use bump instead.

My display unit is inches!!! The displacement value here is .75 inches. If you do not set your Poser to inches, you'll have to type in something else. For PNU it would be .75 / 103.2, which is .00726744.

To get bigger waves we have to add many nodes together. Poser doesn't have a built-in node that does the proper math for ocean waves. I'm still trying to figure out what that math should be for all wind speeds from 1 to 100 MPH. It's complicated.

So start small and deal with ripples first.

You might also try to skip the attenuation of light and instead just darken and colorize the refraction as I've done here. I'm not using attenuated lights in this render.


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)


Anthony Appleyard posted Thu, 31 July 2014 at 7:58 AM

Please, in a setup of texture nodes, how can I combine an Image_Map node and a P nose and whatever else to find the value of that image texture map color at point P as mapped onto a particular Poser material?


bagginsbill posted Thu, 31 July 2014 at 9:55 AM

That is very difficult and requires careful coordination of the prop holding the "particular Poser material".

Could you explain more what you need to accomplish, instead of asking how you would do this particular subproblem? It may be entirely avoidable.

For example, my procedural water displacements are nodes connected to world coordinates and can be reproduced in multiple shaders, requiring no knowledge of the water's position, size, orientation, etc.

If you use an image map, then the UV mapping gets involved and it's desperately difficult to sort that out.


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)


Anthony Appleyard posted Thu, 31 July 2014 at 10:20 AM

Attached Link: https://en.wikipedia.org/wiki/Wind_wave

Here is my latest attempt, using the procedural clouds as in Bagginsbill's message posted Wed, Jul 30, 2014 6:29 pm hereinabove. (The color of the water needs work.) One reason why the water looks like some glob-type stuff and not water is that real waves on water (see this link) are sharper in the ridges than in the valleys, more so for higher wave amplitude. A simple wave train at low amplitude is about sinusoid; but as (wave height / wavelength) gets bigger, the tops of the waves get sharper, until when (wave height / wavelength) reaches (1 / pi), the tops of the waves become completely sharp as in a [cycloid](https://en.wikipedia.org/wiki/Cycloid),  and attempt to make the wave taller than that makes the wave break (see 'prolate cycloid'), and lines of foam develop.

It seems that Poser 11 or etseq needs a specific procedural water wave generator instead of having to use the cloud generator.


bagginsbill posted Thu, 31 July 2014 at 10:26 AM

Right I already said that you have to start with ripples and bigger waves need more nodes.

I think your use of such a short attenuation distance, while fun, is not realistic. That looks like ink, not water. There is a reason I had such a large number in the parameter.

As I said, I think you should succeed at a rippled surface before you move on to the more complicated things. While I see you're using my techniques, you're using your own numbers and colors and it isn't coming out right.

If I add 24 more nodes to your setup and you mess with the numbers, you're only going to get insane results.


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)


seachnasaigh posted Thu, 31 July 2014 at 10:32 AM

Those waves are looking pretty good, BB!

     It would take more node spaghetti, but I'm thinking of how to transition to add foam at points of high eccentricity (sharp peaks of waves).  I wonder if there is a way to sense proximity to the exterior of an object (hull of a ship), and display foam near such interface?

Poser 12, in feet.  

OSes:  Win7Prox64, Win7Ultx64

Silo Pro 2.5.6 64bit, Vue Infinite 2014.7, Genetica 4.0 Studio, UV Mapper Pro, UV Layout Pro, PhotoImpact X3, GIF Animator 5


bagginsbill posted Thu, 31 July 2014 at 11:07 AM

Quote - Those waves are looking pretty good, BB!

     It would take more node spaghetti, but I'm thinking of how to transition to add foam at points of high eccentricity (sharp peaks of waves).  I wonder if there is a way to sense proximity to the exterior of an object (hull of a ship), and display foam near such interface?

Thanks. I did a quick-and-dirty attempt to make the peaks foamy but I failed. I also tried AO to sense the ships nearby and failed at that, too.

For the moment I'm just making the foam randomly, but I'm working on it.


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 Thu, 31 July 2014 at 11:13 AM

I have been experimenting with a superposition of many clouds nodes at different heights and scales, with and without peak sharpening. I'm really not sure what's best. Trying to read the CG literature on the subject isn't very helpful. They mostly do things I can only do in Poser with great difficulty (if at all, such as Fast Fourier Transforms) so I'm forced to figure out my own ways to do things given the building blocks I have.

I keep running into weird Poser-isms. Look in the lower right corner. WTF?

(click for big version)


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 Thu, 31 July 2014 at 11:19 AM

Here's the shader.

HAAA HAAA HAAA HA AHAHAAA

Unlike most of my posts, this is not one you're allowed to copy/share/redistribute/sell.

There - that will prevent you from feeling like you should try.


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)


aRtBee posted Thu, 31 July 2014 at 1:31 PM

Grey boxes connected by colored wires, and in the end not exactly doing what's expected. Looks like my first analog computer build, decades ago :-)

In the meantime, waves are improving. Neat job, BB.

- - - - - 

Usually I'm wrong. But to be effective and efficient, I don't need to be correct or accurate.

visit www.aRtBeeWeb.nl (works) or Missing Manuals (tutorials & reviews) - both need an update though


Miss Nancy posted Thu, 31 July 2014 at 2:24 PM

man, look at all the nodes!  it appears viivo may be response to nsa et al., unless they already broke public-key system.



bagginsbill posted Thu, 31 July 2014 at 2:29 PM

Hah - I didn't notice the Viivo floaty thing got in there. Viivo is my main job - I designed it and built a lot of it. And, no, as far as we know, the NSA can't break it.


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)


Anthony Appleyard posted Thu, 31 July 2014 at 3:18 PM

Thanks. Bagginsbill's technique looks good for small waves. I am sorry if I was too critical. Thankyou for all your good advice.


seachnasaigh posted Thu, 31 July 2014 at 3:30 PM

     Come to think of it, a ship's hull would probably need a wake mesh fitted to it.  That would give a "pipeline" bow wave and the rebounding bulge upward behind the stern.  The wake mesh could be given foaminess.

Poser 12, in feet.  

OSes:  Win7Prox64, Win7Ultx64

Silo Pro 2.5.6 64bit, Vue Infinite 2014.7, Genetica 4.0 Studio, UV Mapper Pro, UV Layout Pro, PhotoImpact X3, GIF Animator 5


bagginsbill posted Thu, 31 July 2014 at 4:11 PM

If really big waves are a priority, go get this free prop in obj format.

http://www.turbosquid.com/3d-models/free-obj-mode-ocean-sea-wave/629015

It offers huge waves that would normally overwhelm Poser's displacement system, no matter what the shape.

Here I combine it with my wave shader for the smaller waves.

The white box is 50 high and wide, 250 feet long.

The submarine is a similar size but harder to see.


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 Thu, 31 July 2014 at 4:17 PM

The same prop with only ripples applied.

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 Thu, 31 July 2014 at 7:28 PM

So I'm going away for the weekend. If you want to play, I have placed a zip full of goodies for you to try:

https://sites.google.com/site/bagginsbill/free-stuff/ocean-stuff


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 Thu, 31 July 2014 at 7:34 PM

Each material ends in a two-digit number. That is the wind speed in knots. They are all square numbers (n times n). Each is more complex than the previous, having more layers of clouds nodes added together.

This is bbocean-04.


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 Thu, 31 July 2014 at 7:35 PM

This is bbocean-16.

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 Thu, 31 July 2014 at 7:36 PM

This is bbocean-36.

There are more - speeds supplied are 2, 4, 9, 16, 25, 36, and 49 knots.


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 Thu, 31 July 2014 at 7:38 PM

This is how I'm making them. This will be a product in the store - a plugin for VSS (and EZMat if I can pull it off.)

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 Thu, 31 July 2014 at 7:45 PM

Due to a bug in my script, the foam color got set to black - the higher wind speed shaders will appear to have black spots.

To fix it, Find the Diffuse node - a Blender connects to it with a light blue in Input_1. Input_2 is black - that is the foam color - change it to white.


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 Thu, 31 July 2014 at 7:51 PM

Here are some things you can adjust. Of course the right way is to use the BBOcean plugin user interface.

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 Thu, 31 July 2014 at 7:54 PM

The slower wind speed shaders don't have foam so they are built a little differently. (Matmatic optimizes to fewest nodes it can make work. With no foam, the nodes come out simpler.)

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 Thu, 31 July 2014 at 8:07 PM

Here's a nifty trick to let you use some sky images that happen to have ground that shows through the water.

You set this shader up on it (save it so you can use again and again).

The shader has a blender where you get to put what color to use on the bottom half of the environment sphere. This obliterates whatever nasty bottom image is there, like this road and desert.


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 Thu, 31 July 2014 at 8:10 PM

Here's the bottom set to black.

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 Thu, 31 July 2014 at 8:11 PM

The bottom set to white.

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 Thu, 31 July 2014 at 8:12 PM

The bottom set to deep 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 Thu, 31 July 2014 at 8:13 PM

The bottom set to green.

This is a very useful technique to manipulate your water's color.


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 Thu, 31 July 2014 at 8:17 PM

Important tip - do the best job you can to line up your poser infinite light with the sun in the environment sphere image. This is not lined up. The specular highlight in preview is clearly off center.

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 Thu, 31 July 2014 at 8:18 PM

The sun here is aligned correctly.

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 Thu, 31 July 2014 at 8:20 PM

Check that out. Magnificent. Who gives you better water in Poser? Nobody.

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 Thu, 31 July 2014 at 8:26 PM

I've been doing most of my shots with IBL and no IDL, for speed.

But at some angles, IDL is fast. This was a 20 second render with IDL.

Experiment. Don't be afraid to try more advanced techniques. They are not always slow.


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 Thu, 31 July 2014 at 8:44 PM

Back to the title of the thread - underwater submarine.

After this weekend (I'm going away) I'll return from this above-water diversion and get our camera back under the water.


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)


Anthony Appleyard posted Fri, 01 August 2014 at 4:01 AM

As regards converting a "rounded the same upwards and downwards" procedural wave such as the procedural clouds surface, into a form more pointed on top like water waves, I have been playing about with equations.

If the vertical dimension is y, if the procedural clouds surface is y = f(x,z) :-

As a plain water wave train of only one wavelength moves, each surface molecule of water moves not straight up and down but in a vertical circle, forwards on top and backwards at the bottom. If a is the amplitude and b is how many waves in distance 2*pi, the plain wave train becomes a cycloid with pointed tops when a/b = 1.

Work out the procedural clouds surface at plenty of sets of values of x y z.

At each (x,z) point, work out u = integral y d x , and v = integral y d z

The lower integration limits should the same right through.

Replace each x by its x+u, and each z by its z+v.

In areas where this puts the points out of order in x or z and the y=f(x,z) surface is folded over itself, the wave has broken and there should be a foam patch there.


EnglishBob posted Fri, 01 August 2014 at 4:30 AM

Thanks for the toys! I have an ocean scene that I've been tinkering with. It's sure to work better with a BBocean. :)

Maybe an Ocean Front version 2 might be on the cards, if you can persuade DreamlandModels?


bagginsbill posted Fri, 01 August 2014 at 7:08 AM

> Quote - As regards converting a "rounded the same upwards and downwards" procedural wave such as the procedural clouds surface, into a form more pointed on top like water waves, I have been playing about with equations....

This is a great point, Anthony, and while I like your suggestion, I don't see a way to integrate a 3D fractal in Poser.

I have, however come up with something effective but simple.

Assuming the fractal cloud (C) is roughly sinusoidal (with suitable randomness applied, of course) in the range 0 to 1, it can be converted to something very close to a trochoid like this.

1 - Abs(2C - 1)

I modified my plugin to use that and here is the result.


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, 01 August 2014 at 7:10 AM

The cusp is a little too sharp - it needs to be modulated back to a round shape for all but the highest waves.

This is an improvement and I'm sure I can fix it, but I have to get ready to go away for the weekend.


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)


seachnasaigh posted Fri, 01 August 2014 at 8:13 AM

Oooh, that's a nice touch - great work, BB!

Poser 12, in feet.  

OSes:  Win7Prox64, Win7Ultx64

Silo Pro 2.5.6 64bit, Vue Infinite 2014.7, Genetica 4.0 Studio, UV Mapper Pro, UV Layout Pro, PhotoImpact X3, GIF Animator 5


Anthony Appleyard posted Fri, 01 August 2014 at 8:46 AM

Here is a version of my last image using the -abs(value-.5) method to invert the tops of the waves.

Miss Nancy posted Fri, 01 August 2014 at 1:16 PM

o.k., enjoy yer vacation (unless it's in Providence) and thx fr great water shader! 

those hdrilabs sets come with IBL whose UV co-ordinates may be recalculated to polar (altitude/azimuth or x-rot/y-rot on poser inf-lite).  e.g. desert highway is xrot -24, yrot 80.



Anthony Appleyard posted Sat, 02 August 2014 at 2:30 AM

 

ERRATUM :-

I wrote:

"If a is the amplitude and b is how many waves in distance 2pi, the plain wave train becomes a cycloid with pointed tops when a/b = 1*."

This should be:-

"If a is the amplitude (= half the wave height), the plain wave train becomes a cycloid with pointed tops when (wavelength / a) = 2*pi."


arrow1 posted Sat, 02 August 2014 at 10:02 PM

Hi Everyone, I have just come across this interesting thread.I have been trying for over twelve months to get animated water in Poser Pro 2014 without much success.Without wanting to diverse from the original thread,Is it possible to animate the water from the OBJ from TurboSquid? I also have been trying to get a WW2 U-Boat travelling in heavy weather on the surface. I have also tried it in Vue 11 Infinite. However with my 4 Poser figures (animated as crew) it takes forever to to just render a preview. Poser seems to handle this better! Cheers

Custom built computer 128 gigs RAM,2 Terrabyte hard drive, NVIDIA RTX 3060 12 Gig, Intel i9, Dual Dell Screens, 0/S Windows 11, networked to a Special 12th Generation intel I9, RTX 3060 12 Gig, Windows 11,64 gigs RAM, Dual Phillips Screens, 2 Terrabyte SSD Hard Drive plus 1 Terrabyte Hard Drive,3rd Computer intel i7,64 gigs ram, Graphics Card NVIDIA GeForce GeForce 1660 Ti 6 Gig,1 Terrabyte Hard Drive, OS Windows 10 64 Bit Dual Samsung Syncmaster 226bw Screens.Plus Lenovo Laptop 64 Bit,12 gigs Ram.Intel i7 chip.Windows 10 Pro and Ultimate. 4 x 2 Terrabyte Hard Drives and 2 x 2 Terrabyte external USB Hard drives. All Posers from 4 to Poser 2010 and 2012, 2014. Poser 11 and 12, 13, Hexagon 2.5 64 Bit, Carrara 8.5 Pro 64 bit, Adobe Photoshop CS4 Creative Production Suite. Adobe Photoshop CC 2024, Vue 10 and 10.5 Infinite Vue 11 14.5 Infinite plus Vue 15 and 16 Infinite, Vue 2023 and 2024, Plant Catologue, DAZ Studio 4.22, iClone 7 with 3DXchange and Character Creator 3, Nikon D3 Camera with several lenses.  Nikon Z 6 ii and Z5. 180-600mm lens, 24-70 mm lens with adapter.Just added 2x 2 Terrabyte portable hard drives.


Anthony Appleyard posted Sat, 02 August 2014 at 11:32 PM

Attached Link: https://en.wikipedia.org/wiki/Cycloid#Related_curves

> Quote - Hi Everyone, I have just come across this interesting thread.I have been trying for over twelve months to get animated water in Poser Pro 2014 without much success. ...

If the complete water wave pattern could be split (by a method somewhat like Fourier analysis) into various wave trains (each with its own one frequency), then the speed of each wave train is proportionate to the square root of its wavelength. That is why on the sea, big long waves roll on fast and overtake small overlying ripples.

If amplitude * 2 * pi / wavelength is small, the curve is nearly a sine wave, but the tops are curved slightly sharper then the bottoms. If amplitude * 2 * pi < wavelength, the curve is a curtate cycloid; the tops are curved sharper then the bottoms.

If amplitude * 2 * pi = wavelength, the curve is a cycloid; the tops are sharp.

If amplitude * 2 * pi > wavelength, the curve is a prolate cycloid; the tops are loops, and on the surface water tries to go through other water, but cannot, and breaks into foam.

For curtate and prolate cycloids, see the image at is link.

It is not the same with light waves and sound waves.


Keith posted Sat, 06 September 2014 at 12:39 PM

Quote - OK I found the underwater runtime. I have to do some work to use it. Upon loading the scene into PP2014, it changed the names of my props, adding _1 to them all. This messed up the script which expected names like "WaterPlane", not "WaterPlane_1".

I'm improving some of the materials. Here's a demo.

 

Bumping again, did the shader to attach to the atmosphere depth cue ever get put up somewhere? I've got an underwater scene to render and have been looking everywhere.



bagginsbill posted Sat, 06 September 2014 at 3:55 PM

I did not release it. But I'm gonna send you a dropbox link to a zip file containing all the work as it exists so you can play. 


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)


Wodokan posted Sun, 03 January 2016 at 7:14 AM Online Now!

Hi, I found this thread by looking for water-related materials - and it still looks really impressive!

I wonder if you have ever tried to adapt use this type of material on extremely shallow water surfaces? I am primarily for procedually generated tears (and teary eyes). I have been playing around with a shader by RedViper from ShareCG. For pretty much everything else, I am meanwhile getting better results outside of Firefly (e.g., Reality and Luxrender) - but not for this kind of thing.

Any advice?


3dcheapskate posted Thu, 17 March 2016 at 3:19 AM

Referring back to setting up a non-linear falloff for the Poser atmosphere's DepthCue, way back in Jul 2010 on page 3 of this thread with bagginsbill's post that endedwith,

b = x / (1 - .5 ^ (x / h))

Wow - Yay! This is exactly the compensation function we need to make the Poser Atmosphere attenuation function do what we want. We need to plug a node network into DepthCue_EndDist, also known as "b", that implements the function we just arrived at.

Great. So all we need is the distance from the camera to the point being rendered.

Uhoh. There is no node that does that. I wish there was. Are we dead?

Nope. If we accept a tiny bit of manual work setting up a shader, we can get this done.

But ... it's really late and I've got to go to bed. So, more tomorrow."

followed by the tantalizing question on page 4 that ended bagginsbill's penultimate post that same day:

...can you figure out how we can calculate the distance from the camera to the object?

I've searched the rest of the thread, and I've racked my brains - but I just can't find/figure out the answer.

Can anybody enlighten me?

??? In the Poser 9 material room how can I get the distance from the camera to the point being rendered ???


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



3dcheapskate posted Fri, 18 March 2016 at 2:27 AM

After a bit more thought I have a potential answer - 15 nodes, but you have to manually enter the camera's x, y, and z coordinates into three nodes.

I've posted my possible solution to my "Distance From Camera To Point Being Rendered ?" thread in RDNAs Node Cult forum

http://forum.runtimedna.com/showthread.php?104645-Distance-From-Camera-To-Point-Being-Rendered


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



bagginsbill posted Fri, 18 March 2016 at 1:59 PM

Posting here just for continuity but otherwise I'm not here.

You are correct - no node will, by itself, give us the coordinate of the camera. However, a small, continuously running background python script does so with ease. I later wrote such a script. I use it to copy the camera coordinates into a User_Defined node in the shader.

Now -- given that you got this far, I'll tell you that 15 nodes is way more than necessary. Here's a hint: in FireFly, vector math and color math are the same damn thing.

The P (rendered point position) node gives a vector. The User_Defined node (for camera position) also gives a vector. How small can you get it using that tip?


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, 18 March 2016 at 2:19 PM

I don't have time to ever finish this thing to perfection. I have uploaded all the work I did -- caveat emptor. Go get it -- BBUnderWaterRuntime.zip.

https://sites.google.com/site/bagginsbill/free-stuff/tutorial-scenes

Note: I do not get notified here about replies so I don't come here to talk anymore. I am also avoiding RDNA now. I am at CGBytes.


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)


IsaoShi posted Fri, 18 March 2016 at 3:30 PM

caveat emptor.

Caveat receptor!

"If I were a shadow, I know I wouldn't like to be half of what I should be."
Mr Otsuka, the old black tomcat in Kafka on the Shore (Haruki Murakami)


Latexluv posted Fri, 18 March 2016 at 8:48 PM

Oh, thank you, thank you!

"A lonely climber walks a tightrope to where dreams are born and never die!" - Billy Thorpe, song: Edge of Madness, album: East of Eden's Gate

Weapons of choice:

Poser Pro 2012, SR2, Paintshop Pro 8

 

 


3dcheapskate posted Fri, 18 March 2016 at 11:50 PM

Yet again, thank you bagginsbill - time to register at cgbytes.


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



moogal posted Thu, 27 October 2022 at 8:21 PM

bagginsbill posted at 7:17 PM Mon, 28 June 2010 - #3664811

Now I do the math. As before, the transmission is 50% at 80 feet. But, with the correct asymptotic falloff, the transmission is 25% at 160 feet, not 0. At 250 feet (where the second sub conning tower is) the transmission is about 11.5%. At the tail of the second sub, about 360 feet away, the transmission is about 4.4%. The transmission *never* goes to 0.

Read this whole thread and it's never explained how to correct for asymptotic falloff. Has there been shared a simple node set-up just to fix the atmospheric depth cuing? 
It seems from a post at hivewire that this was shared at some point: "bagginsbill created a shader way back that swaps the linear interpolation for a more realistic depth simulation somewhere in an 'underwater submarine' thread over at Renderosity (I don't have the link at hand, but I'll track it down and post later). But you need to put the x,y,z coordinates of the current camera into one of the shader nodes - you can either do this manually (rather a pain) or automate it with a callback function that he also provided."

primorge posted Thu, 27 October 2022 at 8:46 PM

Bagginsbill site is documented on the WayBack machine internet archive. His downloads are still available there. When you click the download link for the UnderWaterRuntime zip there will be a long redirect and it will seem like it's not working but the file WILL download after a wait. This is via Chrome and has just been tested with a successful download...

Link to UnderWaterScene zip

UnderWaterScene zip

Image of just downloaded file (via Chrome on my Samsung Tablet)...





primorge posted Thu, 27 October 2022 at 8:49 PM

Apparently the zip also contains a python script that automates what you are trying to do. I haven't looked at it or the contents of the zip yet. Who knows if the python will work in the version of Poser you are using.


primorge posted Thu, 27 October 2022 at 8:54 PM

General link to Internet Archive Snapshot of BB's site Homepage

BB Site Home Page




primorge posted Thu, 27 October 2022 at 8:55 PM

You're welcome


moogal posted Fri, 28 October 2022 at 3:49 PM

primorge posted at 8:49 PM Thu, 27 October 2022 - #4447720

Apparently the zip also contains a python script that automates what you are trying to do. I haven't looked at it or the contents of the zip yet. Who knows if the python will work in the version of Poser you are using.

Thank you very much, I was able to grab the file.
I am staying with Poser 11.3.818 for the reason of python scripts. The last time they changed Python I lost compatibility with Weirdjuice's (paid) MetaForm plug-in which was sadly never updated. (Even if it should work, whether or not I can get it working is another matter...)


moogal posted Sun, 30 October 2022 at 9:21 PM

primorge posted at 8:49 PM Thu, 27 October 2022 - #4447720

Apparently the zip also contains a python script that automates what you are trying to do. I haven't looked at it or the contents of the zip yet. Who knows if the python will work in the version of Poser you are using.

It looks like the python script sets up an underwater atmosphere, which unfortunately is not what I am trying to do. What I am trying to do is fix the depth cuing so that it does not fall off sharply but rather extends indefinitely. This script does set this up, but also does a lot of other things and it is not immediately clear at all which are related specifically to the depth cue fall off and which are related to the scene being under water.

https://community.hivewire3d.com/threads/upping-the-ante-with-the-poser-atmospheres-depth-cue-im-still-using-poser-11-with-firefly.4451/


bagginsbill posted Mon, 31 October 2022 at 3:07 PM

The depth-cue is entirely in the atmosphere shader. The color is affected by distance to the surface as well as distance from the camera so you're right that it is more than just correcting the linear attenuation. Hmmmm. I don't even have Poser where I'm at. Maybe you could screenshot the shader and post it here and I can look it over?


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)


3dcheapskate posted Wed, 02 November 2022 at 9:24 AM

The post over at Hivewire that moogal mentioned sounds like one of mine. I remember bagginsbill guiding me through the creation of the realistic falloff depth cue shader on the CGBytes Poser material room forum (the node knows?) and posting a screenshot of the complete shader over there.

But that forum seems to have disappeared.

I'm fairly sure that I have all the information including an MT5 on my laptop, but that's at home whereas I'm not. Not sure how long you'll have to wait though, so posting a screenshot of the atmosphere shader you downloaded as bagginsbill suggests may be the quickest.



The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



3dcheapskate posted Thu, 03 November 2022 at 10:56 PM

The internet archive / wayback machine ( archive.org ) has several snapshots for 2018-2019 of the CGBytes "Distance from camera to point being rendered" topic (original URL https://www.cgbytes.com/community/forums.aspx?g=posts&t=115138#post125025 ). but rather infuriatingly the images don't seem to have been captured, just the text.


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



3dcheapskate posted Fri, 04 November 2022 at 12:40 AM

Working frpm memory and the text on the internet archive snapshot of the CGBytes page I think it was something like this ?



The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



3dcheapskate posted Fri, 04 November 2022 at 1:04 AM

At least one probable mistake in the sketch above: L don't think you can use a P node for the camera position - I think it used the node where you can set a colour by specifying r,g,b values and setting r=cameraX, g=cameraY, and b=cameraZ. 'User Defined' node rings a bell.


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).