What does it take to get into LW plugin development?

WaveRider

Member
Probably not the best time, but what are the absolute basic requirements to get into LW plugin development? How many years of coding experience? Higher education or even scientific background needed?
 

Shabazzy

LightWave Fan Boi
Basic requirements?

Mathematics (at least A level grade. Speaking from a UK perspective)
--- Geometry, Trigonometry, Matrices, Vectors, Equations.
Basic physics principles
Computer graphics theory and principles
Computer science.

Out of all of the above the most fundamental subject to have a strong grasp of is without doubt, mathematics. Without it, you're pretty much handicapped. All the other subjects are based on it.

How many years of coding experience needed to develop LW plug-ins?
If you have the above subjects under your belt, you should be able to create something within a year once you've studied the LW SDK.
 
Probably not the best time, but what are the absolute basic requirements to get into LW plugin development? How many years of coding experience? Higher education or even scientific background needed?

Absolute basic requirements is to have a brain, 10 fingers and at least one functional eye ;)

Now seriously ;)
Start with LScript and Python.
Just start with simple modeling scripts, and try to do small modifications.
You don't need to be worry about math.
If you have finished college math class, you are fine.

You'll find out very soon, if this is for you or not.
When you will handle basic scripting, you can move on to C++ plugins.

Good luck!
 
Last edited:

Kryslin

Active member
Absolute basic requirements is to have a brain, 10 fingers and at least one functional eye ;)

Now seriously ;)
Start with LScript and Python.
Just start with simple modeling scripts, and try to do small modifications.
You don't need to be worry about math.
If you have finished college math class, you are fine.

You'll find out very soon, if this is for you or not.
When you will handle basic scripting, you can move on to C++ plugins.

Good luck!
I disagree; Once done with simple scripting, move onto more advanced scripts, and begin learning C/C++ to move onto the "new and more interesting ways to crash Lightwave/Your Computer" phase of things.

Being able to resist tearing your hair out when frustrated with something (with me, it's SDK documentation) also helps.
 
I disagree; Once done with simple scripting, move onto more advanced scripts, and begin learning C/C++ to move onto the "new and more interesting ways to crash Lightwave/Your Computer" phase of things.

Being able to resist tearing your hair out when frustrated with something (with me, it's SDK documentation) also helps.

Never discourage a traveler at the beginning of the journey! ;)
Learning Python is always plus, for any next career in the CGI.
And the C++, if it is not for him, he need to try it first.
 
Last edited:

Kryslin

Active member
Never discourage a traveler at the beginning of the journey! ;)
Learning Python is always plus, for any next career in the CGI.
And the C++, if it is not for him, he need to try it first.
I agree with that, yes. I tried C++ a long time ago, thinking I would need to learn it. I gave up after a year. Got tired of rebooting my PC 3rd or 4th compile. I much prefer C#, but you can't write Lightwave plugins in that, unless someone's coded a wrapper for it.
Absolutely agree (hopefully the math classes in WaveRider's country are of a high quality).
High School Algebra is a necessity, along with basic trig and vectors; not that you have to be able to work the problems by hand, but understanding what it does. None of that is hard, but some people don't 'get' math.
 

Sensei

TrueArt Support
In LW you don't write plug-ins in C++. You write them in C. Entire LWSDK is in ANSI C.
If you want to use C++, you need to make wrapper which will translate to C.
 

WaveRider

Member
Some good information here, thanks.
Well, it's a start. I'm taking refresher courses (30 years since I left school), should take 6-12 months. I also acquired some books about computer graphics fundamentals. Not sure about learning how to code properly...never managed to look into it since it wasn't part of my career.
 

Shabazzy

LightWave Fan Boi
..but some people don't 'get' math.
And I've always thought the reason for this is because:

a) the school system has a one approach fits all in its teaching methods
b) some (probably most) teachers are really bad communicators, create really boring lesson plans and are truly unimaginative.

I think anyone can understand math principles and solve math problems confidently, if time is taken with the pupil to determine where the "point of failure" is in their comprehension of a lesson and then address it.
 

stevmjon

Member
i am also interested in making plugins/lscript/python too. not sure how to go about it either.
i have only used basic language for about 15+ years. in my spare time i learnt 3D theory and in this basic language even manually wrote a basic 3D engine (i needed to manually calculate everything because it is a 2D language so had no 3D commands). i learnt 3D theory and maths over a 2+ year period.

** what i want to do is to look at the numeric panels in modeler ** is this possible?

eg. i would like to add an extra line to the modeler > axis translate tool.

it has the start position & end position when translating a point (which is good i guess but you need to do math in your head, and only good if moving along xyz axis), but i need distance between start pos and where it is now as i move it displayed in the numeric panel (or even on screen if this is easier). that way i can translate the point a more accurate distance. i keep using translate plus to achieve distance which is multiple clicks and selections every time i translate a point.

any advice is appreciated. which language do i need, and which files do i need to read?

also, good luck WaveRider. i hope it works out for you too.

thanks steve.
 

Sensei

