UltraScatter and Voxelizer?

Forums: UltraScatter and Voxelizer?
DAZ Studio Integrated Plugin (Integrated Plugin maintained by OTOY)

Moderator: BK

Forum rules
Please keep character renders sensibly modest, please do not post sexually explicit scenes of characters.

Re: UltraScatter and Voxelizer?

Postby rajib » Tue Nov 22, 2016 7:10 pm

rajib Tue Nov 22, 2016 7:10 pm
Hi Paul,

Not sure if this Daz QT script I just wrote will help you or not. If you run it on the cube_GroupInstance node in the scene file I attached, you will get the following popups:
InstanceCount.png
Instances Count within the GroupInstance
InstanceCount.png (2.87 KiB) Viewed 5060 times

And the the vertices of each instance clearly shows the X value is different like you can see in the screen shot in my previous post. So I am not sure if the Octane plugin is somehow rendering all the instances at the same place or is only reading 1 instance or reading the cube_GroupInstance as the instance and not checking if is of type DzInstanceGroupNode.

InstanceItemVerticesXYZ.png
Instance Item Vertices


Here is the Daz Script I wrote :
// DAZ Studio version 4.9.2.70 filetype DAZ Script

(
function( oSelectedNode )
{
var Title = "Selection Error";
var Message = "You must select an instance node to perform this action.";
var Ok = "&Ok";

if( !oSelectedNode || !oSelectedNode.inherits( "DzInstanceNode" ) || !oSelectedNode.inherits( "DzInstanceGroupNode" ))
{
// Alert the user
MessageBox.warning( Message, Title, Ok ,"");
// We're done...
return;
}

if(oSelectedNode.inherits( "DzInstanceGroupNode" ))
{
var ItemCount = oSelectedNode.getNumberOfGroupItems();

Message = "Item Count = "+ItemCount;

MessageBox.warning( Message, "Instances Group Node - Item Count", Ok ,"");

Message = "";

for(var ItemIndex=0;ItemIndex<ItemCount;ItemIndex++)
{
var InstanceGroupItem = oSelectedNode.getGroupItem( ItemIndex );
var Vertices = InstanceGroupItem.getLocalPos();

Message = Message + "Instance["+ItemIndex+"]" +"X["+Vertices.x+"] Y["+Vertices.y+"] Z["+Vertices.z + "]\n";
}

MessageBox.warning( Message, "Instances Group Node Item Vertices details", Ok ,"");
}
}
)( Scene.getPrimarySelection());
Windows 10 Pro i9-9980XE 128GB RAM|4 x Titan RTX
Houdini 18.5(2020.2.1.2)|Cinema C4D R26|Daz Studio Pro 4.21.0.5(Octane 2021.1.6.83)
NVIDIA 460.89 Studio Standard
User avatar
rajib
Licensed Customer
Licensed Customer
 
Posts: 401
Joined: Sun Sep 28, 2014 4:57 am

Re: UltraScatter and Voxelizer?

Postby rajib » Wed Nov 23, 2016 5:10 am

rajib Wed Nov 23, 2016 5:10 am
Hi Paul,

I added a UltraScatter built instances of the same Cube instances scene I had created. I added 20 instances. As you can see from the screen shot below, DAZ shows all instances where as Octane does not.
InstancesAppearingInDAZAndNotInOctane.png


When I run the script I wrote (last post) I am able to correctly read the 20 instances in the cube instances node in the scene tab.
UltraScatterInstancesCount.png
UltraScatter Instances Count


UltraScatterInstancesVerticesDetails.png
UlrtaScatter Instances Details


I rendered the scene under IRAY and all instances were rendered.
IrayRenderOfTheInstances.png
IRAY render of the instances


So again I feel Octane Plugin is not processing the DzInstanceGroupNode node properly and if that is fixed, UltraScatter and other scripts that make Instance groups will work properly with Octane Plugin.

I am attaching the scene file with the cube instances and also the UltraScatter instances. The UltraScatter instances are under the Ground node. It will have a child node called UltraScattered cube and that in turn will contain a child node called cube Instances. This is the one of DzInstanceGroupNode type and contains the 20 instances of the cube.

Regards,
Rajib
Attachments
CudeInstances2.zip
Scene File
(35.72 KiB) Downloaded 263 times
Windows 10 Pro i9-9980XE 128GB RAM|4 x Titan RTX
Houdini 18.5(2020.2.1.2)|Cinema C4D R26|Daz Studio Pro 4.21.0.5(Octane 2021.1.6.83)
NVIDIA 460.89 Studio Standard
User avatar
rajib
Licensed Customer
Licensed Customer
 
