bagginsbill opened this issue on May 17, 2007 · 67 posts
bagginsbill posted Thu, 17 May 2007 at 5:26 PM
Attached Link: Node Based Human Irises at the Node Cult
Tired of messing around with dozens of iris texture files or editing in photoshop to get the colors you want? Try 100% procedural iris shaders with nodes. Only takes 5.Follow the link.
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)
LostinSpaceman posted Thu, 17 May 2007 at 5:28 PM
Woo Hoo! Thanks Bb!!
Porthos posted Thu, 17 May 2007 at 5:38 PM
Looks fantastic, thanks ! :)
MS Windows 7 Home Premium 64-bit SP1
Intel Core i7-2600 CPU @ 3.40GHz, 12.0GB RAM, AMD Radeon HD
7770
PoserPro 2012 (SR1) - Units: Metres , Corel PSP X4 and PSE 9
BastBlack posted Thu, 17 May 2007 at 7:16 PM
WOOT! bB
jartz posted Thu, 17 May 2007 at 8:32 PM
Thanks a lot BB...
Can't wait to try it out.
JB
____________________________________________________________________________________________________________________________
Asus N50-600 - Intel Core i5-8400 CPU @ 2.80GHz · Windows 10 Home/11 upgrade 64-bit · 16GB DDR4 RAM · 1TB SSD and 1TB HDD; Graphics: NVIDIA Geforce GTX 1060 - 6GB GDDR5 VRAM; Software: Poser Pro 11x
Cage posted Thu, 17 May 2007 at 11:11 PM
This is great! I was just looking for something like this, last week. I ended up re-mapping the irises, instead.
One problem, though. Poser 5 doesn't have a Wave_2D node option. Is there any way to wrangle the same effect out of P5, using a math function with sine, or something?
===========================sigline======================================================
Cage can be an opinionated jerk who posts without thinking. He apologizes for this. He's honestly not trying to be a turkeyhead.
Cage had some freebies, compatible with Poser 11 and below. His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.
pjz99 posted Fri, 18 May 2007 at 12:16 AM
Not to that level of detail or complexity necessarily, but some approximation of that layout would be super.
operaguy posted Fri, 18 May 2007 at 12:29 AM
i agree with pjz, want those striations. Hey BB, just give us a hint how to get started...we should try to learn how to do this stuff. What would be the approach to getting complexity in the iris?
::: Opera :::
pjz99 posted Fri, 18 May 2007 at 12:37 AM
It would also be good if the pupil edge was a little softer (edge blend node? )
Faery_Light posted Fri, 18 May 2007 at 3:11 AM
bookmarking.
Let me introduce you to my multiple personalities. :)
BluEcho...Faery_Light...Faery_Souls.
SlvrDahlia posted Fri, 18 May 2007 at 4:17 AM
An interesting technique.
bagginsbill posted Fri, 18 May 2007 at 7:17 AM
Attached Link: Cartesian to Polar Coordinates - Material Room
Oh yeah that's good pjz. I did that 5 -node trick for people unwilling to go the extra mile for realism and just want a quick fix.I can do those radial fibers, no problem. Just have to use polar coordinates - very easy. If you want to race me, I'd love that.
The attached image is my brick shader which was designed for rectangular coordinates, tricked into making radial bricks by changing U and V into R and Theta.
Follow the link for a fascinating discussion of the use of polar coordinates and the importance of accuracy in the arctan function emulation. You need arctan to do polar and Poser math nodes don't have it. So I use an approximation. My buddy byRo used a different one. He thought his was good enough as his error was less than 1 part in a thousand. But that's not good enough.
Technical? You bet - dig in and you will be a node warrior too!
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 May 2007 at 7:35 AM
Cage - I didn't realize P5 had no Wave2D. No worries, the polar coordinates approach won't need 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)
pjz99 posted Fri, 18 May 2007 at 7:48 AM
Nah I am way behind you on this. The best idea I could come up with for how to do this involved using a bitmap as a seed, which kind of sucks the cool out of the idea. I'm not a math head at all, I'm sure there is some application of basic math that describes a radial pattern but I have no idea what it would be.
edit: but I can learn! :)
kuroyume0161 posted Fri, 18 May 2007 at 8:32 AM
bagginsbill, have you checked out Jack Crenshaw's book "Math Toolkit for Real-Time Programming"? This is really a dissertation on decades' long experience crunching complex mathematical routines into real-time embedded systems. ArcTangent is covered in its own chapter. ;)
Now, just because this deals with embedded systems doesn't mean that something like old game approaches with limited angles and sin/cos tables. Here, accuracy is just as important as well as error minimization. This would need to be coded, unfortunately. In nodes, it might be quite a few - a few constants (using tan() on two), abs(), and a significant amount of math for the nodes. If there is a function node, this could reduce the overall node count.
C makes it easy to shoot yourself in the
foot. C++ makes it harder, but when you do, you blow your whole leg
off.
-- Bjarne
Stroustrup
Contact Me | Kuroyume's DevelopmentZone
bagginsbill posted Fri, 18 May 2007 at 8:59 AM
Matmatic takes your formulas and implements them in nodes.
So for example when I type Bump = .03 * Bias(100 * (U + V) % pi, .7), it figures out that you can do that with 5 nodes and generates the shader you see in the image above.
So I don't really care any more that there is no formula node.
And I already have an extremely accurate and cheap conversion to polar coordinates. It is this:
So I don't really need any reference material for this purpose - the issue has already been resolved and tested extensively. With the above code included in a script, the U and V coordinates are now polar instead of rectangular. The rest of your script can then deal with U and V as usual and whatever you've described will be spun around a circle.
def IF(test, a, b):
return Blend(b, a, test)
def limitedArcSin(x):
a0=1.5707288
a1=-0.2121144
a2=0.0742610
a3=-0.0187293
x2 = x * x
x3 = x2 * x
return (pi/2 - sqrt(1 - x) * (a0 + a1x + a2x2+ a3*x3))
def getTheta(x, y, r = None):
if r is None:
r = sqrt(x * x + y * y)
sinval = Abs(y)/r
theta = limitedArcSin(sinval)
return IF(x <= 0,
IF(y <= 0, -pi+theta, pi-theta),
IF(y <= 0, -theta, theta))
class PolarCoord:
def init(self, x, y):
self.x = x
self.y = y
self.r = sqrt(x * x + y * y)
self.theta = getTheta(x, y, self.r)
pc = PolarCoord(2 * U - 1, 2 * V - 1)
U = pc.theta
V = pc.r
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)
operaguy posted Fri, 18 May 2007 at 9:05 AM
fascinating
infinity10 posted Fri, 18 May 2007 at 9:19 AM Online Now!
Very interesting, but now need to figure out what to use this type of material room wizardry on. Hmmmm.
Eternal Hobbyist
kuroyume0161 posted Fri, 18 May 2007 at 10:44 AM
bagginsbill, looks like you are doing a partial series for ArcSin(). I take it that the accuracy-error ratio is pretty good? :)
C makes it easy to shoot yourself in the
foot. C++ makes it harder, but when you do, you blow your whole leg
off.
-- Bjarne
Stroustrup
Contact Me | Kuroyume's DevelopmentZone
bagginsbill posted Fri, 18 May 2007 at 11:30 AM
Yes - that partial series is accurate to within 1 part in 50000, worst case, and most of the time it's correct to better than that.
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)
LostinSpaceman posted Fri, 18 May 2007 at 2:07 PM
Wow my head hurts! Too much math! LOL! Can't wait to see where it takes us though! All this because I asked for Iris nodes over at RDNA? Wow!
bagginsbill posted Fri, 18 May 2007 at 5:09 PM
Here's where I'm at so far. I have the polar coordinates thing working. I have a version of the Fractal_Sum node that produces radial noise. I can make layers of those tiny twisty fibers, although I haven't got enough control over them yet. And I can get some of that smoky ring stuff going.
The WIP render shows how things look now. There are 5 layers of effects, 3 fibers, and 2 smoky. It took 155 nodes to do this.
I need to refine how the effects are controlled and implemented, and I need more effects. Making the effects is hard. Once I have a nice collection of effects that you can layer on top of each other, you should be able to do some pretty complex stuff with a few lines of script.
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 May 2007 at 5:37 PM
I like it. I think this is going to be a really useful shader. It would be so hard to draw this by hand.
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)
cyberscape posted Fri, 18 May 2007 at 5:50 PM
Man! And here I thought I new a good bit about the material room shaders! NOT!
So, am I correct in thinking that using this procedure instead of image based textures will speed up render times? And better yet, improve the workflow for animation?
-------------------------------------------------------------------------------------------------------------
AMD FX-9590 4.7ghz 8-core, 32gb of RAM, Win7 64bit, nVidia GeForce GTX 760
PoserPro2012, Photoshop CS4 and Magix Music Maker
--------------------------------------------------------------
...and when the day is dawning...I have to say goodbye...a last look back into...your broken eyes.
kuroyume0161 posted Fri, 18 May 2007 at 6:23 PM
That's a good start there, bb! If you can manage more of the fibrus look, it may be the eye replacement we all want! :)
Can't wait to see the jaw-dropping finale.
C makes it easy to shoot yourself in the
foot. C++ makes it harder, but when you do, you blow your whole leg
off.
-- Bjarne
Stroustrup
Contact Me | Kuroyume's DevelopmentZone
bagginsbill posted Fri, 18 May 2007 at 7:57 PM
Procedurals don't incur the "loading texture" time that big images chew up, so there is that savings. But in general, extremely complex procedures like this that have to use a lot of "noise" nodes (not one or two, but eight or ten) are actually somewhat slower than using an image. However, unless you're going to zoom the iris to 1000 pixels, you're not going to notice any speed difference.
I can't see it providing any benefit for animation, unless you want to actually animate the texture itself, which is certainly possible. Many cool sci-fi effects could be done by altering the parameters to the shader in an animation.
Kurome - thanks. Yes I must figure out how to get the fibers to do more complex things - clumping, and more individual twisting. There are over 720 fibers in that image. Getting each of them to do its own thing without giving it it's own node(s) is a mind bender.
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)
pjz99 posted Fri, 18 May 2007 at 8:34 PM
That is looking really, really good. I think you ought to consider marketing that, because it kicks all kinds of butt. Getting reasonably good eye materials is a chore, people always tend to leave in goofy reflections baked into the texture and this is EXTREMELY flexible and cool. Really excellent achievement, I expect people will be ripping this off for years to come.
To me the big benefit is not so much speed, but flexibility - from what I can see, this technique can be tweaked pretty easily and quickly to come up with a very large variety of eye textures that will react to light the way they should, instead of having to painstakingly paint out flaws or add in variations with a paint program.
slinger posted Fri, 18 May 2007 at 9:04 PM
The most interesting thread since I-don't-know-when.
I'm a non-math person... I appreciate the purity of mathematics as language, but I never learned to speak more than a few useful phrases sorta thing.
Are we talking about using a blend node over your existing shader types, or is this going to be a completely new hader?
The liver is evil - It must be punished.
bagginsbill posted Fri, 18 May 2007 at 9:04 PM
Yes and one other thing is neat - the pupil radius and iris radius are parameters. This means you can design an iris, and then at the push of a button it generates shaders using that design for every character you have at once. I just need to get the coordinates for them all into the script. I already have V3, V4, and Jessi coordinates in it. You can add more and it's not hard to figure out. I made a testing shader where you give it an existing texture map and a guess as to what parameters to use. It then renders half with the procedural and half with the image file. You can see where they don't line up and adjust the parameter. Once you dial in the right number, its good forever.
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 May 2007 at 9:07 PM
Slinger this is completely new. I started with a blank sheet of paper, so to speak. Because I'm exploring the solution space, my script is currently very ugly with all kinds of false starts and bad choices in it commented out.
Once I determine the fundamental sets of functions you'll want to use, I'll refactor it and it will be all clean and simple to use.
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)
slinger posted Fri, 18 May 2007 at 9:09 PM
Quote - ...Once I determine the fundamental sets of functions you'll want to use, I'll refactor it and it will be all clean and simple to use.
Gawd bless ya. ~lol~
The liver is evil - It must be punished.
pjz99 posted Fri, 18 May 2007 at 9:50 PM
Does this work with the existing Iris/Pupil material zones, i.e. does the IrisDilate morph slider still do what it's expected to do? I'd expect it does, simply because the zones are fixed regardless of what texture/shader is applied to them, but I thought I should ask.
bagginsbill posted Sat, 19 May 2007 at 6:57 AM
pj: yes it works with morphs. For future reference, a procedural texture, not just this iris one, will behave just the same as an image based one. An image is nothing more than a two-dimensional math function that is driven by (called with) U and V coordinates. So, too, is my iris shader driven by U and V coordinates. When you morph a prop, the U and V coordinates move, thus morphing the texture automatically no matter what kind it is.
By the way, there's nothing stopping you from running the procedural shader to produce an image which you save and use from then on.
Does everybody understand that? It's called texture "baking", although true texture baking involves more than that.
Basically, you install the eye shader on a one-sided square, using only the Alternate_Diffuse channel so that the current light settings have no influence on the render. This is how I made the image I posted earlier - it is just the procedural applied to a one-sided square, rendered, then saved and uploaded.
An image like that (one with the whole eye including the whites) can be used directly just the same as all the hand-made ones.
As a merchant, you could generate several thousand of these in a few hours, no two alike, all photorealistic, and sell the whole lot for $5 because it suddenly is no work at all.
Oh, wait a minute.
I just realized two things:
I should find out how much merchants make selling eye textures before I decide what I'm giving away for free. Perhaps I don't realize the total market size? I've often wondered about that. I'm not going to change my mind if the total market for eye textures is only $500 a year. But if I could realistically expect to make $10K or more, maybe I ought to rethink this. Any opinions, people?
If I do give it away, I'm going to make a lot of enemies as I undercut the market, right? Opinions?
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)
pjz99 posted Sat, 19 May 2007 at 8:16 AM
Yes, I think if you made some move to make this proprietary and market it, you could make a great deal of money. Considering that a large moderate quality eye package typically sells for $5-15, putting this kind of power and flexibility in somebody's hands could very easily go for a similar or even somewhat higher price. Note that common brokerage agreements give the broker 50%, which means $2.50 - $7.50 per unit for you. I'd give you $20 for this for absolute certain.
If on the other hand you decided to give it away free, you would be up for sainthood right along side Anton Kisiel. Matmatic is certainly cool, but this technique has a concrete application in every single human figure render (which is basically all of Poserdom).
Some kind of dialog interface for basic layout would probably be required but I expect that is the easiest part for you (it sure would be for me). Coordinates for a variety of figures would be very desirable as well.
http://market.renderosity.com/mod/bcs/index.php?Start=1&SearchTerm=eyes many examples
Note that nobody has a one-size-fits-all eye kit as far as I'm aware.
kalon posted Sat, 19 May 2007 at 8:19 AM
Quote - 1) I should find out how much merchants make selling eye textures before I decide what I'm giving away for free. Perhaps I don't realize the total market size? I've often wondered about that. I'm not going to change my mind if the total market for eye textures is only $500 a year. But if I could realistically expect to make $10K or more, maybe I ought to rethink this. Any opinions, people?
- If I do give it away, I'm going to make a lot of enemies as I undercut the market, right? Opinions?
As far as Item 1, I'm not a merchant so I can't say how much you could make a year. But as for Item 2-- people can pose their own figure, but merchants keep creating pose packages, people can create their own light set up, again, there's still a market for lights. I don't see the market getting undercut from this.
pjz99 posted Sat, 19 May 2007 at 8:29 AM
Really the vendor you want to talk to is Face_Off (OcclusionMaster).
TrekkieGrrrl posted Sat, 19 May 2007 at 9:00 AM
This is awesome. I have NO IDEA how to do things like these from scratch, but I can appreciate other people's work G
GREAT JOB, Bagginsbill!
FREEBIES! | My Gallery | My Store | My FB | Tumblr |
You just can't put the words "Poserites" and "happy" in the same sentence - didn't you know that? LaurieA
Using Poser since 2002. Currently at Version 11.1 - Win 10.
kuroyume0161 posted Sat, 19 May 2007 at 12:51 PM
I haven't looked at this Matmatic thing - is it Python in Poser or is it external? If external, Java or Python would be the way to go for cross-compatability and GUI. Is there a link?
C makes it easy to shoot yourself in the
foot. C++ makes it harder, but when you do, you blow your whole leg
off.
-- Bjarne
Stroustrup
Contact Me | Kuroyume's DevelopmentZone
kalon posted Sat, 19 May 2007 at 1:56 PM
The main Matmatic info page (the introduction)
www.runtimedna.com/mod/forum/messages.php
The download
loftydesigns.net/Beta/Beta/MatmaticBeta1.zip
Numerous Matmatic Links in this thread
www.runtimedna.com/mod/forum/messages.php
vincebagna posted Sat, 19 May 2007 at 2:03 PM
Attached Link: The node cult
Yep. Try this one. It's The Node Cult forum at RDNA.bagginsbill posted Sat, 19 May 2007 at 3:14 PM
Matmatic has not GUI. You write scripts - it uses the script to produce shaders - mt5 files and such.
The others gave good advice - follow the links.
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)
kuroyume0161 posted Sat, 19 May 2007 at 3:26 PM
So it's a Poser Python script set and it works on the 'matmatic' scripts (Python) to convert to shaders (as expected). Basically, a shader programming library in Python to create shaders (as MT5/MC6 etc.).
C makes it easy to shoot yourself in the
foot. C++ makes it harder, but when you do, you blow your whole leg
off.
-- Bjarne
Stroustrup
Contact Me | Kuroyume's DevelopmentZone
bagginsbill posted Sat, 19 May 2007 at 5:31 PM
You got it, Kuro. I made a library of objects, one for each Poser node. I also made a Color object and a few others. I defined syntax that would let you construct the nodes using Python constructor invocation. I defined overloaded math operators, so that, for example when you add two nodes, the result is a Math/Add node pointing at the other two nodes.
Matmatic scripts are in fact Python scripts. However, the environment they run in is prepared by the Matmatic script first, so you can make a lot of extra assumptions about what happens before and after your script runs. For example, in pure Python, you'd have to do "from matmatic.nodes import *", among many others, but I've already done all those for you.
There is a bit more - the nodes do some simple local optimizations. For example, quite often, multiplication can be accomplished without a Multiply node, simply because every connection between nodes has a number or color on it that is a built-in multiply. Matmatic tries to find aggressive ways to use those. It will also do smart stuff, like if you ask for sqrt(x) and x is a node, then you also get a Math:Sqrt node, but if x is a number or color, it will do the sqrt in python and just write the resulting number into the shader as a constant.
I'm working on more optimizations. The most important is common sub-expression elimination. This will automatically reduce the node count when repeated sub-shaders are discovered. There are more features I have in mind for improving speed.
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)
operaguy posted Sat, 19 May 2007 at 5:57 PM
A financial model that would generate enough cash for you to run your life to the extent that you could liberate more of your time and talent to the cause of procedural materials in Poser ... we would all wish this both from the basic satisfaction of seeing someone richly rewarded for his brains, persistence and common sense plus it would be better in the end for us...the product would be better. This is my pitch for you to look into making it a commercial product.
If you create a product that , for instance, produces eyes through shaders only, and is therefore model-independent, yes it might challenge the makers of eye 'textures.' It might force them to do you one better, and improve their own way of doing things to get a better result than you. Anyone who resents such a challenge...you should not worry about them, anyone who takes up that challenge....will in turn push you. It's a good thing.
::::: Opera :::::
operaguy posted Sat, 19 May 2007 at 6:06 PM
I will add....I have purchase 4 sets of face_off's shaders for skin, Apollo, Realskin, P6Realism and the mac version of RealSkin, plus Occlusion Master. That's about $75.
I jumped at the chance to buy each one. I did not worry that this might 'undercut' or somewhat diminish the market for texture makers, since these shaders perform magic on default skin .jpgs. I would say that since face_off raised the bar on the quality of skin, it has hopefully forced the texture/character vendors to do better. Some of them ship shaders with their characters.
::::: Opera :::::
BastBlack posted Sat, 19 May 2007 at 6:33 PM
bagginsbill, If you ever sell your works, I would buy them too! You rock!!! ^^ Shaders do render super fast! About color and Nodes -- I'm finding it tricky to control color in the nodes. I eyeball a color and plug it in, only to discover the color is too bright/too dark, too saturated, or the wrong hue. ^^;;; Is there a better way to control color? I have a chart I made with realistic eye, skin, and hair colors. Is there a way I can plug those colors into nodes for hair, eye, and skin? Thanks. bB
pjz99 posted Sat, 19 May 2007 at 6:51 PM
That's what I was getting at regarding some UI for it, possibly with sliders for each color item and other settings - Bastblack I know you are very experienced, so if it gives you problems, think about the average user.
operaguy posted Sat, 19 May 2007 at 8:06 PM
might as well pile on ideas.....
as well as a UI which would generate shaders for Poser, if it could read shaders already out there in the market and 'transmute' them into Matmatic/PoserMaterialRoom language....wow that would be amazing.....
::::: Opera :::::
pjz99 posted Sat, 19 May 2007 at 9:32 PM
Let the feature creep begin! Mwahahaha!
kuroyume0161 posted Sun, 20 May 2007 at 12:20 AM
Backing up bagginsbill here a bit, I can't see how a GUI will be of much use for this type of thing. Mainly, it's a language (in its own right) that allows you to turn basically (but not totally) mathematical concepts into Poser shaders. The only GUI for something like this that I can pull from is LegOS and its clunky little blocks (which I quickly bypassed for real programming). :)
Now, there might be a GUI concept of use in this somewhere - it would be ultra neato keen (sorry) to actually see the results of what you are 'programming' and to have a little script editor there as well (say, script text on one side and a graphical box to show the Poser material result). So you enter whatever code and then hit a button to display what would result - something like a 2D/3D plotting application (e.g.: Mathematica or MathCAD). But that would depend upon the extent to which this can be achieved.
C makes it easy to shoot yourself in the
foot. C++ makes it harder, but when you do, you blow your whole leg
off.
-- Bjarne
Stroustrup
Contact Me | Kuroyume's DevelopmentZone
operaguy posted Sun, 20 May 2007 at 12:44 AM
my preference would be for changes to the shader tree to have an effect on the actual actor affected in the viewport under full shaded display with software or hardware assist.
Shader effects show up in the preview. You change something, it refreshes (optionally automatic) and you see the difference
::::: Opera :::::
pjz99 posted Sun, 20 May 2007 at 12:50 AM
No no, you're thinking of this from the ubergeek persepctive. Think of it from a user perspective. This is why people buy MS Word instead of writing all their text documents from command line console input. The current workflow (correct me if I'm wrong):
Step 1: Run the matmatic script against your scene file, which applies these shaders to specific material zones with parameters set by the script.
Step 2: Run Poser, open scene file.
Step 3: Go to materials room and manually tweak values for specific shader nodes on separate material zones, and be careful not to screw anything up or mis-match color values. From what I can grasp, cut/paste will not be a good idea for this step (outer ring -> middle ring -> inner ring). I'm expecting that either this shader layout will be applied to Sclera + Iris + Pupil, or the Pupil zone will be transparent (correction: black) and the edge of the Iris will properly blend with the edge of the Sclera (I'm curious to know which).
Step 4: Cross fingers and render.
You are comfortable with Step 2. I'm fairly comfortable with Step 2 as well, even if I don't understand the math. Most Poser users (if you're looking at making this a marketable product) are not, and won't be bothered to learn. So, consider adding a poserPython menu front-end to change the shader values, a la OcclusionMaster.
Step 1: Run the matmatic script against your scene file (frankly this could be streamlined as well, I think, but that's a different item).
Step 2: Run Poser, load scene file
Step 3: Start poserPython menu script, or alternatively Wacro (as Face_Off has done it)
Step 4: Graphically fiddle sliders without even entering the Materials room; slider values are translated to numeric values, possibly split across different shader nodes fo Sclera/Iris/Pupil. Also have an option for direct numeric input.
Step 5: Render with high confidence because the menu has strong data validation. Possibly even a small poserPython subscript to create a camera and "preview" render just the eye/iris with some high-speed render options.
Sure, all of these things can be done manually. Why does Face_Off bother to sell OccusionMaster and other products? Ease of use. I'm not talking about bundling up all of Matmatic, really just about this eye shader business. I seriously think this particular use of Bill's shader work has a lot of marketability, just with some comfort features added.
edit: heck, alternatively make it completely independent of matmatic. many people with no interest in matmatic would likely be interested in this application.
pjz99 posted Sun, 20 May 2007 at 12:51 AM
Quote - Shader effects show up in the preview. You change something, it refreshes (optionally automatic) and you see the difference.
The problem is, mostly, they do not.
msg24_7 posted Sun, 20 May 2007 at 3:55 AM
Quote - my preference would be for changes to the shader tree to have an effect on the actual actor affected in the viewport under full shaded display with software or hardware assist.
Shader effects show up in the preview. You change something, it refreshes (optionally automatic) and you see the difference
::::: Opera :::::
You already have this when using Bagginsbill's "Parmatic".
Matmatic creates the shader, Parmatic adds dials for some or all values of the shader.
You twist the dial or enter a new value, Parmatic picks up on it and changes the shader
intantly.
If it's something that's visible in preview mode, you'll notice the change right away.
Martin
Yesterday's the past, tomorrow's the future, but today is a gift. That's why it's called the present.
kalon posted Sun, 20 May 2007 at 6:21 AM
Okay, what msg24_7 said...
Most are running from within Poser, so...
Step 1: Run matmatic to generate materials from the scripts in the designated location
Step 2: Go into the material room and apply new materials to the specific item (also good time to generate thumbnail for the newly created material).
Step 3: If the script was Parmaticly enhanced, some parameters of the material will be able to be adjusted with newly created dials on Poser's parameter widget.
AFAIK, neither Matmatic or Parmatic apply materials to anything. Of course, this varies if you've generated pose files instead of material files. Still, you have to apply them.
bagginsbill posted Sun, 20 May 2007 at 7:15 AM
I'm really busy with real life this weekend and can't post another long response, so I'll be quick.
My pupil msg24_7 has given you the answer. The program Parmatic gives you Poser dials on props and figures. These dials change the parameters of shaders on that prop or figure. You can have a single dial that changes ALL the mat zones of a figure. For example, you want to darken all 10 mat zones of skin? One dial. And you don't go into the mat room.
Parmatic works for any shader no matter how produced. It does not have to be a matmatic shader, although matmatic is probably the fastest, easiest way to make a parameter dialable shader. Go download Parmatic and read the script - the comments tell you how to make any shader respond to dials.
There is still merit in a GUI, especially one that can do better preview. Ever use photoshop "variations" tool? What I would like to build is some way to visualize a shader in a large (600+) preview, surrounded by little previews. You select a parameter, say a number. The little previews show that number increased and decreased by various amounts. You pick one, and that becomes the big preview. Then you pick a color - the little previews show changing the color in various amounts. Click the one that's heading in the right direction. And so on.
This has to be instant. I agree that picking colors and brightness that balance is hard - even I get it wrong about a 100 times a day. I need this tool too so I can explore a shader.
The thing is, I don't have the algorithms for all the nodes (EF keeps them secret) so I could never mimic them perfectly in a standalone program. Doing it in Poser would be too slow - my cloth shader takes 5 seconds to refresh in the mat room preview.
What I'm thinking of doing is keeping a pre-rendered image of every node offline. The matmatic GUI-based adjustment tool generates your shader and sets up the previews as I described, but using all these pre-built images it would be INSTANT update. It might not exactly be the same pattern as the real shader, but it will be really close - close enough that you'll get the colors right.
I've already built something similar for lights, never released it. Say you're doing an indoor scene and you really must have 6 spot lights pointing down from the ceiling, plus an IBL, an infinite for sunlight through the window. You have 8 lights to balance, and there is specular and diffuse to think about too, so there are 15 values to adjust. If the render takes a minute, you could be looking at 1 to 2 hours of tweaking.
Instead I render each light by itself using the Render Passes script - that takes about 10 minutes. I now have 8 renders, plus an AO shadow render. I load them into my light-balancing tool, along with the 15 parameters I started with. Then I use sliders to adjust the strength of each light component or shadow strength in the tool - with instant update. Usually it takes about 3 minutes to find the perfect settings. Then I read off the new specular and diffuse and shadow strength values to put on my lights and do the final render. It's very handy but not slick enough to distribute yet.
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)
kuroyume0161 posted Sun, 20 May 2007 at 8:57 AM
You have a real life? ;) Me too it seems - putting a culvert at the end of my driveway before having it paved (yes, it's currently a long dirt drive). This is mainly to facilitate the passage of my new 40' rv bus which didn't fair too well on first entry. Thus not much getting done on my programming either. :)
This is all very fascinating. The shader interface, while being very powerful and flexible, is very daunting and confusing. bagginsbill and face_off have gone a long way towards removing the latter part of this. If you can't do everything in the Poser preview, it might be good to do what other software does and use a proxy primitive (sphere, cube, ...) on which to build a preview - think Vue et al here.
I'm not being more than a cheerleader here - as my mind is more on that 'real life' work to be done (in order to place the 28' culvert, first a 4x30' slab of concrete has to be removed - about three tons or so) while continuing to churn the current programming endeavors in my mind as well (solving Poser's JP bulge algorithm - if anyone has any insights?). I will be peeping in once in a while to see how this is developing.
C makes it easy to shoot yourself in the
foot. C++ makes it harder, but when you do, you blow your whole leg
off.
-- Bjarne
Stroustrup
Contact Me | Kuroyume's DevelopmentZone
operaguy posted Sun, 20 May 2007 at 9:15 AM
Let me give you all my "meta" idea why I am interested in shaders affecting the preview mode as impactfully as possible, as real as possible.
Animation.
Think about it. If your goal is to produce semi-realistic animation (not hyper-real animation, but not "toon" either)........
You can make your final raw frames by rendering not with Firefly, but with Preview. Get some good color, some good skin shading, some semi-realism in preview mode, 'make movie' with anti-alias set on, and your render time for a 720x480 frame is 2-4 seconds.
You then open the folder of frames (your image sequence) in After Effects or Photoshop and apply filters.
I am just beginning to fool around with this idea. Here is my test animation.
http://jrdonohue.com/anna1.mov
There is a velvet shader on the dress and of course skin shaders on the skin. Please forgive "film grain overload" in this animation; it is only a test, and once I proved out the idea I did not attempt any refinement of the Photoshop filter(s).
This animation was rendered in preview mode, render time 3 seconds per frame, Photoshop filter applied to all frames under "automation."
NOTE: while you might think the great benefit is 'hardware assisted render of preview mode under OpenGL", I actually had my preview set to SreeD. Why? Well, it's the hair. First of all, dynamic hair under this plan must be clicked "show populated". Well, under OpenGL the hair does not look as good in preview; it looks much better and fuller under SreeD. More experimentation to come. One interesting avenue: kicking up the hair population from, say, 15,000 to 40,000. It affects render time a little because of the resources necessary to render the preview of each frame; but not much. Overloaded hair like that does not increase hair sim time, since you calculate the sim with "show populated' off, then turn it on before render.
::::: Opera :::::
Khai posted Sun, 20 May 2007 at 9:34 AM
so... if a GUI was attached to Matmatic, you'd be looking say, a Poser version of Darktree?
slinger posted Sun, 20 May 2007 at 11:59 AM
Quote - so... if a GUI was attached to Matmatic, you'd be looking say, a Poser version of Darktree?
Now that's something I can relate to, and would love to see.
The liver is evil - It must be punished.
bagginsbill posted Sun, 20 May 2007 at 12:58 PM
Darktree? No I don't think so. I've not used that prog but it looks like the Poser material room - assembling nodes into a tree. That's not cool - too slow. After you put about 120 nodes in, you're totally lost. And you can't give even a 50 node shader to someone else who didn't watch it being made - they don't have a clue.
No what I'm saying is I use matmatic to build a monster shader with 500 nodes in it. Then I give you a GUI to modify the 25 key parameters. I already have that, using Parmatic. You never look at the script or the shader. But you don't get a real-time preview unless you go into the material room, and then that's really slow.
I'm talking about giving you the 25 dials, a nice BIG preview, and one that updates instantly. As well, it would have parametrically nearby neighbors previews as well, so you can ignore the parameters and just point at which one you like best. Then it makes more variations and you point at the one you like best. You keep repeating that until you get something you like a lot. And you have no need to know how the parameters got there.
I can't imagine anything being easier.
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)
operaguy posted Sun, 20 May 2007 at 1:07 PM
Master card: 5352 2234 9999 9999 expires 12/12/2020
bagginsbill posted Sun, 20 May 2007 at 1:15 PM
Ok I'll get to work on that.
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)
kalon posted Sun, 20 May 2007 at 1:55 PM
LOL @ operaguy - hey charge mine too!
It almost sounds like the old fractal designer in Kai 3
Khai posted Sun, 20 May 2007 at 2:19 PM
Quote -
No what I'm saying is I use matmatic to build a monster shader with 500 nodes in it. Then I give you a GUI to modify the 25 key parameters. I already have that, using Parmatic. You never look at the script or the shader. But you don't get a real-time preview unless you go into the material room, and then that's really slow.
I'm talking about giving you the 25 dials, a nice BIG preview, and one that updates instantly. As well, it would have parametrically nearby neighbors previews as well, so you can ignore the parameters and just point at which one you like best. Then it makes more variations and you point at the one you like best. You keep repeating that until you get something you like a lot. And you have no need to know how the parameters got there.
I can't imagine anything being easier.
How Darktree works : once you've complied your tree,(yes that is like the mat room just a lot lot faster), you save it out and the user just sees the results with modifaction dials in Symbiont (the program interface part of Darktree).. so we can say Matmatic = Darktree and Parmatic = Symbiont...
BastBlack posted Sun, 20 May 2007 at 2:56 PM
bagginsbill, Let me know if you could use my color chart. I will sent it to you. ^^ bB
pjz99 posted Sun, 20 May 2007 at 5:54 PM
BB it may be desirable to just have a subscript actually create a camera and run a render with some specific options. Since (one would hope) this would be something you'd do at scene creation time, or at character development time, and then it will be largely left alone for that scene or that character - e.g. I don't go tweak sclera/iris settings much at all once I've gotten to a stopping point with a character. An instant-update preview would be ideal, but not exactly a make or break feature. If it turns out not to be practical, or if preview quality isn't acceptable to you, doing a scripted render may be a good Plan B, if poser 6 (at least) can invoke the render engine from poserPython.