Dynamic LOD using LUA

Forums: Dynamic LOD using LUA
Forum for OctaneRender Lua scripting examples, discussion and support.

Dynamic LOD using LUA

Postby Phantom107 » Wed Apr 26, 2017 8:31 pm

Phantom107 Wed Apr 26, 2017 8:31 pm
Hello guys,

I have absolutely zero knowledge/experience in LUA so I have a question.

Would it be possible to create some kind of dynamic LOD node for Octane? I am not sure if this can even be accomplished.

Image a geometry node with 3 mesh inputs: one for high detail, one for medium detail and one for low detail;
The node would then compare the mesh location to the camera location and depending on the distance, use the low, medium or high detail mesh. This would save tremendously on the frametimes.

If anywould could create something like this I'll give a complementary lifetime Phantom Scatter license and bring support; Phantom Scatter could then have an export mode where it creates a scatter node for every single instance, linked to the LOD node, then grouped up so it doesn't slow down the Octane UI.
User avatar
Phantom107
Licensed Customer
Licensed Customer
 
Posts: 685
Joined: Tue Jul 24, 2012 11:31 am
Location: The Netherlands

Re: Dynamic LOD using LUA

Postby Goldorak » Wed Apr 26, 2017 10:05 pm

Goldorak Wed Apr 26, 2017 10:05 pm
Great question. The short answer is yes and we're internally testing this now via our own lua procedural script nodes (matching the Unity built in prims - sphere, grid/plane, cylindar, cone, geo-dome, capsule, cube etc.). The lua node outputs a completely procedural geometry pin from script, and even has its own script based subd density slider for various LODs (basically a custom subd in lua vs. the built in Octane implementation).

These scripts will be inspectible when they ship with 3.07 in order to provide a framework for building on this base across all plug-ins (lua script nodes work in all plug-ins, not just in Standalone, and we want to formalize this better in 3.07 ORBX proxy support in the core ).

We may also test an experimantal versoin of a C node API in 3.07 (parallel to lua, and a preliminary step towards the native/LLVM grapg modules already on our 3.1 roadmap). This may give you even more power for complex procedural workflows closer to a DSO in RenderMan. Not sure if the C API will make it beyond our internal use and actually ship publicly in the next release, but we'll keep you posted.

The 3.06 lua script API is pretty stable now and exposes most of what you need for script based procedural geometry ahead of whatever optimizations we settle on for 3.07.
User avatar
Goldorak
OctaneRender Team
OctaneRender Team
 
Posts: 1926
Joined: Sun Apr 22, 2012 8:09 pm

Re: Dynamic LOD using LUA

Postby Phantom107 » Thu Apr 27, 2017 1:48 pm

Phantom107 Thu Apr 27, 2017 1:48 pm
Excellent, looking forward to it :)

(now get to work <3)
User avatar
Phantom107
Licensed Customer
Licensed Customer
 
Posts: 685
Joined: Tue Jul 24, 2012 11:31 am
Location: The Netherlands

Return to Lua Scripting


Who is online

Users browsing this forum: No registered users and 1 guest

Fri Oct 18, 2019 11:40 am [ UTC ]