Wireframe geometry (atom array)

Forum for OctaneRender Lua scripting examples, discussion and support.
Post Reply
User avatar
jobigoud
OctaneRender Team
Posts: 250
Joined: Sat Aug 15, 2015 1:28 pm

Hi everyone,

This is a script to create a solid wireframe version of a mesh. The script goes through the polygons and replaces edges with hair primitives and vertices with spheres.
spaceship.jpg
spaceship4.jpg
Usage
1. Add a Scripted graph node and load the script "wireframe.lua" into it.

2. Plug the geometry node you want to convert into the Geometry input.

3. Adjust the radius of the spheres and rods using the Vertex radius and Edge radius fields.
cube.jpg
nodegraph.png
nodegraph.png (12.92 KiB) Viewed 5822 times
Feedback, bug reports and suggestions are highly appreciated.
Thanks!

Lua script:
wireframe.lua
(11.51 KiB) Downloaded 318 times
Demo ORBX:
wireframe-demo.orbx
(74.99 KiB) Downloaded 338 times
Last edited by jobigoud on Tue Sep 21, 2021 9:53 am, edited 1 time in total.
elsksa
Licensed Customer
Posts: 784
Joined: Sat Jul 24, 2021 1:06 am

Nice results. Thank you for sharing it publicly.
User avatar
jobigoud
OctaneRender Team
Posts: 250
Joined: Sat Aug 15, 2015 1:28 pm

I updated the script to make it work better in Octane 2020 and Octane X.
manalokos
Licensed Customer
Posts: 441
Joined: Fri Nov 18, 2011 4:43 pm

Hi, great script!

I would add some improvements:

-Active/inactive checkbox
-Script is rebuilding mesh even if there is a change in the material, (should evaluate only if geometry changes?)

Kind regards
Filipe
User avatar
jobigoud
OctaneRender Team
Posts: 250
Joined: Sat Aug 15, 2015 1:28 pm

manalokos wrote: -Script is rebuilding mesh even if there is a change in the material, (should evaluate only if geometry changes?)
Thanks. I can't really tell that only the material changed unfortunately. We get a callback that the source geometry node changed somehow, but there is no granularity on what changed about it.
Post Reply

Return to “Lua Scripting”