Mon, Jan 6, 11:38 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2025 Jan 06 7:01 am)



Subject: Faking Ambient Occlusion in Interiors for speed and better results


bagginsbill ( ) posted Wed, 16 May 2007 at 9:39 AM · edited Mon, 06 January 2025 at 10:51 PM

Attached Link: Link to thread at RDNA

file_377727.jpg

I'm really enjoying the power of material based AO, but sometimes the results are less than perfect, and it really slows things down.

For interiors, dealing with walls and ceilings to get the "global illumination" look can be faked. I've created a script with a function in it to generate a shader that fakes the AO in corners for walls, ceilings, etc.

Also, when using mostly IBL, a wall shows no gradient in the lighting, because IBL lighting lookup is based only on the normal of the surface (which way it's facing) and this is a constant across a wall. So I included a gradient parameter to darken the bottom of a wall, giving the appearence that there is more ambient light near the ceiling than near the floor.

The attached render is only using an IBL without AO or raytracing. The smooth variations in brightness are coming from the shaders.

Follow the link to RDNA node cult to get the matmatic script. If you're not using matmatic, you should be. But, I can post the shaders directly - just ask. You won't have as much control with the shader as it is somewhat complicated, with 15 nodes in 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 Wed, 16 May 2007 at 9:43 AM

That looks pretty snappy.  Where does one get the Matmatic base?  I've been meaning to hunt your widget down and try it, it really looks fun.

My Freebies


bagginsbill ( ) posted Wed, 16 May 2007 at 10:02 AM · edited Wed, 16 May 2007 at 10:03 AM

I'm glad you're interested! Welcome to the cult. I know it's hard to find.

At RDNA, use the per-forum search links, not the top level search link. The top level one doesn't actually look in the forums at all. You'll find matmatic stuff in Poser 6 & 7 forums and the Node Cult forum.

You need to first download and install matmatic. Then you can download scripts that I post and run them using matmatic. You do not run them as plain old Python scripts, because they expect matmatic to do a lot of prep work and so on. Otherwise, the scripts would be a bit more complicated.

Here is the link to the original posting about matmatic:

[ http://www.runtimedna.com/mod/forum/messages.php?ShowMessage=228105

The actual matmatic beta 1 distribution file is here:](http://www.runtimedna.com/mod/forum/messages.php?ShowMessage=228105)[http://loftydesigns.net/Beta/Beta/MatmaticBeta1.zip

That version only runs on P5 and P6. If you are on Poser 7, you need to install that first, then go to this thread:
](http://loftydesigns.net/Beta/Beta/MatmaticBeta1.zip)[http://www.runtimedna.com/mod/forum/messages.php?ShowMessage=266423

Look for post #6, there is an attached file there that contains a preliminary version of matmatic for P7.

Save that zip file and unzip the contents directly into the Runtime:Python:matmatic folder.

Matmatic scripts should be named .mm1.txt, not .py. (That's em em one, not em em el, it stands for matmatic version 1 scripting language).  And you probably want to put downloaded scripts each into its own folder.

Be sure to read the stuff under matmatic in the docs folder.

Enjoy, and show your work!](http://www.runtimedna.com/mod/forum/messages.php?ShowMessage=266423)

NOTE: When I edited this post, all the links got extended into the plain text. I don't know why - this editor sux.


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)


Valerian70 ( ) posted Wed, 16 May 2007 at 10:09 AM

I need to take some time off work and actually install Matmatic, I'm sure it will make all my node fiddling a lot easier - right now I'm working on the principles of "what on earth does this do when I set this to that and that to this" then plugging through various things and ending up with some real frights and then some vaguely usable things.

Be warned, I am liable to pester like mad with inane questions when I get round to turfing it out of it's zip and onto my hard drive (only downloaded it at Christmas rolls eyes)

 

 


bagginsbill ( ) posted Wed, 16 May 2007 at 10:11 AM

Looking forward to it Valerian70!


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)


jjroland ( ) posted Wed, 16 May 2007 at 10:19 AM

Im trying now and I have probably a silly question but I don't want to mess up the install.  You said extract directly to the runtime/python/matmatic folder.  So am I suppose to create a folder inside poser runtime called Matmatic?  Or can this be run from an external runtime - and is the file structure already included in the zip?

Thank you!

I know I make myself sound like a twit with my elementary questions, but I've learned to ask EVERYTHING by messing things up before.


I am:  aka Velocity3d 


Acadia ( ) posted Wed, 16 May 2007 at 10:23 AM · edited Wed, 16 May 2007 at 10:27 AM

"It is good to see ourselves as others see us. Try as we may, we are never
able to know ourselves fully as we are, especially the evil side of us.
This we can do only if we are not angry with our critics but will take in good
heart whatever they might have to say." - Ghandi



jjroland ( ) posted Wed, 16 May 2007 at 10:31 AM

Man all the Xs Ys and math symbols sure are daunting (in those scripts)  I just see them and my soul starts to hurt.  I hope I get the hang too = )


