Page 1 of 2

Getting Cinema object "Display Color" through to Octane

Posted: Tue Jun 30, 2015 1:25 pm
by NickBD
Hi folks,

I'm brand new to Octane, so I'm sorry if this is a daft question, but is there any way I can get an object's display color (an object that is not a clone) to render in Octane?

I've tried a few things to no avail, and from what little I've read support for the Mograph color shader is early doors, but perhaps there's something I've missed.

Cheers,

Re: Getting Cinema object "Display Color" through to Octane

Posted: Tue Jun 30, 2015 1:33 pm
by Yambo
If i got you right - Octane is working with Octane materials only.
You can connect via xpresso the Display Color of the object to the relevant material diffuse channel if it helps.
But why you do want to render the Display color and not using Octane materials?

Re: Getting Cinema object "Display Color" through to Octane

Posted: Tue Jun 30, 2015 5:16 pm
by NickBD
Thanks for the reply.

Me? I've a large number of objects. I'd like them to be controlled by a single material, albeit with their diffuse color set on a per object basis.

Might there a way to achieve this in Octane?

Cheers,

Re: Getting Cinema object "Display Color" through to Octane

Posted: Tue Jun 30, 2015 5:26 pm
by aoktar
NickBD wrote:Thanks for the reply.

Me? I've a large number of objects. I'd like them to be controlled by a single material, albeit with their diffuse color set on a per object basis.

Might there a way to achieve this in Octane?

Cheers,
Controllable? It's controllable by mograph shader. Please see tutorial about mograph colors.

Re: Getting Cinema object "Display Color" through to Octane

Posted: Tue Jun 30, 2015 8:28 pm
by NickBD
This one?

https://vimeo.com/126058811

It's great, but it's not exactly what I'm after.

For one thing, I'm not working with clones and effectors. What I've got are a couple of hundred pieces of geometry created from a Python generator.

Using the native Cinema renderer and material, placing a Mograph color shader in a material channel causes the channel to sample whatever color exists in an object's basic -> display color parameter (ID_BASEOBJECT_COLOR).

It's a bit of a cheap trick, possibly, but it's an easy way to adjust the color of any object created by the Python generator.

It's this that I'm having trouble replicating with Octane.

I think I know the answer here, but might there be something I've missed?

Cheers,

Re: Getting Cinema object "Display Color" through to Octane

Posted: Tue Jun 30, 2015 8:45 pm
by aoktar
It's using index of cloner, fracture, moinstance, etc.. and drive mograph colors. So single objects will not have any index without putting under a cloner or fracture. Does it do a trick for you?

Re: Getting Cinema object "Display Color" through to Octane

Posted: Wed Jul 01, 2015 2:48 pm
by NickBD
Still no luck. No worries though, and thanks for the responses.

The following is primarily out of interest, but it'll hopefully clarify what I've been fiddling with...

Given the right context, the Mograph shader returns an object's display color (example 1), which doesn't appear to be translated by Octane... Yet. This seems to differ significantly from the Mograph shader's use as a method of transferring Mograph effector values to material channels, but I've almost no understanding of Cinema internals (I've been a user for all of a month) so I haven't got it entirely straight what's going where.

See example 2 for a simple Python generator that quickly colors the generated objects (both in the viewport, and in the native renderer). Now, I'm absolutely aware that this example would possible to replicate with a bit of Mograph. However, there are instances where the generation of objects with Python wouldn't be exactly replicable with Mograph, and it's this that I'm after.

I'm still not entirely convinced that there isn't a method that's beyond me, but I'm not massively confident in anything that I've pursued so far.

Cheers,

Re: Getting Cinema object "Display Color" through to Octane

Posted: Wed Jul 01, 2015 2:59 pm
by aoktar
Here is a working example with mocolors. I don't think your method will work.

Re: Getting Cinema object "Display Color" through to Octane

Posted: Fri Jul 03, 2015 2:52 pm
by NickBD
It's still not quite right; though I do see where you're coming from. Your example isn't so much "color per object" as it is "color per x translation".

However, your use of texture projections gave me a solution, so thanks again for your input.

The solution is essentially a lookup table generated by the number of objects to affect. This table is written to a bitmap, which can then be used in a material channel. It's quite limited, not least of all in its scrunching up of an object's UVs, but for me and what amounts to simple objects sporting uniform colors, it appears to work pretty well.

I've written it primarily so that I can color objects procedurally; though as a light-hearted exercise, download the ZIP, paint the enclosed EXR in Photoshop (remember it's one object per pixel), and see the resulting effect on the color of the objects in Cinema.

Here's an example in which all objects are colored with random greyscale values, apart from three that have been targeted specifically. Again, only one material exists in the scene.
lookup.jpg
Possibly of help to someone (... though probably not :))

Cheers,

Re: Getting Cinema object "Display Color" through to Octane

Posted: Fri Jul 03, 2015 3:05 pm
by aoktar
Colors are affected by mograph shader effector. You can change as you wish. I understand what are you trying, but Octane has not any option to drive textures by Object index. My implementations is a hacked method to provide this by secondary uvw set. So at the moment that's only possibility. We will see that what comes with 3.0.