View Full Version : Adaptive mesh refinement

10-21-2003, 01:30 AM
Hi all.
I have been a user of lightwave since 4.0, and I have consecutively worked with Lightscape for a long time. Now for you who know lightscape, you probably know that this renderer from the stone age can still kick lightwave's behind when it comes to interior renders of buildings, but only for a specific use. You also know then that Lightscape is discontinued and no honest proper replacement is available for it. You also then know that Lightwave does no longer accept the imported Lightscape meshes and that lightscape is, pretty much, really CRAP to use.

I have been fooling around with Lightwave lately to try to simulate Lightscape's way of rendering. Now I understand that not a gazillion people will be in line for this, but there's a pretty decent lightscape crowd out there unsatisfied with 3ds Viz, and a lot of them already are familiar with lightwave.
I have gotten pretty far with imitating lightscape (and its blazing speed) in lightwave. You basically make a vertex map of your object, make sure no vertices are 'hidden' from light, and all geometry is nice and neat and never intersecting where there's no vertex. Then you add a vertex map, and bake -> render radiosity with oh, 10 bounces, to the vertex map of the object. The only problem here is that Lightwave will not adaptively refine the mesh in large contrast areas as LightScape would. Which basically means tesselating the mesh of the object in places where it finds more contrast, to create more vertices, and thus create more detail.

Now like I said, maybe not a lot of people would be waiting for this, but you always do see test renders of radiosity of interiors and exteriors of buildings with products showoffs... wouldnt it be great to render things like that in 30 seconds instead of a couple of hours? Because that is honestly possible. You suffer accuracy, but if you can control the adaptive refinement parameters, you can get pretty close to real... Just take a look at lightscape's renders.

This would be a way to do this (my programming and 3d graphics engineering knowledge is pretty much none, but ill give it a try)...

Take an object without a vertex map. Add the Adaptive Resolution Baker, and select illumination. Preferable you could select an option to only bake the light that has already bounced once. Then you select the refinement options and so forth. Then you F9, and as soon as it hits the texture on which the baker is applied, LW will; calculate the first bounce into a vertex map it has added himself to the object. It will also make a tesselation of the object and evaluate the light differences between the added points and the exisiting. If the contrast is higher than a certain level, it will add that point. It will then calculate that mesh again (calculating radiosity 10 times for only the vertices of an object only costs a fraction of the time of even a single large entire polygon), and reevaluate. This way you will get refinements of areas of high detail and high contrast, and keep large spaced points on areas where there only is a slight fluctuation of indirect light.
Then that map would be saved as a special vertex map, the object would be restored to its original state, and the vertex map would be applied to the object with a special shader that can also accomodate the extra vertex positions.

Then when rendering, you turn off radisoity and only keep the direct light, and you have very accurate, per pixel raytraced shadows, refraction, reflection and so forth, have 10 bounce radiosity if you want, and have excellent results, which render super quick because its getting all its illumination data from a vertex map. Now of course this wont work with animated lights. However, animated lights dont work with baking illumination in its current configuration either, but with this lightscape method you still get the moving direct light, eventhough the indirect will stay the same.

Now of course this is not completely how lightscape calculates its meshes. I dont know how hard it is to make an evaluation of which polygon in the field has the higher 'energy' rating at a certain point and then start emitting light from that point, so more render time is spent in areas with high energy than elsewhere (where it is needed), but if you add that, then you basically have 100% what lightscape does, and mafde a whole unhappy community alive again.... with just pretty simple tools...

I have added a lightscape render, which rendered in 4 minutes at 1600x1200, 10 AA passes (which are crapper than Lightwave's AA passes I might add). Calculating the solution (which you only do once) took about 20 minutes. I only made it myself, and I just did it up quick, but its shows the strength of the renderer allright, I believe. There are dozens of better renders to find on the net tho, I just know the rendertimes of this one.

Well, Ill go back to my wishing corner now...

10-21-2003, 03:38 AM
I'm a LS user since v2 and although I still use it for interiors, there is one big thing a LOT of people wont like progressive refinement. and that's the fact you'll have to model following strict rules to prevent artifacts. I'm using FormZ which has a superb booloean function so you can prevent "crossing" planes, but in other modellers this will not be that easy !!!

However I would like to make another suggestion. Rendering a scene with GI in LW goes a LOT faster if raytracing, reflections and refractions are OFF. Just take a full white scene with pure white background and you'll see what I mean. Projecting this result on ONLY the faces you SEE and find an algorhythm for reflections and refractions would not only speed up GI/RAD but would make it also suitable for animations...

10-21-2003, 08:01 AM
Th thing is, you wouldnt have to use the adaptive refinement, or progressive refinement whatever you want to call it. Lw still has the other radiosity options right? I dont have any problems modeling the way lightscape wants my objects to be, without intersecting planes. Its a chore in the beginning but results in better quality models anyway.

In my perspective LW is very close to being able to mimick the behavior of the LS way of rendering, and being so close in my perspective it wouldnt be so hard to make the next little step. Everyone already using LS would be happy with it, and Im sure you can think of a myriad other uses for it too.
Maybe making that 'superb' boolean function from formZ would be something that LW can use too... I mean, NT prouds itself on its capacity to produce the most advanced and complete polygon modeler out there... it might be interesting for them to put that in too. It sounds like a usefull tool.

10-23-2003, 02:40 AM
I agree that the combo of Lightscape radiosity with Lightwave everything else would be SUPERB. I was a user of Lightscape, and came to LW later, and was amazed at the so much faster radiosity in LS. But, LS could not do image bump maps, and their minimal procedural bumps were a joke. And of course, it was not a modeller. I had big dreams of using LS with LW, only to find it wouldn't work past LW 5.6...

But that adaptive radiosity mesh was truly a wonderful thing, spoiled me rotten, very easy to get beautiful results, observing some basic rules (yes, it does make a better model anyway). But I did crave something like the texturing possibilities of Lightwave. So it could never be a matter of modelling in LW and rendering in LS.

To include a Lightscape-like radiosity solution in Lightwave would be a real coup, IMHO., a brilliant move by Newtek. And it would solve the Baking issues that cause so any headaches, as the basic form of the solution was 'baked'.


10-29-2003, 07:05 PM
until lightwave continue to be a single module, cannot modify the numer of point of mesh (not in adaptive mode, subdivision is crap mode, good for animation, but not for this kind of remeshing)
this mean you cannot see this kind of features.

11-06-2003, 05:53 AM
Hi Illusory,

LS does work with lightwave... just look at my icon, its a LS mesh rendered in lightwave...

If you wanna know how, let me know. Ill explain.

11-06-2003, 01:53 PM
Yes, Exception, I very much would like to know!
I do know the plugin for exporting the LS solution back into LW doesn't work past LW 5.6, so how are you doing it?? In LW 7.5?

thanks for the offer of explanation!

01-07-2004, 01:40 AM
Can youpost or send me an email with the procedures to integrate LW and LS please?, please?.

That can be the holy grail of architectural renderings with Lightwave, I don't think that LW8 would have a faster or better way to do fast radiosity renders for interiors, let's wait and see.

Thanks in advance,


01-23-2004, 01:49 PM
Your email address is not available... I cant mail you...