PDA

View Full Version : Level Set renderer



titof
04-09-2003, 01:45 PM
Dear all,

I am new to lightwave and I was wondering if it had a levelset function renderer (I could not figure this out), or if other share that same interrest for such an addition.

best regards,
JC

Elmar Moelzer
04-09-2003, 01:49 PM
Whats that supposed to do?
CU
Elmar

titof
04-09-2003, 02:01 PM
Imagine you have a function phi(x,y,z) (as an output from an external program) such that phi(x,y,z)=0 defines a surface in space. well that would be super nice to be able to render that surface.
applications (at least for my work) are:
-1- rendering of skin produce by some of my code
-2- rendering of fluid flows (also from some of my external prog.) e.g. phi(x,y,z)>0 is water, phi(x,y,z)<0 is air and phi(x,y,z)=0 is the surface...

I realize this is pretty specific, but it has tons of potential applications when you think of all the problems that may be cast into such a framework.

best regards,
JC

harhar
04-09-2003, 04:55 PM
buy MatLab.

Elmar Moelzer
04-09-2003, 05:04 PM
I see, so you want some sort of procedurally generated objects in Layout?
If so, this is something that we (not only we but also some big studios, that do their own custom- LW- plugins) have been requesting for literally years.
It would enable developers to add geometry that is generated at rendertime, new SubDivisionSurface- generation- methods and much more.
CU
Elmar

titof
04-09-2003, 05:07 PM
I use Matlab, but... please ... don't compare with LW :)
anyhow, for transparency, light effect (rendering speed of animation) etc... I would love to be able to get thephotofinish quality of LW.

also, the field sizes I use are too big for malab while doing animation (24H/30frames !!! (P4-2.53))

thanks for the reply,
any other LW suggestions ?

best,
JC

titof
04-09-2003, 05:11 PM
Elmar,

I was not aware that a lot of people were interrested in such a capability. Indeed, object generation in the layout is what I need + a way to get my function phi(x,y,z) correctly interpolated so that the result is nice...
I hope this may spark some interrest.
anyway, is there a pluggin API for LW? if the stuff is not too convoluted I might take a look at it and maybe start a small project with other interrested parties.

best,
JC

harhar
04-09-2003, 05:54 PM
+ a way to get my function phi(x,y,z) correctly interpolated so that the result is nice...

can't you do that with a graph calculator.

Elmar Moelzer
04-09-2003, 06:01 PM
Hello Titof
The problem is that there is NO procedural object- class in LWs SDK. So this cant be done right now. There is a workaround using a volumetric handler for rendering, but it is not the same...
Once there is a procedural object class in Layout it will be easy to do such a plugin and more...
CU
Elmar

titof
04-09-2003, 06:06 PM
Thanks for the reply,

I urge LW devel. to get a procedural class then :) !!!
That'd be so nice. Also if it was available I'd be willing to send some time developping a pluggin for levelset rendering.

best,
JC

Elmar Moelzer
04-09-2003, 06:23 PM
Also if it was available I'd be willing to send some time developping a pluggin for levelset rendering.

Welcome to the club ;-)
CU
Elmar

titof
04-10-2003, 01:31 PM
Thanks for the replies,

I hope this will be added in another version...

regards,
JC

Sensei
04-10-2003, 06:48 PM
Originally posted by titof
I hope this will be added in another version...

To be honest, I doubt it... They did not do it for 7 versions of LightWave and more than 10 years of developing, so chances to implement this (this is quite easy!) are very small. LightWave authors especially did very visible line between ray-tracing engine (Layout) and 3d geometry building part (Modeler).

Breaking this line would means that a lot of plug-in which at the moment have to cheat and use f.e. Pixel or ImageFilter class for it's work, like f.e. Sasquatch, will surely be rewitten using this new plug-in class. Probably obviously is this will slow down and eat more memory than now, but at least you will see hairs and furs on reflective and transparent objects...

For 3rd party developers there is a way for simulate this. You need to create plane of triangles or random sprayed not connected triangles in Modeler and use special written displacement plug-in which will analize this object and build correct target object... The more original object have triangles, the better result you will receive.

Elmar Moelzer
04-10-2003, 07:26 PM
Yes it has been demanded for a long time. I am not sure why the dev- team refused to do so, even though there have been studios like even D2 requesting this since at least v5.6.
Your workaround is interesting, but will not work for everything I am affraid. Well until it gets implemented there is still the workaround with the volumetrics (which also reflect, refract etc).
This is really a big limitation to LW (I would even call this a showstopper) and NT would do good by adding this.
The possibilities for new features would be unlimited:
New methods of SDS, procedural landscapes, subpixel- displacement etc, etc...
CU
Elmar

Panikos
04-10-2003, 09:28 PM
OGO_Taiki does Procedural Landscapes and objects, still is beta and slow.

Elmar Moelzer
04-11-2003, 04:38 AM
Hey Panikos!
I know that.
Ogo Taiki uses the volumetrics- workaround for that...
CU
Elmar

Lightwolf
04-11-2003, 06:01 AM
Originally posted by Elmar Moelzer
Ogo Taiki uses the volumetrics- workaround for that...

