23 de diciembre de 2009

Feliz Navidad y prospero año nuevo // Happy Christmas and prosperous new year



He estado muy ocupado y espero poder publicar en breve, mientras tanto Feliz Navidad y prospero año nuevo a todos!
Un pequeño comentario acerca de mis archivos, son compatibles con max 2010, es la que utilizo regularmente para trabajar.

I've been really busy and i hope i can publish in short time, meanwhile Happy Christmas and prosperous new year to all!
A little comment about my max files, they are compatible with max 2010,  is the one that i use regularly for work.

Juan Gea.

8 de diciembre de 2009

Sneak Peak and How to install Mental Ray shaders

I'm not having time this days so I'll post a video with a sneak peak of what is coming in the next months.
Estos días no estoy teniendo mucho tiempo, así que voy a postear un video con un adelanto de lo que vendrá en los siguientes meses.

Of course if you are waiting the second part of our latest hair tutorial, it will be posted in the first part of the next week.
Por supuesto si estáis esperando la segunda parte de nuestro ultimo tutorial de pelo, la posteare en la primera mitad de la semana que viene.

But today I'll post a little article.
Pero hoy posteare un pequeño articulo.

First of all, here you have the sneak peak video, I hope you enjoy this.
Antes de nada, aquí tenéis el video del adelanto, espero que os guste.



Let's go through the article.
Vamos con el articulo.

Chico commented me in the latest post that he doesn't know how to install the p_HairTK shader, so he doesn't know how to install any mental ray shaders, I'm going to do a little guide because from time to time I'll be using additional mental ray shaders, and personally I think this is one of the best features that has Mental Ray over V-Ray or Final Render.
Chico me comento en el ultimo post que no sabe como instalar el shader p_HairTK, así que no sabe como instalar ningún shader de mental ray, voy a escribir una pequeña guiá por que de poco en poco utilizare shaders adicionales de mental ray, personalmente pienso que esta es una de las grandes características que tiene Mental Ray sobre V-Ray o Final Render.

So let's explain what are the components of a shader, I'll do the example with Puppet Shaders (Pavel Ledin)
Así que vamos a explicar cuales son los componentes de un shader, haré el ejemplo con los shaders de Puppet (Pavel Ledin)

You should have two files, a dll and a MI file, in our case we have these:
Deberías tener dos archivos, una dll y un archivo MI, en nuestro caso tenemos estos:

shaders_p.dll
shaders_p.mi

In my case the dll is a 64bit dll, but if you are working with a 32bit version of max/mental ray you'll need the 32 version.
This is not a Max specific file, it can be a shader for Maya, XSI or Mental Ray Stand Alone, probably it will work(it depends on Mental Ray version), but you need the other file to do the shader useful inside Max.
En mi caso la dll es de 64bit, pero si estas trabajando con una versión de max/mental ray de 32bit necesitaras la versión de 32bit.
Este no es un archivo especifico de Max, puede ser un shader de Maya, XSI o Mental Ray Stand Alone, probablemente funcionara(depende de la versión de Menta Ray), pero necesitas el otro archivo para hacer que el shader sea utilizable en Max.


The MI file is the translator, let's name it this way, so Max can show the settings available inside this shaders/group of shaders in a human understandable way.
El archivo MI es el traductor, llamemoslo de esta manera, con el Max puede mostrar las opciones disponibles del shader/grupo de shaders de una manera humanamente comprensible.

There are two way for installing shaders in 3dsmax.
Hay dos maneras de instalar los shaders en 3dsmax.

The first and easiest way is what follows:
La primera y mas sencilla es la siguiente:

Copy the dll file inside this folder:
Copia el archivo dll en este directorio:

“\mentalray\shaders_autoload\shaders”

This folder is located inside the 3dsmax root folder.
Este directorio esta ubicado dentro de la raíz de 3dsmax.

Now copy the MI file to this folder:
Ahora copia el archivo MI a este directorio:

“\mentalray\shaders_autoload\include”.

Now our shader will be loaded with max.
Ahora nuestro shader se cargara con max.

If you don't want max to load the shader you'll need to remove the files from the folders.
Si no quisieras que max cargara el shader tendrás que borrar los archivos de los directorios.


The second way is to load the files manually, so if we need to disable the shaders we can do that be commenting two lines from a file, no need to delete the shader files.
La segunda manera es cargar los archivos manualmente, si necesitamos desactivar los shaders lo podemos hacer comentando dos lineas de un archivo, no tenemos que borrar los archivos del shader.

Copy the dll to this folder:
Copia la dll a este directorio:

 “\mentalray\shaders_3rdparty\shaders”

Now copy the MI file to this folder :
Ahora copia el archivo MI a este directorio:

”\mentalray\shaders_3rdparty\include”

Of course this folders are located in the root of 3dsMax.
Por supuesto estos directorio están en la raíz de 3dsMax.