I am:  aka Velocity3d 


dbowers22 ( ) posted Wed, 16 May 2007 at 10:40 AM

Quote - Man all the Xs Ys and math symbols sure are daunting (in those scripts)  I just see them and my soul starts to hurt.  I hope I get the hang too = )

The Ys just mean up and down and the Xs mean side to side. (Zs mean back and forth).
So when you see the Y, just think how high, an when you see the X just think extent.
(And the Z, how near me.)



momodot ( ) posted Wed, 16 May 2007 at 10:43 AM

bagginsbill, I would apreciate the shaders... I have yet had a chance to try matmatic but I am terrified of it. The stuff you are doing with it is amazing and in the case of the wall shader I have long fought with the walls in my interiors trying to give them a better illusion of ression using textures and bump maps. Thank you for your fantastic generosity in sharing all this new work!



Turtle ( ) posted Wed, 16 May 2007 at 12:22 PM

I have Poser 7, it would be appreciated if a simple list of what to do with beta1 and the Poser 7 files.
Just a small list, of what to do 1st, do we still have to change any script writting. Were excaty do the floders go=runtime/python/matmatic folder????
Thank you;
Leah aka Turtle

Love is Grandchildren.


Acadia ( ) posted Wed, 16 May 2007 at 12:56 PM · edited Wed, 16 May 2007 at 12:59 PM

It's super easy. I was over thinking stuff and had trouble, hehe

1.  Unzip matmatic to your Poser runtime. Not to an external one, right into your Poser runtime. It's in proper runtime structure, so do not move any files around. The script sits directly in the "Python" folder and not in the "scripts" subfolder. Do not move it.

2.  Matmatic comes with some scripts. There are others too.  See the  second page of the"Shaders & Nodes" thread for a list of relevant RDNA threads for more scripts.

  1. After you have unzipped matmatic to your Poser runtime, open Poser.

  2. File/Run Python Script

  3. Browse to the Python/Matmatic folder and select the script.

  4. Run it. That's all.  You won't see anything visible except a message in the window saying something about compilation complete.  That means that Matmatic read the scripts and generated material files that you access in the material room just like any other materials.  It's not like Wardrobe Wizard where you have to run the script each time.

If you want to add a button to your python scripts window in Poser, follow the instructions in this thread.  Dimension3D explained to me how to add an extra button, and to even make a subscript button where you can have as many scripts in there as you want.

  1. Go to the material room and locate your poser libraries material folder. Look for "Matmatic Demos".  Inside are the materials that Matmatic generated when you ran the script.

NOTE:  Matmatic generates errors if you have your files compressed.  If you compress your files, uncompress them before you run Matmatic.

If you want to add more scripts, go to the links I posted in the shaders&Nodes thread, and locate the script attachments in the RDNA threads.  Open the text file because you are going to save it.

Decide on a name IE: ReptileScales  and browse to your Poser/Library/Materials/Matmatic Demo folder.  Create a new folder in there called "ReptileScales"   Then save the text file to that folder and call it  "ReptileScales.mm1.txt"

Each mm1.txt   script file has to have it's own separate folder.

That's all there is too it.  Unfortunately matmatic is a script only, and doesn't generate .png files. So the materials are shown in the material room library as the shrugging man icon. If you want thumbnails, open a primative, apply the material and render a 91 x 91 thumbnail and save it as a .png file with  the same name of the shrugging man icon you are replacing.

"It is good to see ourselves as others see us. Try as we may, we are never
able to know ourselves fully as we are, especially the evil side of us.
This we can do only if we are not angry with our critics but will take in good
heart whatever they might have to say." - Ghandi



bagginsbill ( ) posted Wed, 16 May 2007 at 1:20 PM

*You said extract directly to the runtime/python/matmatic folder.  So am I suppose to create a folder inside poser runtime called Matmatic?  Or can this be run from an external runtime - and is the file structure already included in the zip?
*Nope. Here's what you do and why.

