Wireframe geometry (atom array)

Forums: Wireframe geometry (atom array)
Forum for OctaneRender Lua scripting examples, discussion and support.

Wireframe geometry (atom array)

Postby jobigoud » Wed Sep 15, 2021 1:34 pm

jobigoud Wed Sep 15, 2021 1:34 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 4508 times


Feedback, bug reports and suggestions are highly appreciated.
Thanks!

Lua script:
wireframe.lua
(11.51 KiB) Downloaded 266 times


Demo ORBX:
wireframe-demo.orbx
(74.99 KiB) Downloaded 267 times
Last edited by jobigoud on Tue Sep 21, 2021 9:53 am, edited 1 time in total.
User avatar
jobigoud
OctaneRender Team
OctaneRender Team
 
Posts: 230
Joined: Sat Aug 15, 2015 1:28 pm

Re: Wireframe geometry (atom array)

Postby elsksa » Sun Sep 19, 2021 2:06 am

elsksa Sun Sep 19, 2021 2:06 am
Nice results. Thank you for sharing it publicly.
elsksa
Licensed Customer
Licensed Customer
 
Posts: 784
Joined: Sat Jul 24, 2021 1:06 am

Re: Wireframe geometry (atom array)

Postby jobigoud » Tue Sep 21, 2021 9:54 am

jobigoud Tue Sep 21, 2021 9:54 am
I updated the script to make it work better in Octane 2020 and Octane X.
User avatar
jobigoud
OctaneRender Team
OctaneRender Team
 
Posts: 230
Joined: Sat Aug 15, 2015 1:28 pm

Re: Wireframe geometry (atom array)

Postby manalokos » Wed Nov 10, 2021 2:33 pm

manalokos Wed Nov 10, 2021 2:33 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
manalokos
Licensed Customer
Licensed Customer
 
Posts: 438
Joined: Fri Nov 18, 2011 4:43 pm

Re: Wireframe geometry (atom array)

Postby jobigoud » Thu Nov 11, 2021 10:35 am

jobigoud Thu Nov 11, 2021 10:35 am
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.
User avatar
jobigoud
OctaneRender Team
OctaneRender Team
 
Posts: 230
Joined: Sat Aug 15, 2015 1:28 pm

Return to Lua Scripting


Who is online

Users browsing this forum: No registered users and 3 guests

Thu Mar 28, 2024 8:22 am [ UTC ]