Now edit with the notepad the file 3rdparty.mi that is located inside this folder:
Ahora edita, con el notepad, el archivo  3rdparty.mi que esta ubicado dentro de este directorio:

”\mentalray\shaders_3rdparty”


You will see what follows:
Veras lo siguiente:


registry "{_AUTODESK_REG_3DSMAX_LOAD_3RDPARTY_SHADERS}"

    # Add "link" and "mi" statements here, to load your shaders.

    # Example:
    # link "base.dll"
    # mi "base.mi"
   
end registry

The lines with the character “#” at the beginning are commented lines that explains you how to define the shaders.
Las lineas con el símbolo “#” al principio son lineas comentadas que te explican como definir los shaders.

Your file must end being like that:
Tu archivo debe terminar como este:

registry "{_AUTODESK_REG_3DSMAX_LOAD_3RDPARTY_SHADERS}"

    # Add "link" and "mi" statements here, to load your shaders.

    # Example:
    # link "base.dll"
    # mi "base.mi"
   
    link "shaders_p.dll"
    mi "shaders_p.mi"

end registry

Now 3dsmax will load the shader, if you don't want the shader to be loaded just comment that lines with the character “#” at the beginning of the line.
Ahora 3dsmax cargara el shader, si no quieres que lo cargue simplemente comenta las dos lineas poniendo delante el símbolo “#”.

Next week we'll see how to use the max cloth simulator with our geometry based hair.
La próxima semana veremos como utilizar el simulador de telas de max con nuestro pelo basado en geometría.

Hope this helps you.
Espero que esto os ayude.

Thanks for reading and commenting.
Gracias por leer y comentar.


Juan Gea.

26 de noviembre de 2009

Hair tufts and hair clumps, easy road named "Styling Hair" - Part 1

This week we are going to talk one more time about hair...but this time we are going to study some techniques that will let us to design hair for our characters in a simple and really really under control way.
Esta semana vamos a hablar una vez más sobre pelo... pero esta vez vamos a analizar algunas técnicas que nos permitirán diseñar el pelo de nuestros personajes de una manera sencilla y controlable.

Usually, when I look for tutorials over the internet I found some that tells you to comb the hair using splines to achieve the shape you want, but they don't go too far, it is a bit difficult to me.
Normalmente, cuando busco tutoriales en Internet suelen enseñarte que tienes que peinar el pelo mediante splines para conseguir la forma que quieres, pero no van más allá, me resulta un poco difícil.

So I looked for some technique that give me all the control over the design of the hair but with the thing I can control most...geometry, and that is what we are going to view...how to create hair styles that are geometry based.
Así que busque alguna técnica que me diese todo el control sobre el diseño del pelo pero con lo que yo realmente controlo...geometría, y esto es lo que vamos a ver, como crear diseños de pelo que están basados en geometría.

As always you have a video where you can see the result/example and the scene with the process.
Como siempre tenéis un video donde podéis ver el resultado/ejemplo y la escena con el proceso.

Here you have the video and the scene link.
Aquí tenéis el video y el enlace a la escena.

http://www.bone-studio.com/blog/26_11_09/clumpspart1.rar




So...let's start.
Bien...empecemos.

We are going to divide our progress in phases, and there is the...
Vamos a dividir nuestro progreso en fases, y aquí esta la...

Phase 1:

In this phase we are going to define the geometry that will give the form of our hair, you can see that we have to different geometries, with the first one (left) we are going to take a general geometry form and get from it various tufts of hair, and the second one (right) will be and stand alone tuft.
The difference between working with only one geometry for multiple tufts or one geometry per tuft is that you will get different physic reaction with your hair using the internal physics simulator or cloth hair simulation, also you can get more control over the shape your tufts gets if you use alone geometry for every tuft because they will get the shape of your geometry, that's why I used two different geometries...to illustrate that.

To achieve this geometry I've used the Topology tool of the Graphite Freeform Tools, so you can draw the form that you want, even if you use your head as “grid” you can draw exactly the shape that you want for your hair.

Make sure that under the object properties you uncheck the “Rendeable” option, you need to do this so the hair is rendered but the base geometry is ignored.



Fase 1:

En esta fase vamos a definir la geometría que dará la forma a nuestro pelo. Podéis ver que tenemos dos geometrías diferentes, con la primera (izquierda) vamos a utilizar una geometría genérica y vamos a sacar varios mechones de pelo, con la segunda (derecha) sera un mechón independiente.
La diferencia entre trabajar con una sola geometría para múltiples mechones o una geometría por mechón, es que conseguirás distintas reacciones físicas con el pelo cuando uses el simulador interno o cuando uses simulación de telas para pelo, ademas conseguirás un mayor control sobre la forma que tienen los mechones de pelo si utilizas una geometría independiente para cada mechón, porque cogerán la forma de tu geometría, por eso he utilizado dos geometrías distintas, para ilustrar esto.

