Question to XSI users

Community Forums/Developer Stations/Question to XSI users

Jake L.(Posted 2007) [#1]
(and I know there are some around...)

I got a nifty problem. Basically I want to render sprites in XSI and use them as 2D-Sprites. Say I got a ball to render:
I setup renderoptions to render a 64x64 pixel frame. No prob, works well! But how can I position the camera, so that my ball fills the entire 64x64 pixels, and not 60x60 or 62x62.

I thought of a "fixed stage setup" but then I have to keep the size of my objects within a certain range, also this won't work with different frame-sizes.

Any tricks how to do this?


Pax(Posted 2007) [#2]
i think you'll have variations and not be able to always fill 64x64 (if it's a human figure, limbs spread out differently everytime). In any case, if you want a fixed size, you can place a polygon mesh at the back of your model (from camera view) and then rendermap it's texture to 64 x 64. There was a video somewhere (can-t remember if xsi site or dvds that came with softimage), where you just adjusted maximun distance from camera. Hope this helps.


Jake L.(Posted 2007) [#3]
Hi Pax,

the objects don't need to fill the quad the whole time (that would unwantedly scale the 2D-Sprite). It should only fit in it's maximum extend (can fit this manually).

What I'm after is more like the "F"-Key. "F" zooms the camera to display an object entirely in a viewport. If I render this it's near to the effect I want, but it leaves a seam (object will be inside viewport, but not exactly at it's visual borders).

Your attempt sounds clever, but I don't understand it. Maybe you can you explain it a bit more?!

Thanks
Jake


Pax(Posted 2007) [#4]
hi, you just need to have an object in spot. Put a polygon mesh behind it, make it constant with your keying color and assign a uv map + a rendermap property. In the rendermap ppg setup for the created uv, and increase the maximun distance:

Property - rendermap - advanced - distance from surface.

In theory, that wold give you a frame of the sprite.

Hope this helps.


Jake L.(Posted 2007) [#5]
Ah, now I understand. Will try it soon.

Edit:
After reading some docs (even found the example you mentioned) I arranged the setting as you suggested. Works so far, but the rendered image looks flat and blocky - e.g. a smooth button would look like a pyramide.

So I stick with fiddling the rendercam to fill the viewport exactly. But by your ideas (and reading the docs again) I learned some tricks that could be handy in the future ;)

Jake