Friday, 2 January 2015

Playing a sound file after rendering an animation in OctaneRender for Poser

I had a request from a user wanting to play a sound file once the rendering of an animation as complete in OctaneRender for Poser.  This can be done with a python script:

   
 import winsound  
 import time  
 import threading  
 from threading import Thread, Event  
   
 class CheckAnimationFinishedThread(Thread):  
   def __init__(self, event):  
     Thread.__init__(self)  
     self.stopped = event  
   
   def run(self):  
     while not self.stopped.wait(0.5):  
       if not octanePlugin.UiManager.GetSetupForm().renderingAnimation:  
         # Stop the thread  
         stopFlag.set()  
           
         # Play the sound file  
         winsound.PlaySound("C:\Users\Public\Documents\Poser Pro 2014 Content\Runtime\LipSync\Audio Files\HiThere.wav", winsound.SND_FILENAME)  
         
 octanePlugin = __import__("OctaneRender for Poser")   
 if not octanePlugin.UiManager.IsSetupWindowOpen():  
   print "Setup Window not open"  
 else:  
   octanePlugin.UiManager.GetSetupForm().EventRenderAnimation(None)  
     
   # Start the thread to check for the end of rendering the animation  
   stopFlag = Event()  
   thread = CheckAnimationFinishedThread(stopFlag)  
   thread.start()  
   

Copy the above code into a file called RenderOctaneAnimation.py and save to the C:\Program Files\Smith Micro\Poser Pro 2014\Runtime\Python\poserScripts\ScriptsMenu folder (assuming Poser is installed in C:\Program Files).  Then open the OctaneRender for Poser plugin, and run the above script from the Poser->Scripts menu->RenderOctaneAnimation.  This will start the plugin rendering the animation, and once complete, it will play the HiThere.wav file.  You can play any file by changing the code above.

Friday, 12 December 2014

Camera Projection in OctaneRender for Modo

EDIT: The post below is now redundant, since the OctaneRender for Modo plugin automatically support camera projection texture locator.  
 
I was asked it was possible to setup camera projection textures in OctaneRender for Modo.  The answer is "Yes", although at the moment it requires some manual processing.  To set this up, add an Octane Override for the Modo material and then open the Viewport.  

Then:

1) Add an Octane Perspective Projection node and connect it to the Projection pin of the Octane RGB Image node
2) Select the Octane Transform Value connected to the new Octane Perspective Projection node, and manual enter the current Render Camera transform values.  You should notice the texture is now projected according to the current camera position in the OctaneRender Viewport
3) Add an Octane 3D Transform node and connect it to the Transform pin of the Octane RGB Image node.
4) Select the Octane Float Value connected to the Scale pin of the new Octane 3D Transform.  Click the Gang edit control until it is set to "=", and then slide one of the value to get the texture size you need. You can also adjust the Translation to adjust the position of the projected texture.

I plan on semi-automated the above where possible in the next release.  In particular, adding the ability to connect the Modo camera transform node to the Octane Transform node would be great.


Wim's OctaneRender for Poser Tips


Wim van de Bospoort sent through some excellent OctaneRender for Poser tips, which follow:

LiveDB Texturemap Folder
This is the location where the plugin stores texture maps when a material is loaded from LiveDB. The default is located in the Poser Temp folder.

I suggest to change that to a special folder in Posers Runtime. (I use runtime:textures:Octane). The reason for this is that the contents of your temp folder may get lost (if you clear the temp folder or if you move to a new machine). Your Poser scene files will then no longer be able to find these textures and you have to load the same material again from LiveDB. If the folder is located in the poser runtime they will be moved with the machine and included in the regular backups.

Poser Smoothing vs Octane Smoothing
Some materials of flat surfaces do not smooth very well in Octane. If this happens you can turn off the smoothing for that material which should no matter since it is a flat surface. There is another way however to prevent this problem and that is to use Octane smoothing. You can do that by setting the smoothing Angle in the setup window to 80 and reconvert the material. The Octane smoothing works very well and you can modify the angle to smooth in the setup window. The flat surfaces will now work fine without modification. In some cases however there is a seam problem with gen4 figures. If this happens you can set the figure to Unimesh and the problem will disappear.

Octane and Poser smoothing are mutually exclusive - so for the entire scene. To go back to Poser smoothing, set the angle back to 0.

Fast way to duplicate octane material settings of an entire scene
Suppose you have two or more scenes already built and you changed the materials of all the props and figures in that scene and you now want to have the same materials in the other scenes, of course you can save the materials as poc files – one by one. But there is a faster way – not really a feature but a discovery. What you do is to load the first scene with the materials, then open the plugin. Now close the plugin again and load the next scene – without restarting poser – and start the plugin again. Now you will find that all the materials of the first scene have been applied to second scene as well. Not only for props, but also for figure. In case you need the same emitters in the scene, create those before you start the plugin and the previous settings will be applied as well. A real time saver.

HDR Light Studio and Interiors
If you want to use HDRLS with interiors use the following trick. Set all the non camera facing walls, ceiling and floors as well as other light blocking features to “Shadow Visibility” None. That way the structure still reflects but does not block the HDRI lights. Use the other Poser cameras as well to position the HDRI lights. The HDRI light do work well together with Daylight and light emitters.

Thursday, 11 December 2014

Surface Edge Rendering with Octane

Bendbox (from the Otoy forums) has provided a novel way to highlight surface edges for illustrative purposes when rendering with Octane.  Below shows the material which does this, which is based around a Mix Material with 2 Dirt nodes attached to the inputs.