Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Author Topic: Rendering a 32x32x32 object as a 32x32 pixel image (also for other sizes)  (Read 10054 times)

Bart

  • Newbie
  • *
  • Posts: 6
    • View Profile

I am trying to make some nice looking 3D buttons in Anim8or for a 2D graphical user interface. I know what the size of the button in the interface should be: 32x32 pixels. So I'd like to render an image with the button on it so that the button has a size of exactly 32x32 pixels. I have tried View > Frame Selected to make the object fit nicely into the view, but when I render it, it's not exactly 32x32 pixels in size. Is there any way to make sure that it is exactly 32x32 pixels (the size of 32x32 pixels is just an example to explain the global idea)?

Bart
Logged

thecolclough

  • Sr. Member
  • ****
  • Posts: 890
  • 3D Ignoramus 1988-2002, Anim8or User 2002-present.
    • View Profile
    • www.mattghc.com

the area which you can see by default, when you first open anim8or in object mode, is 200 anim8or units across (you can always get back to this setting by using the 'View > Reset' command).  so if you render that at 200 x something, then you'll get an exact 1-pixel:1-unit ratio.  if your object is 32 units wide, then you should, in theory, be able to cut out a 32x32 segment of the render, with your object just fitting comfortably inside it.

hope that helps ;)

- colclough
Logged

mcheccyb

  • Full Member
  • ***
  • Posts: 173
    • View Profile

you could always just render it large - crop it to shape using an image editor, and then scale it to 32x32
Logged

Bart

  • Newbie
  • *
  • Posts: 6
    • View Profile

the area which you can see by default, when you first open anim8or in object mode, is 200 anim8or units across (you can always get back to this setting by using the 'View > Reset' command).  so if you render that at 200 x something, then you'll get an exact 1-pixel:1-unit ratio.  if your object is 32 units wide, then you should, in theory, be able to cut out a 32x32 segment of the render, with your object just fitting comfortably inside it.

hope that helps ;)

- colclough
Ah yes, that works perfectly :D. Thank you.
And is there any way to do this for objects with a length larger than 200?

Quote
you could always just render it large - crop it to shape using an image editor, and then scale it to 32x32
I tried that, but the size doesn't seem to be correct then.


Thanks for the replies.

Bart
Logged

thecolclough

  • Sr. Member
  • ****
  • Posts: 890
  • 3D Ignoramus 1988-2002, Anim8or User 2002-present.
    • View Profile
    • www.mattghc.com

Ah yes, that works perfectly :D. Thank you.
you're welcome :)

And is there any way to do this for objects with a length larger than 200?
that's where it gets a bit trickier... but in theory, you should be able to do it by scaling the object down (say, Edit > Scale > Scale Custom, Scale Factor 0.2, ie. one fifth of the original size), and then multiplying the render resolution by the same number that you divided the object size by (ie. in this example, multiply it by 5, to give a 1000-pixel-wide image.  then you'd end up with an image where you have 1 pixel for every 1 unit of the object's original length... i think...

use the controlled scaling tool in the Edit menu, rather than the one in the left-hand toolbar, as it'll make it easier to control the scale factor.  and if your object contains multiple parts, you'll want to do Select All and then Group, before scaling, or else you'll end up with a really weird-looking mess!

again, hope that works...

- colclough
Logged

Bart

  • Newbie
  • *
  • Posts: 6
    • View Profile

That works great again :D. It's a very clever solution.
Thank you very much.

Bart
Logged