Para conseguir esta geometría he utilizado la herramienta “Topology” de las herramientas freeform del set de herramientas “Graphite”, de esta manera puedes dibujar fácilmente la forma que tu quieras, incluso si utilizas tu cabeza como “grid”, puedes dibujar exactamente la forma que quieres para tu pelo.

Asegurate que en las propiedades del objeto desactivas la opción “Rendeable”, necesitas hacer esto para que el pelo sea renderizado y que la geometría de base sea ignorada.




Phase 2:

Now we have our base geometry...but we have it plain and we we'll need volume for our hair, not a lot, only a bit so it is a bit dense.
To do that I use the “Shell” modifier, also I don't want the bottom polygons of the shape because I'll extract the comb splines from the edges of the model, so I don't want the edges looped, I need to break it at the end of my hair, so I remove it,  after that I apply a turbosmooth to get the amount of vertical edges I'll need for my comb splines, subdivide the model as much as you want.
And this is it :)




Fase 2:


Ya tenemos nuestra geometría de base...pero la tenemos completamente plana y vamos a necesitar algo de volumen para nuestro pelo, no mucho, solo un poco para que sea un algo denso.
Para hacer esto utilizo el modificador “Shell”, ademas no quiero los polígonos del final de la geometría porque voy a extraer las splines, que utilizare para peinar, de las aristas del modelo, por tanto no quiero que estén en bucle (“looped”), necesito romperlos al final de mi pelo, así que elimino esas caras. Después aplicamos un “Turbosmooth” para conseguir la cantidad de aristas verticales que voy a necesitar para mis splines de peinado, subdivide el modelo tanto como quieras.
Listo.



Phase 3:

This phase is a one step only phase, you need to apply an Edit Poly over the stack, select the edges that will be your hair guides and extract it as a smoothed spline with the tool “Create Shape” inside the “Edit Edges” rollout.
In the picture you can see the splines as bone colored lines, but, obviously in max, if you don't activate the rendering in viewport/render you'll not see the splines as this.

As an important tip for this phase look at the picture carefully, you must get the edges until the last edge after it starts with the back part of the geometry, if you get more edges the splines will begin to cross, and we don't want it.



Fase 3:


Esta fase es de un paso único, tienes que aplicar un “Edit Poly” en el grupo de modificadores (“stack”), selecciona la aristas que harán de guías para tu pelo y extraelas como “smoothed spline” con la herramienta “Create Shape” dentro del desplegable “Edit Edges”.


Mira detenidamente la imagen relacionada con esta fase, debes coger las aristas hasta la ultima arista antes de que empiece con la parte de atrás de la geometría, si coges mas aristas empezaran a cruzarse, no queremos eso.



Phase 4:

This is another one step phase, but is as important as the prior phase.

We are going to “Make Planar” the faces that we are going to use for the grow of the hair, I do this because this way I can be sure that the direction of the hair is going to be the direction I want.




Fase 4:


Esta es otra fase de un solo paso, pero tan importante como la anterior.


Vamos a convertir en planas (con la herramienta “Make Planar” ) las caras que vamos a utilizar para el nacimiento del pelo, hago esto por que de esta manera me aseguro que la dirección del pelo va a ser la dirección que busco.



Phase 5:

Now we have our geometry base ready to go.
Let's apply the “Hair&Fur Modifier”, inside of it we go to the face subobject level, now we select the faces that we made planar...these faces will be the point of birth for our hair, we need to press “Update Selection” to reset the hair.
Now with the tool “Recomb From Splines” we give our hair the shape of our splines, at this point make sure that you configure the rest of settings of your hair as you want, but leave the multistrand parameter untouched, you can look inside the example file for my settings, but it's up to you.





Fase 5:


Ahora ya tenemos nuestra geometría de base lista para trabajar.


Aplicamos el modificador “Hair&Fur Modifier”.
Dentro de el vamos al subobjeto “faces” (caras), ahora seleccionamos las caras que queremos hacer planas, estas caras serán el punto de nacimiento de nuestro pelo, tenemos que apretar el botón “Update Selection” para reiniciar el pelo.


Ahora con la herramienta “Recomb From Splines” le damos a nuestro pelo la forma de nuestras splines, llegados a este punto asegurate de que configuras el resto de parámetros del pelo como quieras, pero deja el parámetro “Multistrand” sin tocar, puedes mirar en la escena de ejemplo para ver como lo he configurado yo, tu mismo.



Phase 6:

In this phase we are going to play a bit, in the first geometry (Left), with the styling tools.

The important thing here is the tools you use to give the hair a bit of shape, but there are two buttons that are really important.

