Rounding values in MEL

Hello,

say I have:

float $pos[3];

at the moment I’m rounding the values as follows:

(floor ($pos[0] + 0.5 )
(floor ($pos[1] + 0.5 )
(floor ($pos[2] + 0.5 )

That gives me int’s but I want say 3 decimal places and the last value rounded correctly – any tips ?

Also, what is the syntax so I dont have to type out the line three times ?

(floor ($pos[] + 0.5 ) – didn’t work like I thought it might

What are the tricks ?

Kind regards 😉

Making of Cadenus and Vanessa

Cadenus and Vanessa is the title of a poem by Jonathan Swift gave rise to the name of Vanessa. Created in Photoshop and Corel Painterdiv class=”feedflare”
a href=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?a=JhXtq6ruL0s:Vql1_L7Gh8s:yIl2AUoC8zA”img src=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?d=yIl2AUoC8zA” border=”0″/img/a a href=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?a=JhXtq6ruL0s:Vql1_L7Gh8s:7Q72WNTAKBA”img src=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?d=7Q72WNTAKBA” border=”0″/img/a a href=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?a=JhXtq6ruL0s:Vql1_L7Gh8s:V_sGLiPBpWU”img src=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?i=JhXtq6ruL0s:Vql1_L7Gh8s:V_sGLiPBpWU” border=”0″/img/a a href=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?a=JhXtq6ruL0s:Vql1_L7Gh8s:qj6IDK7rITs”img src=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?d=qj6IDK7rITs” border=”0″/img/a a href=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?a=JhXtq6ruL0s:Vql1_L7Gh8s:gIN9vFwOqvQ”img src=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?i=JhXtq6ruL0s:Vql1_L7Gh8s:gIN9vFwOqvQ” border=”0″/img/a
/divimg src=”http://feeds.feedburner.com/~r/Cgarena-GetAttentionInCG/~4/JhXtq6ruL0s” height=”1″ width=”1″/

DVD: UDK Lighting and Post Processing

Dave Prout and Jim Magill go through Lighting and Post Processing in UDK. Together they use over 27 years of combined exp.div class=”feedflare”
a href=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?a=7zfsNlkX0N0:kVPrzlJa_E0:yIl2AUoC8zA”img src=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?d=yIl2AUoC8zA” border=”0″/img/a a href=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?a=7zfsNlkX0N0:kVPrzlJa_E0:7Q72WNTAKBA”img src=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?d=7Q72WNTAKBA” border=”0″/img/a a href=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?a=7zfsNlkX0N0:kVPrzlJa_E0:V_sGLiPBpWU”img src=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?i=7zfsNlkX0N0:kVPrzlJa_E0:V_sGLiPBpWU” border=”0″/img/a a href=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?a=7zfsNlkX0N0:kVPrzlJa_E0:qj6IDK7rITs”img src=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?d=qj6IDK7rITs” border=”0″/img/a a href=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?a=7zfsNlkX0N0:kVPrzlJa_E0:gIN9vFwOqvQ”img src=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?i=7zfsNlkX0N0:kVPrzlJa_E0:gIN9vFwOqvQ” border=”0″/img/a
/divimg src=”http://feeds.feedburner.com/~r/Cgarena-GetAttentionInCG/~4/7zfsNlkX0N0″ height=”1″ width=”1″/

Prime Focus achieves 2D-3D conversion

Prime Focus accomplishes the first 2D-3D conversion for Warner Bros and Legendary Pictures in a record breaking time of 8 weeksdiv class=”feedflare”
a href=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?a=g4Vj7bdNNAQ:EhBppzXmkys:yIl2AUoC8zA”img src=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?d=yIl2AUoC8zA” border=”0″/img/a a href=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?a=g4Vj7bdNNAQ:EhBppzXmkys:7Q72WNTAKBA”img src=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?d=7Q72WNTAKBA” border=”0″/img/a a href=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?a=g4Vj7bdNNAQ:EhBppzXmkys:V_sGLiPBpWU”img src=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?i=g4Vj7bdNNAQ:EhBppzXmkys:V_sGLiPBpWU” border=”0″/img/a a href=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?a=g4Vj7bdNNAQ:EhBppzXmkys:qj6IDK7rITs”img src=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?d=qj6IDK7rITs” border=”0″/img/a a href=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?a=g4Vj7bdNNAQ:EhBppzXmkys:gIN9vFwOqvQ”img src=”http://feeds.feedburner.com/~ff/Cgarena-GetAttentionInCG?i=g4Vj7bdNNAQ:EhBppzXmkys:gIN9vFwOqvQ” border=”0″/img/a
/divimg src=”http://feeds.feedburner.com/~r/Cgarena-GetAttentionInCG/~4/g4Vj7bdNNAQ” height=”1″ width=”1″/

Interactive playback script for dynamics

Hi, im loocking for interactive playback script for dynamics, i cannot find it. i think this script was on this forum or on the 3dbuzz forum but i cant find this script on both forums ;/ .
if this helps : when script is addet to the shelf have an green triangle icon 🙂
can someone share this script ?

Fill object giving a hard time

Hey guys,
I have been trying to fill a human model with liquid. I just need one frame of mesh for my project but the problem is tat

1) wen i use fill object it doesn’t fill the whole model, it fills it in parts, no matter wat i do with the resolution(500) or number of particles(8000000) it stays tat way. I even tried decreasing the scale but then it doesn’t fill the object at all.

2)another thing i tried was to fill the object in Maya & then import it in Realflow & then create a mesh but then wat happens is it takes hell lot of a time to create the mesh & the created mesh in no way happens to fill the human body it bcums much larger than the model. which still can be handled to an extent if i get to create the mesh tat stays inside the model.

Please any kind of help wud be appreciated. I am trying to get the effect of the torch man from the fantastic 4. Suggestions welcomed.

Thanks.
Ashita

first compositing/vfx Reel

hi there,

here is my first vfx/compositing reel…


aftermathStreet from vishal.cgx on Vimeo.

or
http://vimeo.com/10676885

maya was used to create low poly models which were then used in projection in fusion.
all the particles and comp work was done in fusion…
softwares used : photoshop, autodesk maya, fusion, after effect…

constructive critics are welcome…

hope u like it…

Please help me with MAYA camera setting

Hi everyone

I have an issue here about Camera lens ,I have jvc HD handy cam with 58mm 1/4-inch Image Sensor and mount 0.43x fish eye to my camera my Question is how can I match a Focal length to maya camera ? I only knew that maya camera is use base on films size but I don’t know how to convert these handy cam lens to perfectly match maya camera.It would be grate if you show the way to calculate it.

Thank you

Benjamin

Dreamworks/Rhythm n Hues/Pixar

Hey I have just completed my course n i plan to start my demo reel ….though i have few of my modeling/texturing n lighting work in Maya which i have done during my course but i dont know what should a starter’s demo reel look like ……or what is the level of work expected at big n small firms.

I have been to several sites n looked up for these questions but the links that were given as a response to questions did not work for me …..So im really confused …..

Please help…..

What To Include In My VFX DemoReel

:)Hey I just completed my course and I Preparing to make a demoreel and am confused what I should Include and how to approach.

Software I know: Photoshop,Maya,3dsmax,Realflow,Fusion,PFTrack and plugins for maya like BlastCode.

I am Pretty good at producing realistic renders and strong eye for compositing huge number of render layers and also an intermediate at fluid simulations in realflow and tracking in PF Track…

What sort of VFX demoreels will land us a job.

:freezing:Please Help!!!:freezing: