> 
> Probably a good time to revisit the big picture now that there’s more 
> familiarity with terminology:
> http://brlcad.org/wiki/Density_functions 
> <http://brlcad.org/wiki/Density_functions>
> http://brlcad.org/wiki/Material_and_Shader_Objects 
> <http://brlcad.org/wiki/Material_and_Shader_Objects>
> 
> Should we try to put our new density structure inside the .g database 
> directly? This can be delayed until things start working and we know how we 
> are gonna store our data but it would definitely kill two birds with one 
> stone.

After it’s working, that’s the next logical step.  Don’t want to scope-creep 
the complexity prematurely, but we will eventually want material objects 
defining the density (and other) material characteristics of an object (as a 
replacement for .density files and _DENSITY objects).

> If we let the user define a "base" density (lets say at the origin or 
> something) then 1 point would already mean a vector (from origin to that 
> point, forming a gradient). If we don't do it, then 0 points make no sense 
> since we would have no density information at all, right?

The point of 0 points (hah) first is just to make sure the full range is 
covered.  Someone will eventually figure out a way to set/delete/create 0 
points and the code should handle the edge case gracefully, sensibly.

I don’t think we want to create some implicit behavior that we’d have to 
document somewhere.  If there’s only one density point, it emanates outwards in 
all directions (i.e., a constant field).  That’s not unlike the current 
material ID value which sets the density.  The main consideration would be 
defining what does a density point outside the model means.

For 2 points, it’s a simple vector from one to the other (a basic gradient).

> I think we can already handle up to three vectors since it would mean 
> applying what we drafted in the examples I sent previously. Basically 
> calculating contributions and joining them (using average for now, more 
> complex methods in the future).

They can be handled only if the bounding volume does not contain any interior 
points.  If there are interior points, like your example of a rod with density 
going up/down, it’s going to be different (and that’s what was deferred for 
later, to not waste time on the most complex general case).

Cheers!
Sean


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to