If you select some guides and press the “Split Selected Hair Groups” you will get a bunch of guides that are independent from the rest, so you will get no interpolation between these guides and the others, here you have your first tuft, remember that you need to use the various styling tools to give shape to the hair, one more thing about the workflow, at first use the move tool to give the curve that you want, help yourself with the tool “Clump” but only a bit at a time, because it can collapse all your hairs, and when you are done use the tool “Puff Roots” to give volume to the hair.
When you are finished you are ready to go.




Fase 6:


En esta fase vamos a jugar un poco, en la primera geometría (Izquierda), con las herramientas de estilismo (“Styling Tools”)


Lo importante aquí son las herramientas que usas para darle al pelo un poco de forma, pero hay dos botones que son realmente importantes.
Si seleccionas algunas guías y aprietas el botón de “Split Selected Hair Groups” tendrás un grupo de guías que son independientes del resto, así que no tendrás interpolación entre esas guías y las otras, aquí tienes tu primer mechón.
Recuerda que necesitas utilizar las distintas herramientas para darle forma al pelo.
Una cosa mas acerca del flujo de trabajo, al principio usa la herramienta “Move” para darle la curva que buscas, ayudate con la herramienta “Clump”, pero poco a poco, porque puede colapsar todo el pelo, y cuando lo tengas como quieres utiliza la herramienta “Puff Roots” para darle mas volumen al pelo.
Cuando hayas terminado ya estarás listo para continuar.



Phase 7:

In this phase we will review the parameters of the hair and now we can configure the “Multistrand” parameters so we get dense hair.
It's better to do this now so you can style/comb the hair viewing the 100% of the hairs with little performance impact.

And now our hair is ready!

It's easy.

We have just one phase more.




Fase 7:


En esta fase repasamos los parámetros del pelo, ahora podemos configurar los parámetros de “Multistrand”, así conseguiremos un pelo mas denso.
Es mejor hacer esto ahora para que puedas peinar y estilizar tu peinado viendo el 100% de los pelos, de esta manera tendrás muy poco impacto en el rendimiento.


Nuestro pelo esta listo!


Solo nos queda una fase mas.



Phase 8:

We are going to setup the internal physics, do that as we did in the feathers tutorial, configure like you want but think that if you use a low value in “Stiffness” you will loose your styling.

Simulate it in “Precomputed” mode and you are ready to render!




Fase 8:


Vamos a preparar las físicas internas, hazlo como hicimos en el tutorial de las plumas,
configúralo como mas te guste pero piensa que si utilizas un valor muy bajo en “Stiffness” perderás el estilo de tu pelo.


Simula en modo “Precomputed” y todo está listo para renderizar!



Ending:

In the next post I'll use this scene too, I'm going to explain how to setup the Cloth simulation to simulate the hair dynamics, you'll get a lot more control over the simulation and it is a lot more stable, at least in my experience.

If you need any clarification, don't hesitate, ask in the comments.

Happy styling to all!

Final:


En el siguiente post utilizaremos esta escena también. Explicare como configurar la simulación de telas para simular dinámicas de pelo, tendrás mucho mas control sobre la simulación y es mucho mas estable, al menos en mi experiencia.


Appendix A:

If you are using the p_HairTK shader (as in my scene) there are some parameters that I encountered problematic with the hair animation, these parameters are “Saturation Variation”, “Color Variation” and “Gain Variation”, make sure you leave this parameters to 0.0, if you don't do that you'll get some flicker on your render.


Apéndice A:


Si estas usando el shader p_HairTK (como en mi escena) hay algunos parámetros que he encontrado problemáticos con la animación del pelo, estos parámetros son “Saturation Variation”, “Color Variation” y “Gain Variation”, asegurate de dejar estos parámetros a 0.0, si no lo haces obtendrás parpadeos/flicker en el render.


Note:
The FurBall Scene is not in the example scene, if you want it just tell me and i'll post the link.


Nota:
La escena de la bola de pelo no esta en la escena de ejemplo, si la quereis, simplemente decidmelo y pondre el enlace.

16 de noviembre de 2009

Turkeys and Chickens...feather simulations with max hair system.

First of all, as always at the end of the post Spanish readers can find the translated version.
Lo primero de todo, como siempre al final del post se encuentra la versión traducida para lectores españoles.

A few days ago there was an entry in the news of “maxunderground.com”  speaking about a feather simulator for XSI, it was curious to me that was necessary to develop a simulator for feathers specifically, it was a curios thing until I began to do some feather in max, a feather simulator can be very useful, specially if the main character of our production is going to be a chicken full of feathers, but we can achieve similar results using the tools that we have within max.

To show you the result I did a video.



Aand here you have the link to download the scene of this video.

What we need to do is not very complicated, as a good friend of me says...let's go through the parts...
 
Before we start you must know that i configured the hair base geometry as non rendeable, so you will see the feathers in the render but not the geometry that contains the feathers.
Also you will need the feather texture, it is based in a reference photo I found in http://www.cgtextures.com, but I modified it to create an alpha channel.

