Thu, Jan 9, 6:28 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2025 Jan 09 3:46 am)



Subject: Poser. Material Room "Maths". How do it express "If (a is netween b and c) then


timarender ( ) posted Sun, 06 October 2013 at 12:01 PM · edited Wed, 01 January 2025 at 2:11 AM

If I wanted a value to change between particular frames, I guessed it would be easy. I have looked at available functions, but don't recognise which ones to use.

e.g:

If the 'frame number' is between 10 and 20, then output value 3; otherwise output value 7.


ockham ( ) posted Sun, 06 October 2013 at 12:30 PM

Well, if frame number is really what you're asking about, the simplest thing would be to rig up two separate PZ3 scenes, one for each material setup.  Render frames 10-20 in one scene, and the other frames in the other scene.  Combine them in VDub to make a movie.

I suspect that's not the real underlying question, though.

My python page
My ShareCG freebies


ironsoul ( ) posted Sun, 06 October 2013 at 12:54 PM · edited Sun, 06 October 2013 at 12:58 PM

In the past I've used max and min functions to calculate a range so I've extended that idea, not sure the logic is correct but have a look (unfortunately saw your question after the application of Guiness  which doesn't help :S ). There are other math functions so maybe there is a much easier way to do this.

b=max(0,a-9)
c=min(0,b-12)

d=(abs(c)/abs(c)) - Possible flaw, dividing zero by zero will cause a math exception so depends on how Poser handles this, I'm assuming the guys at SM will decide dividing nothing by nothing still gives nothing.

d=1 in range and d=0 otherwise

e=7-(4*d)



Snarlygribbly ( ) posted Sun, 06 October 2013 at 1:39 PM

file_498697.jpg

Try something like this ...

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


bagginsbill ( ) posted Mon, 07 October 2013 at 6:43 AM

Very close, SG. Step evaluates Value_1 <= Value_2. You have 21 and 9 in there - you should have 20 and 10. You overthunk 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)


Snarlygribbly ( ) posted Mon, 07 October 2013 at 7:32 AM

Quote - Very close, SG. Step evaluates Value_1 <= Value_2. You have 21 and 9 in there - you should have 20 and 10. You overthunk it.

Interesting. My biggest mistake was to refer to the Poser manual :-)

Quote - Step: Selecting Step returns 1 if Value 1 is less than
Value 2, and 0 if Value 1 is greater than or equal to
Value 2

A quick test demonstrated that you are indeed correct, so the manual needs to be changed!

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


bagginsbill ( ) posted Mon, 07 October 2013 at 7:47 AM

Oh - the manual says that? I have never read the manual - this must be why.


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)


timarender ( ) posted Mon, 07 October 2013 at 2:27 PM

Thank you all very much. That is most useful. The solution now looks so obvious!

I have spend a while looking at the maths functions, and I am attempting to reconcile them with my limited knowledge of programming. I wish the manual included a collection of examples of these kinds of logical collections.


WandW ( ) posted Mon, 07 October 2013 at 4:20 PM

Quote - Oh - the manual says that? I have never read the manual - this must be why.

 

That line went right into my Signature.  :biggrin:

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

The Wisdom of bagginsbill:

"Oh - the manual says that? I have never read the manual - this must be why."
“I could buy better software, but then I'd have to be an artist and what's the point of that?"
"The [R'osity Forum Search] 'Default' label should actually say 'Don't Find What I'm Looking For'".
bagginsbill's Free Stuff... https://web.archive.org/web/20201010171535/https://sites.google.com/site/bagginsbill/Home


heddheld ( ) posted Tue, 08 October 2013 at 3:58 AM

I'm still waiting on BB's Book !!! on the mat room

 

if BB and SB did a book on python ! (any chance, mmmm guess yer both busy lol)

I'd kill for it


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.