Posts: 401
Joined: Sun Sep 28, 2014 4:57 am

Re: UltraScatter and Voxelizer?

Postby face_off » Wed Nov 23, 2016 6:30 am

face_off Wed Nov 23, 2016 6:30 am
So again I feel Octane Plugin is not processing the DzInstanceGroupNode node properly and if that is fixed, UltraScatter and other scripts that make Instance groups will work properly with Octane Plugin.
Yes - this is definitely the case. I spent about a week trying to fix this problem a while back, but the problems are not simple to fix. I will take another look over the next few days.

Paul
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
User avatar
face_off
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15480
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

Re: UltraScatter and Voxelizer?

Postby linvanchene » Wed Nov 23, 2016 9:14 am

linvanchene Wed Nov 23, 2016 9:14 am
One more thing to check when working with instances:

If you cannot see instances in the OR viewport make sure they were not added below the surface because of their "origin point" set on top instead of the bottom of the object.

-> Use the DAZ Studio "Joint Editing Tool" to adjust the origin point of the object.

compare the tutorial video:

OctaneRender for Daz Studio v2.x - Instances



- - -
Win 10 Pro 64bit | Rendering: 2 x ASUS GeForce RTX 2080 Ti TURBO | Asus RTX NVLink Bridge 4-Slot | Intel Core i7 5820K | ASUS X99-E WS| 64 GB RAM
FAQ: OctaneRender for DAZ Studio - FAQ link collection
User avatar
linvanchene
Licensed Customer
Licensed Customer
 
Posts: 783
Joined: Mon Mar 25, 2013 10:58 pm
Location: Switzerland

Re: UltraScatter and Voxelizer?

Postby face_off » Sat Nov 26, 2016 8:08 am

face_off Sat Nov 26, 2016 8:08 am
And the the vertices of each instance clearly shows the X value is different like you can see in the screen shot in my previous post. So I am not sure if the Octane plugin is somehow rendering all the instances at the same place or is only reading 1 instance or reading the cube_GroupInstance as the instance and not checking if is of type DzInstanceGroupNode.
Post response removed....

Paul
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
User avatar
face_off
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15480
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

Re: UltraScatter and Voxelizer?

Postby face_off » Sat Nov 26, 2016 10:34 pm

face_off Sat Nov 26, 2016 10:34 pm
I have done some more testing on this.

It appears that the plugin /is/ picking up Instances Group items. See below, where I have added a Sphere, transformed it, then Create->New Node Instances->10. You can see all 10 spheres are rendering in Octane.

You can also see there is only one cube in the Instances Group, and Octane is rendering 1 cube. So to me, Octane appears to actually be rendering that scene correctly, and DAZStudio not! Where are the other 4 cubes in the DAStudio viewport coming from?

Paul
Attachments
group instances.png
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
User avatar
face_off
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15480
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

Re: UltraScatter and Voxelizer?

Postby rajib » Mon Nov 28, 2016 3:56 am

rajib Mon Nov 28, 2016 3:56 am
face_off wrote:I have done some more testing on this.

It appears that the plugin /is/ picking up Instances Group items. See below, where I have added a Sphere, transformed it, then Create->New Node Instances->10. You can see all 10 spheres are rendering in Octane.

You can also see there is only one cube in the Instances Group, and Octane is rendering 1 cube. So to me, Octane appears to actually be rendering that scene correctly, and DAZStudio not! Where are the other 4 cubes in the DAStudio viewport coming from?

Paul


Hi Paul,

The other 5 instances are within the cube_GroupInstances. Do a simple step :
1. Click on any of the Sphere Instances you created to highlight it.
2. Go to Edit->Group like Sibling Instances and click it.

You will notice in Daz Viewport nothing changes, but in your Octane Viewport, only 1 or 2 spheres will display. Also you will notice under the Scene tab, all the 10 individual sphere instances have been replaced by 1 group node. I had given you the above steps in my previous post.

Basically what is being done with the Edit->Group like Sibling Instances is to hide the clutter in the Daz Scene tab as there can be tens of thousands of instances and having that kind of list in the Scene tab can make Daz UI ultra slow. The Edit->Group like Sibling Instances puts all the instances in one node. Also scripts like UltraScatter uses the instance group node to keep the scene tab clutter free.

