@BrianJ - is any of this on your list of complaints yet?
-Pascal
@BrianJ - is any of this on your list of complaints yet?
-Pascal
Hi @walther,
Reading back through this thread it looks like the main problem is that Octaneâs WCS mapping setting within itâs native materials is not displaying in Rhinoâs Rendered display mode. AND that if you reverse this and use a Rhino native material with WCS mapping, it is not displayed properly in Octaneâs realtime rendered viewport.
I think both issues would need to be addressed in the Octane plugin. I will try and get @andy to reply here to confirm my guess. The only other idea I have is to select multiple objects in Rhino and convert their texture mapping properties at the same time to box mapping. This will save you time if you have been doing this properties change one object at a time. The difference there is that this is then a custom mapping setting per object that Octane appears to support based on your earlier posts here. The ideal solution though is I think for Octaneâs WCS mapping in itâs materials to be converted to Rhino WCS mapping in Rhinoâs rendered display mode.
First of all thank you Brian for taking the time to look into this, it is really appreciated!
you are right, we have two issues, however issue no. 2 (a Rhino WCS material is not rendered correctly in Octane) is not such a big issue for me, since if you use the Octane renderer, you normally also use Octane materials. However as I said it would be nice to have and IMHO should work since Octane is a valid render engine for Rhino.
your Idea to of selecting multiple objects and assigning box mapping to them in one single operation, is more or less what I am currently doing, I even wrote a few macros to make the process less painful but it is a very cumbersome workaround, because you always have exceptions like e.g. objects where you need to assign a different mapping mode or other mapping sizes.
The ideal solution though is I think for Octaneâs WCS mapping in itâs materials to be converted to Rhino WCS mapping in Rhinoâs rendered display mode.
Youâre welcome! I believe our UV guru @Jussi_Aaltonen will be able to help communicate to the Octane developers on this issue.
Please forgive me if I have misunderstood the issue. However I think the problem is that the Octane Material needs to be converted to a Rhino Material via SimulateMaterial() in order to display in the Rhino Viewport. In SimulateMaterial, the Texture would need to have Box Mapping applied. I donât see a way to do this in a RhinoCommon Texture (to be used in simulatedMaterial.SetTexture()) as per https://developer.rhino3d.com/api/rhinocommon/rhino.docobjects.texture .
Thanks
Paul
Hi @walther
How is Octane converting its materials to Rhino materials at the moment?
Hi Jussi,
that is a question you might want to ask @pkinnane (Paul) who is the developer of the Octane for Rhino plugin.
I made a test scene with two Boxes of 10m x 10m x 10m.
One is assigned an Octane material with a Box projection instead of the default âmesh UV projectionâ (scale 1/1/1).
The other one has a Rhino material with a "WSC / OCS (box style) definition for its texture (texture size 1).
Both should display 10 circles in each of their dimension axis in the Rhino viewport, and the rendered Image.
I attached the scene as a zip file
WCS Test.zip (462.2 KB)
I will send @pkinnane the same file on the octane forum.
The plugin is taking the components from the Material and RenderMaterial (in particular the material.GetTexture(TextureType.Bitmap)) to determine the bitmap filename and projection for Octane. I cannot see in the RhinoCommon docs were to access the Textureâs âMappingâ->âWSC/OCS (box style)â property. Where is this contained please?
Thanks
Paul
Youâll be better of using RenderMaterial and RenderTexture. On the latter the projection mode is through the method GetProjectionMode(). Here is how I use that in RhinoCycles integration:
The method documentation is RenderTexture.GetProjectionMode Method
FWIW, these have existed already since before Rhino 6, and the ChangeQueue method already since Rhino 6.
Thanks @nathanletwory - I will try that.
Reversing the questionâŚhow is âWSC/OCS (box style)â specified in SimulateMaterial() please?
Thanks
Paul
I donât know how to get to the mapping settings of an old-style Texture instance through RhinoCommon. That is something @andy will know.
I have the Rhino Material->Octane Material conversion working nicely.
Now just waiting on a response from my question above to do the other direction, which was what Andreas was originally after.
Thanks
Paul
You need the Rhino.Render.RenderTexture to get the projection mode.
Rhino.Render.RenderMaterial.SlotFromTextureType gives you the StandardChildSlots which you need to pass to the RenderMaterial.GetTextureFromUsage which will then return you the corresponding RenderTexture.
@pkinnane Sorry, I probably misunderstood your question. Are you creating a Rhino material of an Octane material now? And you need to tell that this Rhino material should use WCS projection? So youâre actually setting up a Rhino.DocObjects.Texture which then of course doesnât have an associated Rhino.Render.RenderTexture.
I am trying to tell the Rhino viewport how to display the Octane Material via simulateMaterial(), specifically, how to tell the Rhino viewport to use WCS projection on the texture map that is specified in simulateMaterial()
So youâre actually setting up a Rhino.DocObjects.Texture which then of course doesnât have an associated Rhino.Render.RenderTexture
Correct
Paul
Just trying to keep the momentum here ![]()
@Jussi_Aaltonen
can you help @pkinnane to have a correct representation of the WCS Octane material in the viewport? Do you need additional information?
Thanks
Andreas
Iâve added ProjectionMode property to Rhino.DocObjects.Texture in Rhino 8.3 which will possibly be available as a release candidate in a couple of days. RH-78920
So you can change your simulated texture to use WCS projection by setting
mySimulation.ProjectionMode = TextureProjectionModes.Wcs;
Awesome - thanks @Jussi_Aaltonen