Another workaround is the combination of a custom object loader and a custom object replacement plugin.
The object replacement updates the procedural functions once per time slize and writes these to a file, then tells Layout to replace the current object with that file.
Layout attempts to open it, can't using the internal loaders and reverts to the custom object loader which in turn generates the geometry while "loading" the parameter file.
I think Treedruid uses a method like that. Allthough surfacing is a royal pain and LW carries around a huge load of polygons early in the render process.
I too have requested a procedural geometry creation class, especially if the geometry could be added very late in the rendering pipeline (now transformation of the geometry by LW, instead creation of the custom geometry in LWs target coordinate space).

Panikos
04-11-2003, 10:05 AM
hmmmm ...

Load the surfaced object
100% Morph it to an Object-Replacement geometry, as long as # of points and their order is the same.
Dunno if LW complains about this.

Elmar Moelzer
04-11-2003, 10:33 AM
as long as # of points and their order is the same.
Thats one of the problems...
No there is no way around a procedrual object- class. Also NT should try to make the work for 3rd- parties easier and not harder(by having them use stupid workarounds for problems that could be easily solved). I know of a few 3rd- party- developers who discontinued their product- line for LW because of NT not taking their SDK- requests serious. Maybe now that these developers have shown of their potential with other packages, someone at NT will reconsider...
CU
Elmar

Arnie Cachelin
04-11-2003, 01:09 PM
Rendering a surface defined by some function's 0 value (known as an implicit surface, BTW) is a perfect use for volumetric plugins. Indeed, this is exactly what hypervoxel surfaces are, although the function is not presented as such. Generating polygons to render such a surface is the 'workaround', since it generates only an approximate surface, which must generally be composed of vast numbers of polygons in order to get a good approximation. It is probably significantly more challenging to code a robust polygonal surface generator for an arbitrary function, than to make a volumetric surface renderer that simply ray-traces the surface... Elmar and Michael, you guys should both know this!
That said, Jules Blumenthal contributed a nice Graphics Gem (GG IV i think) for generating polygonal meshes from implicit surface functions. It can be a bit flaky, but would provide a decent start for someone making, say, a modeler implicit surface object generator, or a loader for layout.

Elmar Moelzer
04-11-2003, 06:25 PM
Hey Arnie, thanks for the reply! Great to see you are still around!
You are right in this part. But volumetrics are not the answer to everything(despite them being a bit slowish at times). You know that very well. First LWs SDK offers very limited tools to draw into the OpenGL so it is impossible to get a visible representation of acceptable quality with the volumetrics- approach (dont tell me to use te custom- object- handlers, they are a joke and they wont even use Layouts bounding- box- treshold once redraw gets slow). Once you really want to add tools like alternative SDS- methods, or procedurally generated objects (that users can actually interact with in OpenGL), or exploding objects without having to go into modeler first to cut them up etc, etc, you cant really do that with volumetrics either. You also cant dynamically add polygony to an object in Layout (and yes this can be usefull).
The object- replacement is not really a good solution, as it does only work on a full- frame- basis, which does not allow motionblur in example (despite other bad sideeffects).
You know very well, that others have been requesting this for ages (you know who). Yet I havent got any valid argument on why it has not been done yet.
Why cant you just give it to us?
I dont know what I can do to make it happen, despite begging and walking on everybodys nerves until it is done. If there is anything else I can do, tell me and I will do it...
Pleeeeaaaase (folds his hands, bows and then falls to his knees in a devote way) ;) give it to us!
CU
Elmar

Sensei
04-11-2003, 07:37 PM
Originally posted by Elmar Moelzer
I dont know what I can do to make it happen, despite begging and walking on everybodys nerves until it is done. If there is anything else I can do, tell me and I will do it...

Give $1,000,000.0 or similar gift to correct person :)

Panikos
04-11-2003, 07:55 PM
The simulation of Volumetrics in OpenGL is really hard, thats why currently HVoxels work as balls, and Viper shortens the distance between OpenGL and full render.

What I asked in a different thread is slightly different.
Let say I model in polygons a Cave, and instead of rendering the polygons, I want to fill this geometry with a volumetric texture (thick or thin). That would be cool =O9

Of course I can subdivide the cave, and use the points as HVoxels, but the two results wont be similar.

Lightwolf
04-14-2003, 10:37 AM
Originally posted by Arnie Cachelin
Generating polygons to render such a surface is the 'workaround', since it generates only an approximate surface, which must generally be composed of vast numbers of polygons in order to get a good approximation. It is probably significantly more challenging to code a robust polygonal surface generator for an arbitrary function, than to make a volumetric surface renderer that simply ray-traces the surface... Elmar and Michael, you guys should both know this!

Hi Arnie,
we do :-)
However, generating polygons might be harder to do, but is faster to render and probably tighter integrated in to the current LW rendering engine. And once I get to the point of comparing a highly optimized polygon generator with a highly optimized volumetric renderer, I'm not sure which is easier to do :) .
If I want volumetrics to self shadow/reflect/refract, I have to take care of that manually.
I have to completely rewrite the surface editor for a volumetric plugin to give the use the same level of control he has with polygons.
There are a couple of those caveats in the SDK, but I'm sure you've had the feedback from developers and the appropriate ML.
Like:
I want my surff->evaluate(LWSurfaceID, LWShaderAccess *); now ! ;)

Cheers,
Mike