Here you have, click on it to get the full sized PNG.


1.- The first thing that we need to do is to decide how is going to be our feather, we are going to use it as an instance for the hair so we want it as low poly as we can, also we want it to be rigid, so the less polygons thing will help us here.
In the scene you have three feathers, the first and the second are very similar, the only thing that change between them is that one of them is bended and it have the mapping modified to use the transparency, the second is a slim box, you can use a plane, I did not used it because I prefer to work with the double side for myself.












2.- The second step is to assign the feather as an instance element, you need to know that the pivot orientation is important, and also the object orientation in the world, you wont get the same result with the object oriented in one way or another.












3.- Third step, adjust the hair modifier configuration, here I had a few options, I could use interpolations or not, if I had not used interpolation the feathers would have been much more orderly, too much orderly, also if you don't use this option you will get a feather for every normal of every triangle, so the quantity of feathers will be defined with the number of polygons in our base geometry (the “Hair Count” parameter will work more like a limit than the actual number of hairs/feathers).
I don't want the hair(the feathers) too much flexible so I used only one segment, but I'm not sure that this means any difference when we work with geometry instances.
I gave some randomness in the scale to have feathers of different sizes from the start, also after that, when you stylize the feathers, you can modify the scale specifically.
We work with geometry instances, so the most important parameter is “Root Thick”, normally we use it to define the thick of the root of our hair, for the tip we use “Tip Thick” (This is obvious, but I specify it for Spanish readers), but in this case this one has no effect over our feathers.
With “Root Thick” we define the thickness of the geometry instances.
With the rest of the variation parameters we put all at 0, the “Frizz”, the “Kink” and the “Multistrand”.

At last, in the effect configuration I used “mr prim” with a voxel resolution of 3.
In the rollout “mr parameters” in the modifier I put an Arch&Design material, it was the material I had applied to the original geometry.
The hair modifier instances the material automatically but the result using “geometry” or “mr prim” is not the same, also mental ray gave me some errors in some buckets if I didn't use this system.












4.- The fourth step is the stylize our hair, you need to know that the hair physics in max are not very complex, it is to define how rigid must be the hair and what objects are used to collide, also the physics sometimes are very erratic, you need to try to get a logic orientation between the feathers and the character, in the scene case I did not used more feathers near the neck because they get an strange orientation, to fix this we have two solutions, the first of these solutions is to treat the neck feathers with an additional geometry  that can gave me more control over the orientation of the feathers, the second solutions is to work more the style of the hair so you can fix every guide to get the feathers as you want.
I'm not using feathers near the neck to avoid the mess it can be for this post, it is an example.

To stylize the hair what I did with this simple character is to be in a top view and use the tool “Recomb”, with this I comb all the hairs downwards with only a move, later I raise the roots and the tips with the tools “Puff Roots” and “Stand” to avoid intersection between feathers.
Remember that his is a hair simulator so it is not too serious if the hairs are entangled, but we are doing feathers so wee need to avoid it as much as we can, so what we do is to try the best styling and when we do the simulation we will gave the feathers some stiffness to achieve the sensation that the feathers are anchored to the skin, and they move with the wind, but they are not entangled like the hairs.












5.- This is the shortest step at all, you need to do some animation to test the physics results later, so we can see how the feathers are going to react with the movement, also I used a wind to see how are going to react the feathers with it.

6.- The sixth and last step is to configure the simulation, for this we are going to use the world's oldest system, test/error.
Personally, the hair physics simulations is a bit weird to me, normally to simulate long hairs I'm used to use some geometry as a hair base and cloth simulation to calculate it's movement, in this case we cannot do this, so what we have to do is what follows.
In the rollout “Dynamics” activate the option “Live”, now if you hit play in max you will see how the feathers are reacting with the simulation in real time and you can play with the simulation settings and test your own settings.
I modified only the “Stiffness” value, I used 0,78, but you can need a different value, it depends on your scene units, feathers size, etc...
As I said...test/error.
In the end put the dynamics type in “Precomputed” and define a folder for the simulation files, now you can simulate the frames that you need in your animation, this will avoid strange results in render time, also one thing more, I did not use any kind of render time motion blur with this because I found that some feathers get some strange rotation between frames, in the ticks, as I said the hair simulation it's a bit weird.












After the 325 frames of my test, here you have the result, I really like the way the feathers react with the wind, in the end of the video.



I hope you like this post.

Thanks for reading and commenting.

Cheers!

Juan Gea.

--------------VERSION EN ESPAÑOL-------------SPANISH VERSION--------------

Pollos y pollastres...plumas en max con simulación de pelo.


