DiscreteLodNode fade between children?

Has anybody done work on fading between children of a DiscreteLodNode?



It seems straightforward (everything seems easy when you only know a little bit of the engine…) and I would like to have that feature, if nobody else has already done it.

Fading in what sense? Alpha-based fading can be easily added, but I am not sure how good would it look in an actual scene.

I'm thinking of fading between two very similar looking child meshes.  Then, at a distance, instead of POPping between children, it will fade, which seems like it would be nicer on the eyes.



Although there is also AutoClodMesh, which may do the job.



And thinking about it, I may want both.  There are thousands of stars to fly through and when you get within a hundred million kilometers or so, I want to start to see the star grow in size.  So for most of the time, stars are just points, but then need to switch (fading would be nicer) to a sphere/disk plus some kind of glow effect.  Same for planets once you're close enough.



So discrete LOD plus fading for stars and planets at a distance, and AutoClodMesh for close in with planets sounds like a start.

What kind of fading?  Are you thinking of alpha, gradually transforming one mesh into another or something else?

I can tell you that changing one mesh into another without looking extremely weird will be difficult.

Just alpha-fading, at a distance, so it's not very noticeable.  Reverse mesh decimation is not something I want to tackle.  I'll leave that kind of stuff up to the master's and doctor's thesis people, and just read their papers. :slight_smile:

The problem with that approach is that, to a certain extent, it beats the purpose of the LOD… You would have two meshes instead of only one, and with the added complexity of the alpha blending… Perhaps it would look nice at close distances, but it certainly not be worth it at long range.

At this point I'm not going to do the fading between nodes, I think I have a good solution.  It's good and bad that I'm slow at this and don't get to spend much time on it.  Good that I didn't implement something that maybe wouldn't be worth the time, bad that I have only gotten a little way.



I got distracted with another part, but I'm almost back to this and what I plan to do is use AutoClodMesh for the planets/stars as they come into visual range.  When they're out of range, they are just like a particle in a particle system, which seems to be pretty efficient.  At a certain distance, I'll load the actual model in place kind of like what llama is doing on the terrain project.  Then only a few models (of stars/planets/moons at least) will be in visual range and won't slow things down.



So I won't be using DiscreteLODNode, but my own version of LOD.

ALTHOUGH…



Maybe instead of fading between nodes, it would be possible to dynamically create a trimesh that was an average of the differences of two trimeshes.



With this you could create 2 levels of a model, one with a very low number of polygons the other with a higher count.  With the end goal a smooth transition between the 2.



I know that this could be done by CLOD, however the model requirements for being able to utilize a CLOD node seem to be pretty stringent.

Can you not just take a cam view of the mesh before its adjusted of LOD- render it to a quad, postion the quad and align it in front of the real mesh, and then fade that quad out to reveal the real mesh behind.

theprism said:

Can you not just take a cam view of the mesh before its adjusted of LOD- render it to a quad, postion the quad and align it in front of the real mesh, and then fade that quad out to reveal the real mesh behind.


That sounds like an impostor node (there is a demo of one).  That's an idea to consider.