Mon, Dec 2, 1:58 AM CST

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Need help in antialias in Cartoon mode rendering


Ralf61 ( ) posted Sat, 13 November 2004 at 8:49 AM · edited Mon, 02 December 2024 at 1:56 AM

I want to render some comic illustration from python in poser. But how can i antialias them as I would do from menu:
Render/Antialias Document

This is what the code in my program looks at the moment:

poser.Scene().AntialiasNow
poser.Scene().DrawAll()
poser.Scene().SaveImage("tif",name)

I Tried to swap antialais and drawall but nothing helped. The image that is saved is not antialised. Thanks for any help!


ockham ( ) posted Sat, 13 November 2004 at 10:45 AM · edited Sat, 13 November 2004 at 10:52 AM

There's one obvious error: you need the
parentheses on AntialiasNow because it's
a function call.

Also, I don't think you need the DrawAll,
because the AntialiasNow does its own draw.

But even after that, I agree that the
antialiasing action is NOT happening.

Here's how I'd write it:

import poser
scene=poser.Scene()
scene.AntialiasNow()
scene.SaveImage("tif",name)


You may need to do a full render.
Bear in mind that RenderToNewWindow
works in Python, but there's no
way to save the NewWindow as a file.
(This is a really bad problem with
the Poser setup itself.)
You'll have to be sure RenderToNewWindow
is off, then render to the document
window, then save as you have done.

import poser scene=poser.Scene() scene.SetRenderToNewWindow(0) scene.Render() scene.SaveImage("tif",name)

Message edited on: 11/13/2004 10:52

My python page
My ShareCG freebies


Ralf61 ( ) posted Sat, 13 November 2004 at 11:09 AM

Thank you Ockham, but the problem is, I don't want to make a render because I want the look "Cartoon with Outline". And if I render the image, I get a 3D-look. What I need is a function that does exactly the same as the menu function: Render/Antialias Document...


ockham ( ) posted Sat, 13 November 2004 at 11:21 AM

As far as I can tell, AntialiasNow simply does nothing. I tried AntialiasNow(1) but that wasn't any better. Maybe someone else has the solution!

My python page
My ShareCG freebies


Ralf61 ( ) posted Sat, 13 November 2004 at 11:40 AM

Thanks four your help so far ockham, if I find a solution, i post it here .... Ralf


duckmango ( ) posted Sun, 14 November 2004 at 4:23 PM

This isn't much help, but I thought perhaps the AntialiasNow() function could work with the SetDisplayStyle codes, as in:

scene.SetDisplayStyle(poser.kDisplayCodeSKETCHSHADED)
scene.AntialiasNow()

but no such luck. Like Ockham's already reported, AntialiasNow just doesn't seem to do anything.


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.