Hace poco salio una noticia en “maxunderground.com” hablando de un simulador de plumas para XSI, me resulto curioso que fuera necesario desarrollar un simulador específicamente de plumas, me resulto curioso hasta que me puse a crear plumas en max, realmente un simulador de plumas puede ser algo muy útil, sobre todo si vamos basar toda una producción en un pollo lleno de plumas, pero podemos llegar a resultados muy parecidos, utilizando las herramientas que tenemos directamente en max.

Para mostraros el resultado he realizado un video de muestra.

Pongo la escena de este video para que la descargueis.



Lo que hay que hacer no es muy complicado, como dice un buen amigo mio, vamos por partes...

Antes de empezar debéis saber que he configurado la geometría base del pelo como no rendeable, así que veréis las plumas en el render pero no la geometría que contiene las plumas.
Tambien necesitareis la textura de la pluma, esta basada en una foto de referencia que encontré en http://www.cgtextures.com, la modifique para añadirle el canal alfa.

Aqui teneis la imagen, haced click en ella para descargar el png a tamaño completo.



1.- Lo primero que tenemos que hacer es decidir como va a ser nuestra pluma, la vamos a utilizar como instancia del pelo, por tanto querremos que tenga pocos polígonos, ademas queremos que sea un tanto rígida, así que lo de los pocos polígonos nos puede ayudar bastante.
En la escena tenéis tres plumas, la primera y la segunda son muy parecidas, lo único que cambia es que una de ellas esta curvada y tiene el mapping corregido para utilizar también la transparencia, la segunda es una caja muy fina, podéis utilizar un plano, yo no lo he usado por que prefiero trabajar yo con la doble cara antes de que lo haga el max por si mismo, soy un poco maniático.













2.- El segundo paso es asignar la pluma como elemento de instancia, tener en cuenta que la orientación del pivote importa, y también importa la orientación del objecto en el mundo, no conseguirás el mismo resultado con el objecto orientado de una manera que de otra.













3.- Tercer paso, ajustar la configuración del pelo, tenia varias opciones, podía utilizar interpolación o no utilizarla, si no hubiese utilizado la interpolación las plumas habrían quedado muchísimo mas ordenadas, demasiado ordenadas, ademas si no utilizas esta opción se coloca una pluma por cada normal de cada triangulo, por lo que la cantidad de plumas dependerá de la cantidad de polígonos que tenga la geometría de base(el parámetro “Hair Count” actuara mas como un límite que como el numero de pelos/plumas).
Como no quería que fuera muy flexible el pelo (las plumas) le puse solamente un segmento, aunque no estoy seguro de que esto signifique alguna diferencia cuando trabajamos con instancias de geometría.
Le di algo de aleatoriedad en la escala para tener plumas de distintos tamaños de partida, ademas de esto posteriormente al peinar las plumas se pueden modificar los tamaños.
Trabajamos con instancias de geometría, así que el parámetro mas importante es “Root Thick”, normalmente lo utilizamos para definir el grosor de la raíz del pelo, para la punta utilizamos “Tip Thick”, pero en este caso este ultimo no tiene ningún efecto.
Con “Root Thick” definimos el grosor de las instancias de la geometría.
En cuanto al resto de parámetros de variaciones los deje todos a 0, tanto el “Frizz”, como el “Kink” y el “Mutistrand”.
Por ultimo, en la configuración del efecto utilice “mr prim” con una resolución de voxel de 3.
Y en desplegable “mr parameters” del modificador le puse un material arch&design que era el que tenia aplicada la geometría original.
Aunque el lo instancia automáticamente el resultado utilizando “geometría” y “mr prim” no es el mismo, ademas de que mental ray daba algunos errores en algunos buckets si no utilizaba este sistema.












4.- El cuarto paso es peinar nuestro pelo, tened en cuenta que las físicas del pelo de max no son demasiado complejas, vienen a decirnos lo rígido o poco rígido que tiene que ser el pelo y con que objetos colisionan, no siempre funcionan bien ademas, así que procurar peinar las plumas de manera que queden con una orientación lógica con respecto al personaje, en el caso del personaje de la escena no le puse mas plumas cerca del cuello por que cogían una orientación extraña, para corregir eso habríamos tenido dos soluciones, la primera de ellas es tratar las plumas mas cercanas al cuellos con una geometría de base distinta, en la que controláramos por separado los polígonos y ademas en la que nos resultase mas sencillo peinar las plumas del cuello, la otra solución habría sido trabajar mas el peinado del cuello peinando y orientando cada una de las guiás que no tuviera la orientación que buscábamos.
Para no liar demasiado este post me decante simplemente por simplificar el ejemplo.