The original MatmaticBeta1.zip was compiled for P5 and P6 and has a complete tree structure already in it. So you just open the zip and drag the contents into your main runtime folder. I had to recompile for P7 but did not want to bother including all the other stuff in that zip.

So what you do is download the original matmaticbeta1.zip. Open the zip file. Drag the Runtime folder that is in there into your main runtime like you would with any other freebie. It will then copy all the demo scripts, documentation, and python stuff into the right places.

To use the P7 version, download and install the P6 version first as specified above. Do not try to run it yet. Then go get the P7 zip file. This does not contain the full distribution, or any of the correct folders.  All it contains is 8 PYC files (compiled Python) that work in P7. Navigate to the folder Runtime:Python:matmatic. This folder was created for you from the P6 zip file. Now just drag the P7 PYC files into that folder, and say YES to replace all the PYC files with the newer ones.

Then you can go into P7 and run the "compile.py" script that does all the work.

Be sure to read the HTML documentation inside the Runtime:Python:matmatic:docs folder. You want to double click on the file "index.html" to start the documentation in your browser. Please do at least read the "Installation", "Configuration", and "Running Matmatic" topics.

You do not have to write scripts. You can use mine. You can also usually modify my scripts to make parameter changes, even if you don't understand most of the script. I comment them heavily to show you where to change things.

Poser does not extend its knowledge of multiple runtimes to Python. So Python stuff must be installed in your main runtime. Sorry - I'd change it if I could.

Most things you do wrong have been done wrong by somebody else before. You usually can find the solution in the main matmatic announcement thread. If not, post a message asking for help in the Node Cult - we don't bite. Posting there is good because there are other cultists who often know the answer and will help you even if I'm busy and not looking.


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)


Turtle ( ) posted Wed, 16 May 2007 at 2:05 PM

Thank you Acadia and **bagginsbill. **I now have it Poser 7.
I did a tiny test run. 
I had a column and went into Materials and picked a column from the list.
Interesting change, since I didn't know what I'm doing.
Thanks again, now I can take my time reading and learning.
:O)

Love is Grandchildren.


bagginsbill ( ) posted Wed, 16 May 2007 at 2:08 PM

file_377750.jpg

Acadia, I don't know how you want to handle it, but every single thread in the Node Cult at RDNA is about shaders.

Maybe you only want to call out really important ones in your list. But I think the Loom shaders are really important. As far as I know, there is no cloth shader of similar quality in existence for any product, regardless of price.

The attached render quality had to be massively reduced in order to fit the Rendo 200K limit. Still it looks pretty good here. Click to see the full size. Check out the tiny imperfections in the threads.

Loom Script
Plaids Using the Loom
Making your own weave patterns
Downloading weave patterns
Loom showing off

This is the most fun to use script of all. You can download weave patterns and generate hundreds of new cloth shaders and renders in minutes. I still play with it just to relax.


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, 16 May 2007 at 2:18 PM · edited Wed, 16 May 2007 at 2:19 PM

file_377752.doc

As requested, attached is a zip file containing the fake ao shaders for walls and ceilings.

Copy the two MT5 file inside the zip into any runtime material folder you want to.

Then just apply them to a wall or ceiling square like any other material, from inside the material room.

After they load, you can alter the Diffuse_Color to make them any thing you want. You can also make them brighter or darker by changing the number in the Diffuse_Value.

You can also layer on some bump or displacement for rougher walls, or add turn on the specular for shiny walls. Enjoy.

I had to add .DOC to the file name to make it load here in the forums. Remove ".doc" from the name so it ends in zip. Or save it as .zip to begin with.


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, 16 May 2007 at 2:22 PM · edited Wed, 16 May 2007 at 2:22 PM

Content Advisory! This message contains nudity

file_377753.jpg

Here's a little amusement (my take on Vicky in a temple) I made just for grins using the matmatic columns and my V3 skin shader. I never posted this before. Forgot about it. It's not really gallery worthy, but I like 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)


jjroland ( ) posted Wed, 16 May 2007 at 4:14 PM

Thank you all for the additiona instructions.


I am:  aka Velocity3d 


bopperthijs ( ) posted Thu, 17 May 2007 at 7:00 AM

BM

-How can you improve things when you don't make mistakes?


shedofjoy ( ) posted Thu, 17 May 2007 at 7:39 AM