If you run the script I had provided in my previous post on the cube_GroupInstances you will see it reports the group item count as 5 and also gives the X,Y,Z of the 5 instances correctly even though in the Scene tab you only see 1 group node. You can also click the cube_GroupInstances and go to Edit->Break Instance Group and you will see the 5 instances of cube listed in the scene tab and the Octane Viewport will now show the 6 cubes like Daz viewport is showing. So to me Octane Plugin is not reading the cube_GroupInstances as a group of instances. It is treating it as a single instance which is wrong. If the node type is of DzInstanceGroupNode, it must call getNumberOfGroupItems() and then in a loop call getGroupItem( ItemIndex ) to get the individual instance node and then get its properties e.g. getLocalPos() etc. I am giving the QT Script API, I am not sure if the SDK API names are the same. You need to use the SDK API equivalent. If you loop through the Item Count, you will be able to access and render the instances contained in the group correctly in the Octane Viewport. If you look at the script I had provided, you will see how I am reading the individual item properties contained within the group node (cube_GroupInstances). Btw. You may need to check if any of the instance node contained within the group node is actually a group instance node (DzInstanceGroupNode) too and if so you will need to recurse into it. Only that way you will be able to render all the instances correctly.

Regards,
Rajib
Windows 10 Pro i9-9980XE 128GB RAM|4 x Titan RTX
Houdini 18.5(2020.2.1.2)|Cinema C4D R26|Daz Studio Pro 4.21.0.5(Octane 2021.1.6.83)
NVIDIA 460.89 Studio Standard
User avatar
rajib
Licensed Customer
Licensed Customer
 
Posts: 401
Joined: Sun Sep 28, 2014 4:57 am

Re: UltraScatter and Voxelizer?

Postby face_off » Tue Nov 29, 2016 4:12 am

face_off Tue Nov 29, 2016 4:12 am
Thanks Rajib - sorry for not picking up on that when you first provided that info. The plugin is added an Octane Placement node for /every/ instance, so even if I could implement some code to iterate through the DzInstanceGroupNode, if there are 20,000 instances in DAZStudio, there will be 20,000 Octane Placement nodes in the Octane scene. So it's not a particularly great solution. A better way to do it would be to store all the DzInstanceGroupNode items in an Octane Scatter node. I will see if this is possible.

Paul
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
User avatar
face_off
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15480
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

Re: UltraScatter and Voxelizer?

Postby rajib » Tue Nov 29, 2016 8:42 am

rajib Tue Nov 29, 2016 8:42 am
face_off wrote:Thanks Rajib - sorry for not picking up on that when you first provided that info. The plugin is added an Octane Placement node for /every/ instance, so even if I could implement some code to iterate through the DzInstanceGroupNode, if there are 20,000 instances in DAZStudio, there will be 20,000 Octane Placement nodes in the Octane scene. So it's not a particularly great solution. A better way to do it would be to store all the DzInstanceGroupNode items in an Octane Scatter node. I will see if this is possible.

Paul


No worries Paul :). Using the Octane Scatter node will definitely be the better solution. Something I believe the Phantom Scatter uses in the Octane standalone. Btw. if you do manage to add Octane Scatter nodes to the plugin, can you see if the CSV created out of Phantom Scatter can be added to a scatter node in the NGE ? That would provide another more sophisticated scattering solution (Phantom Scatter viewtopic.php?f=9&t=33791) to be used with the Plugin :) . Btw. if you need a beta tester for this, count me in. Even if the development mode plugin is not stable, I can help to create complex scenes with grouped instances and test with those to see what fails and report back.
Windows 10 Pro i9-9980XE 128GB RAM|4 x Titan RTX
Houdini 18.5(2020.2.1.2)|Cinema C4D R26|Daz Studio Pro 4.21.0.5(Octane 2021.1.6.83)
NVIDIA 460.89 Studio Standard
User avatar
rajib
Licensed Customer
Licensed Customer
 
Posts: 401
Joined: Sun Sep 28, 2014 4:57 am

Re: UltraScatter and Voxelizer?

Postby face_off » Tue Nov 29, 2016 11:28 pm

face_off Tue Nov 29, 2016 11:28 pm
Btw. if you do manage to add Octane Scatter nodes to the plugin, can you see if the CSV created out of Phantom Scatter can be added to a scatter node in the NGE ?
I think a much better solution would be if this was implemented directly into the DzInstanceGroupNode item. You should be able to do this yourself with some DAZ script. Copy the Octane Scatter node (containing the instances) into the Windows clipboard (in PhamtonScatter or Standalone), select the DzInstanceGroupNode, run the script - which would iterate through the Windows clipboard CSV transforms, and add each as a DzInstanceGroupItem to the selected DzInstanceGroupNode.

Paul
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
User avatar
face_off
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15480
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia
PreviousNext

Return to DAZ Studio


Who is online

Users browsing this forum: No registered users and 11 guests

Wed Apr 24, 2024 12:31 pm [ UTC ]