Para peinar el pelo lo que yo he hecho, al tratarse de un personaje sencillo, es colocarme en una vista superior y después utilizar la herramienta “Recomb”, con esto peino todos los pelos hacia abajo de un solo golpe, después con las herramientas de “Puff Roots” y “Stand” levanto tanto las raíces como las puntas del pelo para que las plumas no se atraviesen.
Recordad siempre que esto es un simulador de pelo, por lo que no es demasiado grave que los pelos se “enreden”, pero al estar haciendo plumas eso tenemos que intentar evitarlo, así que lo que hacemos es peinar para que quede lo mejor posible y al simular darle algo de rigidez a las plumas para que de la sensación de que están ancladas a la carne, oscilan y se mueven con el viento pero no se atraviesan ni se lían como los pelos.











5.- Este es el paso mas cortito, simplemente haced una animación para que después podamos comprobar como reaccionan nuestras plumas al movimiento, yo ademas he colocado un viento para así poder ver también como reaccionan las plumas ante el.

6.- El sexto y ultimo paso es configurar la simulación, para esto utilizamos el sistema mas antiguo del mundo, prueba error.
Personalmente la simulación de físicas del pelo me parece bastante mala, normalmente para simular melenas suelo utilizar geometría como base para el pelo y simulación de telas para calcular su movimiento, en este caso no podemos hacer eso, así que se trata de poner, en la pestaña “Dynamics”, la simulación en modo “Live”, darle a play en el max y ver como reaccionan las plumas con la configuración que tenemos ahora.
Al final yo me decante por modificar solo el “Stiffness” y ponerlo a 0.78, pero cada uno de vosotros puede necesitar un valor distinto.
Como ya he dicho...prueba y error.
Por último en lo relativo a la simulación colocad el tipo de dinámicas en “Precomputed”, definid un directorio y simulad los frames que necesitéis para vuestra animación, esto evitara resultados extraños e inesperados en el momento del render, por cierto os desaconsejo encarecidamente la utilización del motion blur en render, a mi me han salido algunas plumas con rotaciones extrañas en los ticks, como ya he dicho la simulación del pelo no es demasiado buena.














Y por fin, después del render de los 325 frames de mi prueba aquí tenéis el resultado, me gusta especialmente como reaccionan las plumas con el viento, al final del video.




Espero que os guste y os sea util.



Gracias por leer y comentar!


Juan Gea.

27 de octubre de 2009

First Post: hair solutions study.

Hi there!

First of all, for spanish readers, you will find a translated version of this entry at the end of the post.
Lo primero de todo, para lectores españoles, encontrareis una version traducida de la entrada al final del post.

This is the first entry in the Bone-Studio Technology Blog.

We will be posting from time to time, sometimes the posts will be posted soon after the last one, sometimes not, basically when we have time and do some resesearch.

Today i did a test over the hair rendering solutions included with max, also i introduced a free mental ray shader for hair, the p_HairTK, so i did a table with time comparisons and images to compare the quality and speed.

You can download the scene here:

http://www.bone-studio.com/blog/27_10_09/scene.zip

This scene has some upped settings like the mr_shadow map sam ples, and samp./Pixel in transparent shadows and some more i think..

The scene explanation is the following:

We have a cylinder with a hair modifier applied, the configuration of the modifier is:

Hair Count: 15000
Segments: 5
Passes: 2
Multistrand: 3
RootSplay: 0.54
Other settings are in the default configuration, the only additional change is when i define the p_HairTK as mr shader, that's all.

Here is the link where you can downloda the p_HairTK, it's a huge shader collection, it's really great!
http://www.puppet.tfdv.com/download/shaders_p_e.shtml

In the effect window i use the buffer when is defined in the table and the mr_prim when is defined too, the mr_prim voxel size is configured at 4.

You must know that with the buffer you can find some problems when wrking with transparency or refraction, also exporting some channels, using a shader like p_HairTK you will be able to get extra channels like the zbuffer or a mask for your hair, also you will not have any problem with transparency or refraction.
Also you must know that with the buffer you will only be able to work with some lights, with the mr_prim you will be able to use every light, also with mr_prim you will be able to use GI or Final Gather, with the buffer you don't.

The aspect of the hair with the p_HairTK is different from the standard shader because i tweaked almost nothing the shader, but you can get the aspect that you want working with the shader.

This is the legend for the table:

SCL: ScanLine Renderer
Mray: Mental Ray Renderer
Buffer: Buffer setting in the hair effect configuration
MR_PrimStd : MR_Primitive setting in the hair effect configuration
MR_PriMStd_pHairTK: MR_Primitive setting in the hair effect configuration with the p_HairTK shader applied in the hair modifier in the object
RT: Raytraced shadows in the light
ShMap: Shadow Map shadows in the light
MR_ShMap_TS: Mental Ray Shadow Map shadows in the light with Transparent Shadows activated (or Detail shadows as is called in Maya i think)
Fast_Rast: Fast Rasterizer activated in the mental ray renderer config, when there is no Fast_Rast i use the standard settings for sampling (1/4 - 4)