TrueArt Support
any advice is appreciated. which language do i need, and which files do i need to read?
C/C++ if you want to use LWSDK.
Look at LightWave folder.
It's there but packed.

Alternatives are: LScript (legacy) and Python. Both much slower than native LWSDK plugin.
 
Last edited:

3dslider

Member
Watch out for C++, you need to wrap it in C++ properly wtih more casting variable for LW SDK if you work with it... I think you have first to try in C there not problem for casting variable and more easy than C++, after if you know very well in C you can make in C++ for more advanced with OOP classes. You can learn from examples there as Sensei said :)

For Python you can achieve some similar to C in Python LW SDK, it is very powerful as well. Link : LWPY 11
 

lardbros

Not so newbie member
Absolute basic requirements is to have a brain, 10 fingers and at least one functional eye ;)

Now seriously ;)
Start with LScript and Python.
Just start with simple modeling scripts, and try to do small modifications.
You don't need to be worry about math.
If you have finished college math class, you are fine.

You'll find out very soon, if this is for you or not.
When you will handle basic scripting, you can move on to C++ plugins.

Good luck!
Such a great reply. Coming from the dev of some of my favourite LW tools of all time... such a positive reply :)

I find coding really tedious, but I don't do it often enough. If you keep hammering away at it, it's one of those things that gets easier the more time you spend doing it.
As concepts start sinking in, the more complex ideas become easier to understand.
 

jwiede

Electron wrangler
Such a great reply. Coming from the dev of some of my favourite LW tools of all time... such a positive reply :)

I find coding really tedious, but I don't do it often enough. If you keep hammering away at it, it's one of those things that gets easier the more time you spend doing it.
As concepts start sinking in, the more complex ideas become easier to understand.
The big jumps occur when you get enough base "vocabulary" and abstractions/patterns to where you can start generalizing (recognizing how those patterns can be applied to other scenarios). It's just layering of abstractions one atop another, and while there might be tons of abstraction layers involved, the actual abstractions involved represent a fairly small set.

It's really no different than, say, mechanical engineering, where you have a fairly small set of "basic mechanisms*" but by combining and layering them, you can build incredibly complex mechanisms. Software uses "patterns" (abstractions) the same way that ME uses "basic mechanisms" -- that's why understanding basic data structures and algorithms is so important, they're the initial "expression" of those basic patterns. Once you understand them, you can understand the patterns they're demonstrating, and begin to recognize those patterns in more complex uses (and eventually use them yourself that way).

I realize it all sounds very abstract (because everything in software kind of is), but hopefully that makes some sense.
 

Dodgy

Worms no more! Free fun!
Start with LScript if you're familiar with Basic, it has the easiest syntax and commands to learn. My website has documentation of the commands in an easy to search way. My website also has dozens of Lscripts in uncompiled forms for you to look at and study to see how they work, from fairly simple things to more complex tools. It's not as complete as C or Python plugins, but it will give you an easy start if you want to ease into it.
 

jwiede

Electron wrangler
Yeah, it's important to differentiate LW knowledge and programming knowledge. Before even considering getting into LW plugin programming in C or even Python, you should have a fundamental understanding of C or Python coding, and a fundamental grasp of Lscript is also highly valuable.

Why Lscript? Simple, because Lscript is "tightly-coupled" to how LW actually works inside, and as a result, the better you understand Lscript, the better you'll be able to grasp how C or Python APIs relate to LW's internal systems. In that sense, Lscript is almost a kind of "pseudocode" description of the interactions needed with LW to carry out operations, so it'll help you better understand how the C and Python APIs are actually "wired into" LW code.

I wouldn't actually recommend "learning to code" using a LW plugin as an "early programming project", because there's so much that must be done just right to get any feedback from LW (and not be a trivial example), and debugging C LW plugins in particularly can be quite tricky (due to the need to hook the debugger to LW, and the limited visibility where you only really see your C code well, all of LW other than API entry points will be as disassembly, which is not useful if you're only just learning C and don't already know x32/x64/x86_64 asm).

You're better off learning the basics of Python using REPL-based experimentation, slowing integrating other modules, etc. before trying to tackle something like a LW plugin. Likewise, in C either a REPL environment or working directly through basic exercises and lessons in something like VIsual Studio / Visual Studio Code / XCode is likely to be a more productive learning environment early-on versus trying to "learn C along the way" as you work through coding a LW plugin.

Ask any questions, happy to help if I can! If you're looking for general-purpose multi-language REPLs for learning, I've found "REPL-it" (https://replit.com/) to offer productive environment and great value for low cost. I frequently use REPLs there in various languages to try noodling out ideas, playing with new languages, etc.
 
Last edited:

WaveRider

Member
Thank you jwiede,
I'm nowhere near getting into coding. I had a look at the first best source I could find (Brushwave source / project) seeing if I could somehow compile that for LW2015. Needless to say that I have no idea what i'm doing. :ROFLMAO:
I'll finish my math refresher course first. It's a struggle getting back into this after 25 years.
 
Top Bottom