Render outputSize that fit the object
Hi man! :)
How do I set the width and height measurements in rendering (setup) that fit a selected object in the top view?
Situation:
I have an object
I create a freecamera in Top Viewport
Renders the camera
The image (vfb) must correspond to an BoundigBox surrounding object
For the first three steps and dummy box are successful, but the last I do not understand how to do...
Do you have any suggestions?
Ciao
Michele
Comments
ok i had an hour to kill so i
ok i had an hour to kill so i thought why not improve the code and document it.. reason being that i so far havent seen one working approach to scripted baking on any forum
its not verry dynamic but i think with the comments anyOne can fit it to their needs
its still using a cage not a ray offset value but i bet ill be bored again the next few days so look forward to another improvement, still unsure on how to get the projection going without the mod.. but well see
Raphael Steves
Thank you again for taking
Thank you again for taking the time and patience for my problem :)
You have been extremely useful and very clear :) :) I hope to learn something more from your help ;)
Grazie
Michele
Thanks again for your clear
Thanks again for your clear and precise explanations Insanto! :)
the size is always the max x
the size is always the max x or y depending on whats bigger, the only thing is that its squared.. i know there is a solution but oh well .. at the verry least you could rendermap resize it with filtering on should be ok
your approach is valid too but it doesnt work with objects using real world map coords thats why i used this way. and its the same speed to render. (mine doesnt use lighting but needs to resize the map at the end (new code))
there are always many solutions to 1 problem, like my hacky one to the aspect issue :P
you could've tried to solve it propperly but i already know that if you dont switch to scanline and bake with MR you cant solve it so rendermap it is, have phun
Raphael Steves
Wow! is completely different
Wow! is completely different from what I imagined! It works great and now, I study your solution (very interesting)...
It would be wonderful to determine the size of the bitmap :) Now I see how can proceed.
My solution script for heightmap is not valid? What do you think?
Thank you enormously for the response, resolution and patience you had with me
Best Regards
Michele
its a scope issue, you didnt
its a scope issue, you didnt define d as local higher up than the for loop.. so when the loop ends d ref is gone
aanyways, heres my approach to this:
its got that nasty habbit of keeping a 1:1 aspect ratio.. i knew the answer to that prob a while back but forgot it again ;) your a smart gal, youll figure it out
have phun
Raphael Steves
?yes it is?but you know that
?yes it is?
but you know that d is undefined in your code right?
imo you really should propperly define your scopes and make the code a little neater
what you wanna do is create heightmaps for all objects in the scene?
hang on a sec ill whip something up
Raphael Steves
This script is a work in
This script is a work in progress this is the reason why it is so messy in the development...
The heightmap must be only for the object selected.
Why d (dummy) is undefined? it is defined when I create dummy or not?
why not make a bbplane below
why not make a bbplane below the scene and bake your stuff to it?!
can you upLoad or send me a sample maxScene to clarify and tell what you want as a result?
Raphael Steves
Ok,try this: Create a Teapot
Ok,try this: Create a Teapot in any viewport and run the script_test below (still under construction):
As you can see, the measure (outputSize) of final rendering (Top) IS NOT EQUAL to measure of BoundingBox... For example, if BoundingBox measure 30X30 (Width/Heigth), the outputSize of renderig must be 30x30