bm

Getting old and still making "art" without soiling myself, now that's success.


kobaltkween ( ) posted Thu, 17 May 2007 at 10:37 AM

are the matmatic columns available anywhere?



bagginsbill ( ) posted Thu, 17 May 2007 at 10:47 AM · edited Thu, 17 May 2007 at 10:48 AM

cobaltdream,

Shame, shame, you did not read the manual. :biggrin:

No problem. It is included in the material folder MatmaticDemos:Column

It is called Column.mm1.txt. It creates four materials.

A render of these four was included in the manual in the file WritingScriptsFunctions.html which you can reach by starting from the index, click "Writing Scripts" then click "Functions" then scroll down to the Conclusion section.

The script begins with the following comment instructing you how to use it. Get used to opening the scripts to see what they have to tell you.

Demonstration of interesting columns.

To use, insert a Poser Primitive Cylinder.

Set the cylinder Scale to 300%, yScale to 800%.

Then apply one of the surfaces created 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)


bagginsbill ( ) posted Thu, 17 May 2007 at 10:51 AM

file_377821.jpg

Sneak peak - I'm writing a new tutorial with a script to deal with cabinetry. It is surprising what you can make with a few boxes and some good shaders.

Here is my current work in progress - a desk. It is made of just 4 poser boxes from the Primtiives library. All the sculpted geometry and wood grain is done with shaders.


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)


kobaltkween ( ) posted Thu, 17 May 2007 at 11:28 AM

i'm properly chastened.  i admit to reading only as far as i needed to get... now i can't remember what it was i was using?  god, my mind is going.  well, and worse, i've been thinking about giving up on poser for a while.  if i could afford p7 right now it would be great, but as is, i just can't render anything at the size and quality i'd like to.



XENOPHONZ ( ) posted Thu, 17 May 2007 at 12:14 PM

I need to give this one a serious look -- when I'm not here at the office.

Thanks, bagginsbill.  I am properly impressed with what I've (briefly) looked over in this thread.  Time to go pay a little visit to RDNA.  Later tonight.

Something To Do At 3:00AM 



pjz99 ( ) posted Fri, 18 May 2007 at 12:26 AM

And coming back to this, thanks for all the valuable info BB.

My Freebies


bopperthijs ( ) posted Fri, 18 May 2007 at 3:07 AM

@ Bagginsbill, that looks great. I know we had a discussion about wood shaders some months ago, but this looks very realistic Are those raised and fielded panels also made with shaders? I'm curious to know how you did that. I've got your matmatic running since yesterday after having some problems to make it work in Poser 7, sometimes I get too enthousiast and forget to read the manuals, but now it works. I finally had a free day to spent some time on it and I think matmatic is a very valuable tool.

regards,

Bopperthijs

-How can you improve things when you don't make mistakes?


ghonma ( ) posted Fri, 18 May 2007 at 4:01 AM

Really nice work there BB. You should also take a look at this thread to see how far gradient based GI fakes can be pushed:

http://forums.cgsociety.org/showthread.php?f=5&t=176195&highlight=gradient

It's for lightwave, but should work in poser as well, as long as you can get sufficient control over the gradients.


bagginsbill ( ) posted Fri, 18 May 2007 at 7:07 AM

bopper:

Yes the raised panels are done with math. Everything you see is actually a flat square polygon. I will show you how to do it in a tutorial coming soon. I will also give you the complete matmatic script to generate those shaders and thousands more.

Sorry you had problems. Maybe you could post a little note in the node cult to help other new people understand what not to do, or how to recognize what you did wrong so they can correct it quickly.

Oooh, ghonma, that is a very good link you provided. Fantastic and yes I can do this quite easily in Poser using matmatic. Watch for another tut!


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)


msg24_7 ( ) posted Fri, 18 May 2007 at 7:24 AM

Quote - ...
Oooh, ghonma, that is a very good link you provided. Fantastic and yes I can do this quite easily in Poser using matmatic. Watch for another tut!

 

I am really looking forward to that one!

Yesterday's the past, tomorrow's the future, but today is a gift. That's why it's called the present.


momodot ( ) posted Fri, 18 May 2007 at 10:32 AM

I have had an idea for a long time but have not checked it out... could IBL be faked by using a script that plugged a gradient into all the ambient channels in a scene? Essentially to act as a fill light for the light bouncing off the floor and walls so fewer lights would be needed?



