Phantom Scatter [1.12.2] Export and press CTRL+V in Octane!

Forums: Phantom Scatter [1.12.2] Export and press CTRL+V in Octane!
Generic forum to discuss Octane Render, post ideas and suggest improvements.
Forum rules
Please add your OS and Hardware Configuration in your signature, it makes it easier for us to help you analyze problems. Example: Win 7 64 | Geforce GTX680 | i7 3770 | 16GB

Re: Phantom Scatter | Automatized instancing solution

Postby p3taoctane » Thu Jul 18, 2013 9:28 pm

p3taoctane Thu Jul 18, 2013 9:28 pm
Looks like a very useful tool
Thanks
Windows 7 Pro_SP 1_64 bit_48 GB Ram_Intel Xeon X5660 2.80 GHZ x2_6 580GTX_1 Quadra 4800
p3taoctane
Licensed Customer
Licensed Customer
 
Posts: 1418
Joined: Mon Jan 25, 2010 12:53 am

Re: Phantom Scatter | Automatized instancing solution

Postby Phantom107 » Thu Jul 18, 2013 10:49 pm

Phantom107 Thu Jul 18, 2013 10:49 pm
smicha wrote:My another question to you is: will your plugin generate scatter data for all object located only on the same/flat surfaces? Or will it be possible to generate scatter data for e.g., grass/trees on valleys, mountains, etc.?

The scattering information will be taken from the 2d noise image (basically the xy-plane as seen in the screenshot), and then applied to 3D space. So it will also work on sloped surfaces! No problem.
User avatar
Phantom107
Licensed Customer
Licensed Customer
 
Posts: 686
Joined: Tue Jul 24, 2012 11:31 am
Location: The Netherlands

Re: Phantom Scatter | Automatized instancing solution

Postby deadakos » Fri Jul 19, 2013 10:29 pm

deadakos Fri Jul 19, 2013 10:29 pm
Your program would help me a lot!
I'm definitely interested in! Please keep us informed!

Thanks,
i9-9900K | 32GB RAM | 1x RTX 3080 + 1x GTX 1080 | Win11pro 64bit
deadakos
Licensed Customer
Licensed Customer
 
Posts: 102
Joined: Fri Feb 10, 2012 9:28 pm
Location: Hungary

Re: Phantom Scatter | Automatized instancing solution

Postby smicha » Sat Jul 20, 2013 7:08 am

smicha Sat Jul 20, 2013 7:08 am
Phantom107 wrote:.... it will also work on sloped surfaces! No problem.


Sounds great! Please post some tutorial screenshots/videos of how it will work asap.
Great job. I can't wait to test it.
3090, Titan, Quadro, Xeon Scalable Supermicro, 768GB RAM; Sketchup Pro, Classical Architecture.
Custom alloy powder coated laser cut cases, Autodesk metal-sheet 3D modelling.
build-log http://render.otoy.com/forum/viewtopic.php?f=9&t=42540
User avatar
smicha
Licensed Customer
Licensed Customer
 
Posts: 3151
Joined: Wed Sep 21, 2011 4:13 pm
Location: Warsaw, Poland

Re: Phantom Scatter | Automatized instancing solution

Postby Phantom107 » Sat Jul 20, 2013 10:32 am

Phantom107 Sat Jul 20, 2013 10:32 am
Update

I'm carefully programming/designing it step by step. I've put a lot of work in the broad base of Phantom Scatter Compute. I've updated the lists in the main post.