Here are the pictures and the table, click on the picture to see at full size:



















One thing about the last picture, the bottom plane have a checker inside the cutout slot in the material, the upper plane have the checker inside the transparency, the middle sphere has a solid glass material.

Of course you can get better antialiasing if you tweak the render and the shader, i did not tweaked this because i want a clean test, but i'm sure you can get better antialiasing and even better times.

Thanks for reading.

Cheers!

Juan Gea.

--------------VERSION EN ESPAÑOL-------------SPANISH VERSION--------------

Buenas!

Este es el primer post del blog tecnologico de Bone-Studio.

Postearemos de tiempo en tiempo, a veces los post seran muy seguidos y otras veces no, basicamente postearemos cuando tengamos tiempo y hagamos algo de investigacion.

Hoy he realizado un test acerca del pelo y las distintas soluciones incluidas con max, tambien he utilizado un shader gratuito de Mental Ray, el p_HairTK, asi que he realizado una tabla con comparaciones de tiempo y subido unas imagenes para compara calidad/velocidad

Podeis descargar la escena aqui:
http://www.bone-studio.com/blog/27_10_09/scene.zip

Esta escena tiene algunos parametros subidos como los samples de los sahdow map de mental ray y alguno mas.

La explicacion de la escena es la siguiente:

Tenemos un cilindro con un modificador de pelo aplicado, la configuracion es la siguiente:

Hair Count: 15000
Segments: 5
Passes: 2
Multistrand: 3
RootSplay: 0.54

Otros parametros estan en su configuracion por defecto, el único cambio adicional es cuando defino el p_HairTK como mr shader.

Aqui esta el link donde podeis descargar el p_HairTK, es una gran coleccion de shaders, es verdaderamente buena!
http://www.puppet.tfdv.com/download/shaders_p_e.shtml

En la ventana de efectos utilizo el buffer cuando esta definido en la tabla y mr_prim cuando esta definido tambien, la configuracion del mr_prim voxel es de 4.

Debeis saber que con el Buffer os podeis encontrar algunos problemas cuando trabajais con transparencia o refraccion, tambien exportando algunos canales, utilizando un shader como p_HairTK sereis capaces de extraer canales extra como el zbuffer o una mascara de vuestro pelo, tampoco tendreis ningun problema con las transparencias y las refracciones.
Tambien debeis saber que con el Buffer no funcionan todas las luces mientras que con los mr_prim si, ademas de que funciona la iluminacion global y el final gather, con el buffer no.

El aspecto del pelo con el p_HairTK es diferente del shader standard por que no lo he tocado practicamente nada, pero trabajando con el shader podeis conseguir un resultado muy parecido.

Esta es la leyenda para la tabla:

SCL: ScanLine Renderer
Mray: Mental Ray Renderer
Buffer: parametro Buffer en la ventana de configuracion del efecto de pelo
MR_PrimStd : parametro MR_Primitive en la ventana de configuracion del efecto de pelo
MR_PriMStd_pHairTK: parametro MR_Primitive setting en la ventana de configuracion del efecto de pelo con el shader p_HairTK aplicado en el modificador del pelo del objeto.
RT: sombras Raytraced en la luz
ShMap: sombras Shadow Map en la luz
MR_ShMap_TS: sombras Mental Ray Shadow Map en la luz con "Transparent Shadows" activado (tambien llamadas "Detail shadows" en maya, creo recordar)
Fast_Rast: Fast Rasterizer activado en la ventana "renderer" de configuracion de mental ray, cuando no hay "Fast_Rast" utilizo la configuracion por defecto para el antialiasing(1/4 - 4)

Mirad arriba para las imagenes y la tabla, haz click en las imagenes para verlas a tamaño completo.

Una cosa acerca de la ultima imagen, el plano de abajo tiene un checker en el slot de cutout, el de arriba lo tiene en el de transparencia, la esfera tiene un material de cristal solido.


Por supuesto se puede conseguir mejor antialiasing configurando el render y el shader, no he tocado nada de esto por que queria un test limpio, pero estoy seguro de que se puede conseguir mejor antialiasing e incluso mejores tiempos.

Gracias por leer esto.

Salud a todos!!!

Juan Gea.

1 de julio de 2009


First test entry in BONE-STUDIO TECH Blog
Primera entradilla de BONE!!


Hi all! This is the first test entry in the Bone-Studio Blog, simply a test, don't be scared, hehehe.
Hola a todos esta es la primera entrada del blog de Bone-Studio, es de prueba, no os asusteis, jejeje.


Did you see what a pretty bathroom? it's a lie! it is 3D. You will be able to se post about this and a lot more in this blog.
Habeis visto que baño más bonito? pues es de mentira, es 3D. Esto y mucha cosas más podreis encontrar en este blog.


Hope you like it.
Espero que os gusten.

Cheers.
Un saludito!