Page 8 of 15

Re: Blender instances "patch" for the unofficial exporter

Posted: Fri Aug 03, 2012 12:44 pm
by matej
Hair strands are made out of segments, which are straight lines. A hair strand as a whole cannot be represented as an instance, because when you comb & grow them they take arbitrary shapes. But their segments could be represented as instances, the script would take segment coordinates and reconstruct each hair form its segments (which would be represented by a simple geometric primitive - like a triangle tube).

* coding this would require a lot of work and time
* all that huge amount of simple instances - several per actual hair strand (remember strands have lots of children too) would most likely have a huge impact on render speed, make it's usefulness dubious.
* considering this I don't think it's worth the effort

The easiest solution for us, is Octane to be able to render strands. :) (which, IIRC, its not possible to represent in a physically correct yada yada way...)

Re: Blender instances "patch" for the unofficial exporter

Posted: Fri Aug 03, 2012 3:07 pm
by ROUBAL
Thanks matej, it confirms my thought and fears !

Re: Blender instances "patch" for the unofficial exporter

Posted: Fri Aug 03, 2012 5:51 pm
by vinz
Thanks for this clear answer, i was asking myself the same question.
So fur and hair in octane is not for tomorrow :evil:
:)

Re: Blender instances "patch" for the unofficial exporter

Posted: Sat Aug 04, 2012 8:35 am
by radiant
Any reason why this is happening?

Re: Blender instances "patch" for the unofficial exporter

Posted: Sat Aug 04, 2012 8:56 am
by steveps3
radiant wrote:Any reason why this is happening?
I had something very similar happen yesterday. I assume it is because the objects are not working off of the same origin. I was just going out when I spotted it so I didn't have time to investigate fully.

Re: Blender instances "patch" for the unofficial exporter

Posted: Sat Aug 04, 2012 9:05 am
by matej
I suppose the world origin is at the emitter center? Your cone dupli object does not appear at world origin in Octane (but translated like in Blender). Either: you did not use the latest version of the script or you didnt have enabled "write dupli objects to file", when you exported the transforms. This latter is required if you translate the dupli object away from world origin, because it corrects this translation back (if you manually export the dupli object, then you must correct it yourself)

Your rotations are also off, please read the guidelines & limitations on the first page.

Re: Blender instances "patch" for the unofficial exporter

Posted: Sat Aug 04, 2012 6:15 pm
by matej
A few more thoughts about Blender strands & Octane instances.

The idea I talked about in my previous post on this subject (instantiated strand segments), would not be that great also because you usually want your hair to have a wider root and a thin tip. But you can do only affine transforms with Octane instances, so you cant "taper" an object. This is best explained with a picture:
strands-problem.jpg
A better solution for exporting strands would be to create the whole strand as geometry and then instantiate its children. If you have 1000 hairs with 100 children each, you would still save a lot of memory. Unfortunately there are two major problems that prevent this:

1.) Blender python API doesn't seem to expose the data needed for this (individual child transform). In the field of particles some things are still unfinished, it seems.

2.) Octane would need to have support for "scatter mesh groups". With the current implementation in the above example of 1000 parent hair strands, you would need 1000 scatter nodes to represent the whole system in Octane (which is clearly insane to do). If Octane would allow to export all the 1000 parent strands into one single mesh file, where each strand would get an ID, and then export the children transforms for all the parents into a single .csv file (again, assigning the ID to create a relation between the two), then it would be possible to match which child transforms apply to which mesh part in the mesh file and do the whole system with one scatter node.

tldr: currently its not possible to satisfactory instantiate hair strands.

Re: Blender instances "patch" for the unofficial exporter

Posted: Sat Aug 04, 2012 8:47 pm
by face
I think the last transformation you can“t do with matrixes...

face

Re: Blender instances "patch" for the unofficial exporter

Posted: Sat Aug 04, 2012 8:57 pm
by pixelrush
Is it absolutely necessary to be accurate with the geometry for something as fine as hairs I wonder? How about a curved line of overlapping micro spheres with progressive scaling or something? Dunno just an idea ;)
As long as it appears continuous and has a suitable material what's a few billion spheres between artists and the audience... :roll: Instances are relatively cheap after all.

Re: Blender instances "patch" for the unofficial exporter

Posted: Sun Aug 05, 2012 6:06 am
by matej
pixelrush wrote:Is it absolutely necessary to be accurate with the geometry for something as fine as hairs I wonder? How about a curved line of overlapping micro spheres with progressive scaling or something? Dunno just an idea ;)
As long as it appears continuous and has a suitable material what's a few billion spheres between artists and the audience... :roll: Instances are relatively cheap after all.
It's not necessary to be exact, but with the spheres approach you would still need a good approximation, to not leave gaps that would lead to strange look. Considering that a filed of grass objects already noticeably kills render speed, we probably cant afford such approximations. Consider a female with long hair; one single strand could be easily composed of 1000 spheres == 1000 transforms, multiply that with 30.000 strands with 100 children each and we get trillions of instances. I don't think it's doable this way. Though, there are still things to be tested; like what has greater impact on render speed: a small number of instances with complex geometry or lots of instances with simple geometry.

But short fur / hair can already be satisfactory represented with objects.