Volumes Of Fun

Cubiquity functions
Page 1 of 1

Author:  fanari [ Tue Sep 12, 2017 11:51 pm ]
Post subject:  Cubiquity functions

hi, if its not secret,could you tell me where can i find the code behind this function of old ue4 Cubiquity (cuSculptTerrainVolume) pls

i wonder if its something special or just a metaball

called in Cubiquity.hpp like this

   void sculpt(const Vector<float>& brushPosition, float brushInnerRadius, float brushOuterRadius, float opacity)
         ::validate(cuSculptTerrainVolume(m_volumeHandle, brushPosition.x, brushPosition.y, brushPosition.z, brushInnerRadius, brushOuterRadius, opacity));

thx in adv

Author:  David Williams [ Wed Sep 13, 2017 10:01 pm ]
Post subject:  Re: Cubiquity functions

Hi, it is defined here:

https://bitbucket.org/volumesoffun/cubi ... yC.cpp-984

Which then leads to here:

https://bitbucket.org/volumesoffun/cubi ... tor.cpp-47

My memory is hazy, but as I recall the brush has a falloff so that it has a stronger effect near the center. When modifying the terrain, two obvious choices are either to multiply the current terrain value by the brush value of to add the brush value to the terrain value. These both had problems, and I ended up doing a convolution (or something similar?) between the brush and terrain. It worked pretty well for smooth editing but computing a convolution is very performance intensive.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group