Page 1 of 2
Blender and instanced object
Posted: Wed Jul 18, 2012 10:29 am
by vipvip
Do you gather is it ( or will be ) possible to use instanced objs with blender instanced particle system and the new octane standalone version ( version 1 beta 3.0 ) ?
Thanks for reply
Re: Blender and instanced object
Posted: Wed Jul 18, 2012 9:34 pm
by face
I think it isn´t possible because you can´t submit 1mio. matrixes via a command line...
It can be possible via a text file per master object, in which the matrixes are.
face
Re: Blender and instanced object
Posted: Thu Jul 19, 2012 4:47 am
by vipvip
ok
thanks a lot for your answer
so it will be limited for a free creation-process...
Re: Blender and instanced object
Posted: Thu Jul 19, 2012 6:32 am
by steveps3
Luckily the blender exporter doesn't use the command line. It uses the .ocs file. The .OCS is idea for passing across transformation matrices.
As the sample file proves
<Node>
<name>Scatter</name>
<typename>scatter</typename>
<id>21</id>
<position>0.634 0.515</position>
<parameters>
<transforms>1.546 0 -1.501 223.571 0 2.155 0 0 1.501 0 1.546 48.762 1.87 0 -0.
## edited list ##
</transforms>
</parameters>
<inputnodepins>
<NodePin>
<typename>geometry</typename>
<id>0</id>
<pintype>20011</pintype>
<hasinternalnodegraph>false</hasinternalnodegraph>
</NodePin>
</inputnodepins>
</Node>
Re: Blender and instanced object
Posted: Mon Jul 23, 2012 7:27 pm
by yoyoz
The main problem here is that instances are a modifier like others, and some transformations may apply to the geometry after it has been instancied. As they can be much more complex than what Octane supports, there's no real way to properly transfer them to Octane.
As it is a modifier, it also means that it is applied before the exporter has access to the geometry (you use all or none of the modifiers, not only some of them). Some wrkarounds can be alaborated, but at the end we fall into first problem.
Last but not the least, RS/Otoy don't want plugin developers playing with ocs files, seriously restricting our freedom to implement such stuff.
Re: Blender and instanced object
Posted: Tue Jul 24, 2012 12:08 pm
by ROUBAL
In Blender, all instances don't use modifiers. In fact, only particles instances use a modifier.
Duplicating objects by using Alt-D instead of Shift-D create instances (shared mesh) not involving a modifier.
This kind of instances is very useful and necessary for repeated props incity scenes for example (street lights, balconies, windows, car wheels, detailed trees...). Exporting this kind of instances in Octane would solve most of the problems encountered with big scenes and would be very appreciated.
Particle instances are useful for grass, carpets, fur and large forest, but can be also done the same way by making real the particle system and converting the objects into shared meshes like done with Alt-D as well.
So, there is no more modifier at exporting time !
Re: Blender and instanced object
Posted: Tue Jul 24, 2012 12:28 pm
by steveps3
yoyoz wrote:Last but not the least, RS/Otoy don't want plugin developers playing with ocs files, seriously restricting our freedom to implement such stuff.
How does Maya do it then? Presumably because it is an official plugin then it can do it.
I am working on something that will export a particle system as a bunch of transformation matrices. It would be a darn site faster if I knew anything about the blender API. As I don't then it isn't. I have proven to myself that it will work I just need to get everything together in script form.
For example does anyone know how I tell whether the current object has a particle system attached. I've just wasted a lunch break trying to find the answer to that one.
Re: Blender and instanced object
Posted: Tue Jul 24, 2012 8:33 pm
by yoyoz
You're right, I forgot about linked geometry, but unfortunately it doesn't make things easier...
- it would need some major change in the exporter to identify objects sharing geometry (which could be a mesh but not always)
- instanciated objects can have different modifiers applying to them, making final geometry different from each other
- still no way to send instance information through obj files
Re: Blender and instanced object
Posted: Tue Jul 24, 2012 9:06 pm
by enricocerica
Not easy indeed to handle instances with Blender.
As Yoyoz pointed it I think we should avoid using modifiers as they just can't be transported to Octane.
I made several tests and the only thing I could do for now is exporting particle instances matrix coordinates in an external file to be pasted in the scatter node, work pretty well but it really requires some work to fit a complete scene with trees, bushes and whatever requires instances.
By the way here is a quick test :
The workflow :
I export my scene and during the export process the instances matrix coordinates are stored in separate files with the instanciated object as name.
I load the scene into Octane
Add the meshes to be instanciated in separate nodes (they should be exported individually)
Create the scatter node linked to each object
I copy the content of the file containing the matrix and past it in the scatter node for each instanciated object
Create a Geometry group node to mix the main scene and the instances
That's it ...
Re: Blender and instanced object
Posted: Tue Jul 24, 2012 9:43 pm
by n1k
I recently switched from 3ds max to blender. Would be very happy to se blender instances rendering in octane:)
Cheers,
n1k