Page 1 of 1

Rendering with particles

Posted: Tue May 07, 2013 10:27 pm
by abecrow
Hello,

I have a little problem with blender and Indigo. Let me explain my scene:

On an empty scene (just a camera and a light), I created an object of type "plane" to simulate the ground. I applies a brown material such as "diffuse" and I add another material green.

Keeping the selected object, I add a particle system with "Hair" type, I made ​​my adjustment to have a proper grass in Blender.

My problem is when rendering in Indigo, I see the ground, but not the grass, then with rendering blender everything is perfect.

Is there a way that the grass is rendered in Indigo ? If so, how ?

Thanks,

Rendering with particles

Posted: Tue May 07, 2013 10:43 pm
by Headroom
Yes. Don't use hair ;-)

Use a simple grass object modeled in blender and then use the particle system to instance it. StompinTom posted this little tutorial ages ago and I am not even sure if it still opens up in Blender that does exactly that.

http://www.indigorenderer.com/forum/vie ... =19&t=8846

The hair system in Blender is specifically tied to the strand renderer in Blender and I don't think, it can be used with any external render engine, be it Indigo, Luxrender, Yafaray etc.

Once you've successfully create the first grass you can use with maps to distribute it unevenly etc. works pretty cool actually.

Re: Rendering with particles

Posted: Wed May 08, 2013 12:08 am
by aleksandera
It would be nice to have something like this in Blender exporter :oops:
http://xaotherion.deviantart.com/art/Lu ... -178646164

Re: Rendering with particles

Posted: Wed May 08, 2013 12:34 am
by abecrow
Headroom wrote:Yes. Don't use hair ;-)

Use a simple grass object modeled in blender and then use the particle system to instance it. StompinTom posted this little tutorial ages ago and I am not even sure if it still opens up in Blender that does exactly that.

http://www.indigorenderer.com/forum/vie ... =19&t=8846

The hair system in Blender is specifically tied to the strand renderer in Blender and I don't think, it can be used with any external render engine, be it Indigo, Luxrender, Yafaray etc.

Once you've successfully create the first grass you can use with maps to distribute it unevenly etc. works pretty cool actually.

It work thank you !

Re: Rendering with particles

Posted: Wed May 08, 2013 12:35 am
by Zom-B
aleksandera wrote:It would be nice to have something like this in Blender exporter :oops:
http://xaotherion.deviantart.com/art/Lu ... -178646164
Seems that this was simply converted to polygons on export (therefor the long export time and RAM need!).

Re: Rendering with particles

Posted: Wed May 08, 2013 1:53 am
by StompinTom
You get more control and variety if you instance the grass yourself instead of using a converted hair system. Grass doesn't look like hair, and there are many other little plants mixed in with the blades of grass in any typical lawn. With instancing you can use size and density maps as well, something which is incredibly useful.

Good to see my little tutorial still works.

Re: Rendering with particles

Posted: Wed May 08, 2013 2:44 am
by CTZn
StompinTom wrote:With instancing you can use size and density maps as well, something which is incredibly useful.
How is this implemented into the exproter ? Using indigoScatter or particles coordinates ?

Re: Rendering with particles

Posted: Wed May 08, 2013 6:17 am
by Polinalkrimizei
Blender spreads the grass meshes around the surface as you wish, e.g. controlled by a density map. Blendigo exports the meshes as instances afaik, and most of the time three or four light meshes are enough.

Re: Rendering with particles

Posted: Wed May 08, 2013 7:13 am
by CTZn
Thanks polinalkrimizei.

Re: Rendering with particles

Posted: Wed May 08, 2013 12:35 pm
by StompinTom
Polinalkrimizei wrote:Blender spreads the grass meshes around the surface as you wish, e.g. controlled by a density map. Blendigo exports the meshes as instances afaik, and most of the time three or four light meshes are enough.
Yes, that's correct. It requires you to switch to Blender Internal to reveal the texture settings, though, something that the Blendigo devs may want to look into freeing up. Activating Indigo hides a lot of the texture functionality that Blender otherwise has.

Re: Rendering with particles

Posted: Thu May 09, 2013 10:42 am
by CTZn
StompinTom wrote:
Polinalkrimizei wrote:Blender spreads the grass meshes around the surface as you wish, e.g. controlled by a density map. Blendigo exports the meshes as instances afaik, and most of the time three or four light meshes are enough.
Yes, that's correct. It requires you to switch to Blender Internal to reveal the texture settings, though, something that the Blendigo devs may want to look into freeing up. Activating Indigo hides a lot of the texture functionality that Blender otherwise has.
In the case of random scattering over a surface, the particle system could be translated to an indigo_scatter node, density(/size iirc) texture/shader included.

The density/particle count would be preserved but the particle placements would be different. Exports blind fast.

edit: I checked and the instance size does not seem applicable using polygonal meshes but parametric surfaces.
edit2: actually the node name is scatter.
edit3: my XML reference, there's no further data required to scatter 1000 objects over a surface (using a shader):

Code: Select all

  <scatter>
    <name>the scatter</name>
    <geometry_uid>1000</geometry_uid>
    <material_uid>3000</material_uid>
    <num>1000</num>
    <shader>
           <![CDATA[   
def evalScale(int index) real :
  0.1 # 0.1 * (0.5 + gridNoise(real(index)))	]]>
    </shader>
    <target_object_uid>2000</target_object_uid>
  </scatter>

Re: Rendering with particles

Posted: Fri May 10, 2013 1:07 am
by StompinTom
CTZn wrote:
StompinTom wrote:
Polinalkrimizei wrote:Blender spreads the grass meshes around the surface as you wish, e.g. controlled by a density map. Blendigo exports the meshes as instances afaik, and most of the time three or four light meshes are enough.
Yes, that's correct. It requires you to switch to Blender Internal to reveal the texture settings, though, something that the Blendigo devs may want to look into freeing up. Activating Indigo hides a lot of the texture functionality that Blender otherwise has.
In the case of random scattering over a surface, the particle system could be translated to an indigo_scatter node, density(/size iirc) texture/shader included.

The density/particle count would be preserved but the particle placements would be different. Exports blind fast.

edit: I checked and the instance size does not seem applicable using polygonal meshes but parametric surfaces.
edit2: actually the node name is scatter.
edit3: my XML reference, there's no further data required to scatter 1000 objects over a surface (using a shader):

Code: Select all

  <scatter>
    <name>the scatter</name>
    <geometry_uid>1000</geometry_uid>
    <material_uid>3000</material_uid>
    <num>1000</num>
    <shader>
           <![CDATA[   
def evalScale(int index) real :
  0.1 # 0.1 * (0.5 + gridNoise(real(index)))	]]>
    </shader>
    <target_object_uid>2000</target_object_uid>
  </scatter>
This would be something that would be extremely useful with PyNodes within Blender! If we could have some Indigo material nodes with things like scatter, ISL textures, etc., it could really simplify / speedup things like particle export / distribution.

Re: Rendering with particles

Posted: Mon May 13, 2013 6:35 pm
by SaphireS
StompinTom wrote:
CTZn wrote:.../quote]

This would be something that would be extremely useful with PyNodes within Blender! If we could have some Indigo material nodes with things like scatter, ISL textures, etc., it could really simplify / speedup things like particle export / distribution.
+1 for PyNode support (Blender 2.67 incl. PyNodes is officially released since a few days) ;)