kobaltkween ( ) posted Fri, 18 May 2007 at 11:24 AM

pardon, but what's a "null" in lightwave?



bagginsbill ( ) posted Fri, 18 May 2007 at 11:49 AM

momodot - 
You'd have to do a little more than that - you'd have to include the nodes that are defining the objects color and brightness and multiply with that gradient. It can be done. I assume you're asking because P5 doesn't have IBL?


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)


XENOPHONZ ( ) posted Sat, 19 May 2007 at 2:31 AM

file_377991.jpg

Thanks again for providing this package to the community, BB.

Just set it up and tried it -- a quickie.  Interesting.  No.......it's 3:27AM as I type this, and I haven't read the manual (I haven't even read this thread in its entirety -- just the highlights).  I spent all of about 10 minutes installing the package and then fiddling.  So I'm doubtless doing something wrong to create the artifacts seen here at the base of the column.  But it was just a quickie -- and I'm about to head off to sleep.  I'll review later as I am able.

I've just gotten Lightwave 9.2 installed on my new PC -- so I've been preoccupied with that.  So much 3D to learn -- so little free time.

Rendered in P7.

Goodnight.

Something To Do At 3:00AM 



bagginsbill ( ) posted Sat, 19 May 2007 at 6:32 AM

Xeno:

3:27 AM? :biggrin:

That's a simple problem - the column is generating a rather large displacement. Sometimes you have to tell Poser what the Max Displacement is on your prop. It can't always figure it out from the procedure.

This is in the manual, with the exact same render artifact. Look under "Writing Scripts" then "Displacements" or something - don't have my manual handy.


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 Sat, 19 May 2007 at 6:35 AM

cobaltdream,

I think a "null" object is one you put in the scene for parenting purposes or for indicating important points for use in math, but it doesn't actually render anything. Of course Poser can make any prop do this by just hiding 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)


XENOPHONZ ( ) posted Sat, 19 May 2007 at 10:19 AM

Quote - Xeno:

3:27 AM? :biggrin:

Eastern timezone -- one hour ahead of system time.  Not unusual for me -- I tend to keep late hours. :closedeyes:

Quote - That's a simple problem - the column is generating a rather large displacement. Sometimes you have to tell Poser what the Max Displacement is on your prop. It can't always figure it out from the procedure.

This is in the manual, with the exact same render artifact. Look under "Writing Scripts" then "Displacements" or something - don't have my manual handy.

 

Excellent.  Thanks for the pointer.

I can see the potential here.  This pushes Poser well beyond the ordinary.....or at least it pushes beyond the border of what's "ordinary" for most Poser-generated examples that I've ever seen.

Something To Do At 3:00AM 



kobaltkween ( ) posted Sun, 20 May 2007 at 4:04 AM

bb - i don't think that's what they meant in that tutorial. it seemed to have something to do with lighting.

Quote - from the link posted: The room shown above, don't have any light (Light intensity = 0 / Ambient Intensity = 0), only 4 Nulls to adjust the bouncelight effect of basic ambient light, more 2 lights is possible to obtain a result a little more accurate:



bagginsbill ( ) posted Sun, 20 May 2007 at 7:52 AM

cobaltdream,

Me: I think a "null" object is one you put in the scene for parenting purposes or for indicating important points for use in math, but it doesn't actually render anything.

You: i don't think that's what they meant in that tutorial. it seemed to have something to do with lighting.

Tut: The GI effect in this scene is achieved mainly with gradients ***based on distance of Null objects: 
***I don't understand your point. I said "or for indicating important points for use in math" which is exactly what the fake GI shader in the article is doing. It uses math to compute the distance to the Null objects to decide how to shade the walls to SIMULATE lighting. So yes it has something to do with "lighting" but not real lighting - rather simulating lighting and shadow in a shader - which is the point of this thread.

The technique does not require NULL objects. You could type coordinates into the shader and you would not need NULL objects at all. The convenience of the NULL objects is because you have a 3D preview that lets you move them where you want them in the scene, and not have to bother with guessing the coordinates at all, and these coordinates are needed to implement the gradient in the shader mathematically in such a way that reacts to the position of the interesting point - the origin of the faked light..


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)


kobaltkween ( ) posted Sun, 20 May 2007 at 4:35 PM

ah, i see.  i thought they were somehow controlling actual light  as opposed to faked light.  some sort of light based object that affected light properties.



Privacy Notice

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