- I've written an OBJ importer. I've been testing it with models exported from SketchUp with TIG's plugin and it works. It should work with any OBJ as long as it's triangulated. I wrote it so it can import in the "Vertex/texture-coordinate/normal" formatting for faces (see https://en.wikipedia.org/wiki/Wavefront_.obj_file). I can add support for other face formats if people want this. I'm not entirely sure how the other OBJ exporters format their OBJ files...

- I've written a script that analyses the mesh and batches up geometry of the same material type. This means you can use the same material in different components/groups/objects (depending on what your modeling software calls them) and still get 1 CSV with all export data for this material. That'll save you a bunch of work during production.

- I've written a script that can do equal random distribution over 3D triangles. Currently I'm testing it with fixed data, the data that is not yet linked to the material library. I'll make the link as soon as everything works. I'm busy learning how to deal with matrices so the program will be able to do rotations/scaling.

- Exporting in CSV files now works.

Work-in-progress results during development | Not the final version (!)

I think I've come to the point where I can visually explain my proposed workflow. I'll be using SketchUp but it should work with anything as long as you can export it into OBJ.

1. My SketchUp testing area. It's a simple little area with a slope in it. I've put a material on it called "grid2":

Image

2. I export the model as OBJ. The OBJ file appears among my files:

Image

3. I run Phantom Scatter Compute:

Image

4. I press the "Select OBJ" button and browse to my OBJ. Phantom Scatter Compute will start working and will pop up a little report when the export is complete. The program closes itself immediately when you press OK (or hit Enter) so your workflow isn't interrupted. In the final version this will use the scattering data provided by the library of Phantom Scatter Library but right now I'm using some random positions of my own for testing purposes:

Image

5. The CSV file will appear next to your OBJ model, ready for import in Octane. I'm giving them the prefix "scatter_" so your folder doesn't become a mess. Right now I'm putting the material name in but in the final version I will name it accordingly to the scatter object names in Phantom Scatter Library so you can easily identify them:

Image

6. In Octane I load up my test area, plus a tree OBJ which will have a scatter node linked to it which has the CVS loaded up in it:

Image

7. The result:

Image

And this is just one tree being scattered. I can only imagine how fast workflow will be when everything from grass/flowers/bushes to trees can be scattered at an instant.

I realize there is a problem in the current version of Octane though. I don't think these is a button to update all the scatter nodes at once right now. This function really needs to be added!!

On a side note,
I think I can put further optimization in the datafiles that keep the scatter data in the library (these are the files that Phantom Scatter Compute will take as input data, not the CSV files). Right now every scatter data file 577 kB. I'll see what I can do about this in a later stage. I know you guys have complete beast PCs but space is not to be wasted.
User avatar
Phantom107
Licensed Customer
Licensed Customer
 
Posts: 686
Joined: Tue Jul 24, 2012 11:31 am
Location: The Netherlands

Re: Phantom Scatter | Automatized instancing solution

Postby smicha » Sat Jul 20, 2013 10:48 am

smicha Sat Jul 20, 2013 10:48 am
Just on the fly: to reduce csv file size what about nested scatter nodes. E.g.: 1m copies can be done - instead of 1m lines in a single csv file - in 6 csv files 10 line in each of them (10^6). Just connect a scatter node to another one. See my tutorial on this forum with nested components.

Phantom, what do you think about writing an algorithm that first generates couple of random placements, then randomize these placement, and so on...

Your work is impressive!
3090, Titan, Quadro, Xeon Scalable Supermicro, 768GB RAM; Sketchup Pro, Classical Architecture.
Custom alloy powder coated laser cut cases, Autodesk metal-sheet 3D modelling.
build-log http://render.otoy.com/forum/viewtopic.php?f=9&t=42540
User avatar
smicha
Licensed Customer
Licensed Customer
 
Posts: 3151
Joined: Wed Sep 21, 2011 4:13 pm
Location: Warsaw, Poland

Re: Phantom Scatter | Automatized instancing solution

Postby polytek » Sat Jul 20, 2013 8:47 pm

polytek Sat Jul 20, 2013 8:47 pm
Hey Phantom107, it does look interesting, i would be very interested if you get everything working....keep us posted

Best regards,

Poly
win 8.2 / 64 / systemmem 27Gb / gtx 750Ti & asus stricks Gtx 780 6Gb
polytek
Licensed Customer
Licensed Customer
 
Posts: 95
Joined: Sun Mar 20, 2011 12:27 pm
Location: Belgium

Re: Phantom Scatter | Automatized instancing solution

Postby face_off » Sat Jul 20, 2013 10:28 pm

face_off Sat Jul 20, 2013 10:28 pm
This looks great. It is almost exactly how the scattering generator works in the Poser and ArchiCAD Octane plugins. In those pluigins there is an option to tilt the OBJ by the normal of the triangle it is on (so the trees above would tilt with the ground surface) - which I think would be a useful inclusion in your plugin. May I also suggest importing of FBX (which is easy to implement via the freely available FBX API library from Autodesk).

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: 15473
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

Re: Phantom Scatter | Automatized instancing solution

Postby Zay » Sun Jul 21, 2013 7:08 pm

Zay Sun Jul 21, 2013 7:08 pm
Sounds like a very useful tool.
Win 11 Pro | i5 12600K | 32GB ram | 2x GTX 1080Ti + 3080Ti - studio driver 546.01| Modo/Blender/ZBrush/Daz/Poser
Zay
Licensed Customer
Licensed Customer
 
Posts: 1114
Joined: Sun Jan 17, 2010 2:53 am

Re: Phantom Scatter | Automatized instancing solution

Postby Phantom107 » Mon Jul 22, 2013 1:39 am

Phantom107 Mon Jul 22, 2013 1:39 am
Update
So I've done a ton of work under the hood. I ran into a bunch of problems with the model importing. Had to rewrite half of the importing scripts in order to fix them. One of the problems was the structure inside the OBJs. You'd think the geometry would be ordered nicely per material. But guess what? I can't discard unused data while importing because data on material 1 can use (for example) vertex/normal data from material 2. So I gotta load and analyse the entire model.
I would recommend that when exporting an OBJ for scatter data analysis, don't export heavy stuff like 3D lantern models etc that don't have scattering on them. This could be easily done when you group up the non-scattering stuff during modeling.

The scattering now works on any kind of slope. I've also added support for scaling:

Image

Additionally, I worked on importing code to import data from the Phantom Scatter Library library.
In the screenshot above it only scattered for the material 'grid2' because 'grid2' was the only material it found inside the library. This is good so it only scatters on the materials that you told it to.

smicha, I'll keep this idea in mind. I don't think it will be necessary though, since it's focussed on vegetation I think it's more important to have complete randomness everywhere. The human eye is trained to recognise patterns! ;)

face_off, I am working of the tilting but these matrices are far more complex than I imagined. Big respect for the Octane dev team for having to deal with that all throughout Octane. I'm not a fan of FBX though, I prefer to stick to OBJ. Or are there any tools that don't export OBJ? If that's the case, maybe I could add support for FBX later on. Just maybe.

PS: Thanks for the positive feedback so far. Glad to hear there is interest. :D
User avatar
Phantom107
Licensed Customer
Licensed Customer
 
Posts: 686
Joined: Tue Jul 24, 2012 11:31 am
Location: The Netherlands
PreviousNext

Return to General Discussion


Who is online

Users browsing this forum: No registered users and 16 guests

Tue Apr 16, 2024 7:10 pm [ UTC ]