Ok! Got it. You can find procedure below. It will convert meshes into fog volumes.
OP_ERROR SOPNODE::cookMySop( OP_Context &context_ )
{
if( lockInputs( context_ ) >= UT_ERROR_ABORT )
{
return error();
}
duplicateSource( 0, context_ );
UT_BoundingBox bbox;
GU_SDFParms sdfParms;
GU_SDF sdf;
gdp->getBBox( &bbox );
sdfParms.setMode( GU_SDFParms::RAY_INTERSECT );
sdfParms.setDivisions( 100, 100, 100 );
sdfParms.setBBox( bbox );
sdfParms.setLaserScan( true );
sdfParms.setFixSigns( true );
sdfParms.setSweepCount( 3 );
sdfParms.setSweepThreshold( 2.0f );
sdf.build( gdp, sdfParms );
gdp->clearAndDestroy();
GU_PrimVolume *volumePtr = (GU_PrimVolume *)GU_PrimVolume::build( gdp );
UT_VoxelArrayIteratorF vit;
vit.setArray( sdf.getFunction() );
for( vit.rewind(); !vit.atEnd(); vit.advance() )
{
vit.setValue( vit.getValue() <= 0.0f ? 1.0f : 0.0f );
}
volumePtr->setVoxels( sdf.getFunction() );
unlockInputs();
return error();
}
Found 10 posts.
Search results Show results as topic list.
Technical Discussion » Generate voxel volume of mesh (HDK)
- alinakipoglu
- 10 posts
- Offline
Technical Discussion » Generate voxel volume of mesh (HDK)
- alinakipoglu
- 10 posts
- Offline
Technical Discussion » Generate voxel volume of mesh (HDK)
- alinakipoglu
- 10 posts
- Offline
Technical Discussion » VRAY Procedural on Mac
- alinakipoglu
- 10 posts
- Offline
Technical Discussion » Generate voxel volume of mesh (HDK)
- alinakipoglu
- 10 posts
- Offline
Im trying to generate volumes from geometry inputs. Is there a way to achieve this goal using HDK?.
I tried using GU_SDF and i posted my process on separate topic. The docs for it lacks any walk through and i got stuck.
Is there any one can point me to right direction?
Any suggestions?
I tried using GU_SDF and i posted my process on separate topic. The docs for it lacks any walk through and i got stuck.
Is there any one can point me to right direction?
Any suggestions?
Technical Discussion » GU_SDF
- alinakipoglu
- 10 posts
- Offline
Hi,
Im using GU_SDF to build SDF's from files. Whenever i try, i get a box as a result.
[imageshack.us]
[imageshack.us]
// Class to pass volume created via SDF
class VRAY_VolumeBuilder: public VRAY_Volume
{
public:
VRAY_VolumeBuilder( GU_SDF_REF sdfRef_, UT_BoundingBox bbox_ );
~VRAY_VolumeBuilder();
public:
virtual void getBoxes( UT_RefArray<UT_BoundingBox> &boxes, float radius, float dbound, float zerothreshold ) const;
virtual void getAttributeBinding( UT_StringArray &names, UT_IntArray &sizes ) const;
virtual void evaluate( const UT_Vector3 &pos, const UT_Filter &filter, float radius, float time, int idx, float *data ) const;
virtual UT_Vector3 gradient( const UT_Vector3 &pos, const UT_Filter &filter, float radius, float time, int idx ) const;
protected:
GU_SDF_REF sdfRef;
UT_BoundingBox bbox;
};
VRAY_VolumeBuilder::VRAY_VolumeBuilder( GU_SDF_REF sdfRef_, UT_BoundingBox bbox_ )
:sdfRef( sdfRef_ )
,bbox( bbox_ )
{}
VRAY_VolumeBuilder::~VRAY_VolumeBuilder()
{}
void VRAY_VolumeBuilder::getBoxes( UT_RefArray<UT_BoundingBox> &boxes, float radius, float dbound, float zerothreshold ) const
{
boxes.append( bbox );
}
void VRAY_VolumeBuilder::getAttributeBinding( UT_StringArray &names, UT_IntArray &sizes ) const
{
names.append( “density” );
}
void VRAY_VolumeBuilder::evaluate( const UT_Vector3 &pos, const UT_Filter &filter, float radius, float time, int idx, float *data ) const
{
data = sdfRef->getFunction()->evaluate( pos, filter, radius );
}
UT_Vector3 VRAY_VolumeBuilder::gradient( const UT_Vector3 &pos, const UT_Filter &filter, float radius, float time, int idx ) const
{
return sdfRef->getGradient( pos );
}
// Inside VRAY Procedural Render Method
GU_SDF_REF sdfRef( new GU_SDF() );
GU_SDFParms sdfParameters;
sdfParameters.setMode( GU_SDFParms::RAY_INTERSECT );
sdfParameters.setLaserScan( true );
sdfParameters.setFixSigns( true );
sdfParameters.setSweepCount( 3 );
sdfParameters.setSweepThreshold( 2.0f );
sdfParameters.setDivisions( 100, 100, 100 );
sdfParameters.setBBox( bbox );
sdfRef->build( gu, sdfParameters );
openVolumeObject();
addVolume( new VRAY_VolumeBuilder( sdfRef, bbox ), cameraShutter );
closeObject();
Im using GU_SDF to build SDF's from files. Whenever i try, i get a box as a result.
[imageshack.us]
[imageshack.us]
// Class to pass volume created via SDF
class VRAY_VolumeBuilder: public VRAY_Volume
{
public:
VRAY_VolumeBuilder( GU_SDF_REF sdfRef_, UT_BoundingBox bbox_ );
~VRAY_VolumeBuilder();
public:
virtual void getBoxes( UT_RefArray<UT_BoundingBox> &boxes, float radius, float dbound, float zerothreshold ) const;
virtual void getAttributeBinding( UT_StringArray &names, UT_IntArray &sizes ) const;
virtual void evaluate( const UT_Vector3 &pos, const UT_Filter &filter, float radius, float time, int idx, float *data ) const;
virtual UT_Vector3 gradient( const UT_Vector3 &pos, const UT_Filter &filter, float radius, float time, int idx ) const;
protected:
GU_SDF_REF sdfRef;
UT_BoundingBox bbox;
};
VRAY_VolumeBuilder::VRAY_VolumeBuilder( GU_SDF_REF sdfRef_, UT_BoundingBox bbox_ )
:sdfRef( sdfRef_ )
,bbox( bbox_ )
{}
VRAY_VolumeBuilder::~VRAY_VolumeBuilder()
{}
void VRAY_VolumeBuilder::getBoxes( UT_RefArray<UT_BoundingBox> &boxes, float radius, float dbound, float zerothreshold ) const
{
boxes.append( bbox );
}
void VRAY_VolumeBuilder::getAttributeBinding( UT_StringArray &names, UT_IntArray &sizes ) const
{
names.append( “density” );
}
void VRAY_VolumeBuilder::evaluate( const UT_Vector3 &pos, const UT_Filter &filter, float radius, float time, int idx, float *data ) const
{
data = sdfRef->getFunction()->evaluate( pos, filter, radius );
}
UT_Vector3 VRAY_VolumeBuilder::gradient( const UT_Vector3 &pos, const UT_Filter &filter, float radius, float time, int idx ) const
{
return sdfRef->getGradient( pos );
}
// Inside VRAY Procedural Render Method
GU_SDF_REF sdfRef( new GU_SDF() );
GU_SDFParms sdfParameters;
sdfParameters.setMode( GU_SDFParms::RAY_INTERSECT );
sdfParameters.setLaserScan( true );
sdfParameters.setFixSigns( true );
sdfParameters.setSweepCount( 3 );
sdfParameters.setSweepThreshold( 2.0f );
sdfParameters.setDivisions( 100, 100, 100 );
sdfParameters.setBBox( bbox );
sdfRef->build( gu, sdfParameters );
openVolumeObject();
addVolume( new VRAY_VolumeBuilder( sdfRef, bbox ), cameraShutter );
closeObject();
Technical Discussion » VRAY Procedural on Mac
- alinakipoglu
- 10 posts
- Offline
Technical Discussion » VRAY Procedural on Mac
- alinakipoglu
- 10 posts
- Offline
Hi,
Im trying to test VRAY Procedural samples but they are not working. Im getting nothing rendered and i get no error message.
I compiled DemoBox example and moved it into /Users/alinakipoglu/Library/Preferences/houdini/12.1/dso/mantra/VRAY_DemoBox.dylib
I also have VRAYProcedural File located as
/Users/alinakipoglu/Library/Preferences/houdini/12.1/VRAYProcedural
With demobox DSO_FILE(VRAY_DemoBox) line defined.
I created an Otl with File -> New Operator Type -> Shop Type -> Geometry Shader / Procedural Shader with demobox set in Operator Name, Operator Label and Otl name in library path /Users/alinakipoglu/houdini12.1/otls/demobox.otl
Im adding an empty geo with demobox procedural shader set on render/geometry/procedural shader parameter.
When i check loaded procedurals with manta -V4 i get demobox loaded.
I double checked everything but it seems im missing something here.
Im trying to test VRAY Procedural samples but they are not working. Im getting nothing rendered and i get no error message.
I compiled DemoBox example and moved it into /Users/alinakipoglu/Library/Preferences/houdini/12.1/dso/mantra/VRAY_DemoBox.dylib
I also have VRAYProcedural File located as
/Users/alinakipoglu/Library/Preferences/houdini/12.1/VRAYProcedural
With demobox DSO_FILE(VRAY_DemoBox) line defined.
I created an Otl with File -> New Operator Type -> Shop Type -> Geometry Shader / Procedural Shader with demobox set in Operator Name, Operator Label and Otl name in library path /Users/alinakipoglu/houdini12.1/otls/demobox.otl
Im adding an empty geo with demobox procedural shader set on render/geometry/procedural shader parameter.
When i check loaded procedurals with manta -V4 i get demobox loaded.
I double checked everything but it seems im missing something here.
Technical Discussion » Bad node type found: PRT_ROPDriver
- alinakipoglu
- 10 posts
- Offline
Hi,
Just recently i developed a ROP plugin for exporting Krakatoa PRT files from Houdini. After a successful compilation and installation via hcustom tool i'm using it without any problem. But if i submit a job from Deadline i get
Bad node type found: PRT_ROPDriver
warning thrown from hython. After this warning hython stopping process any thing related to my plugin.
Im submitting this job only on my machine. I tried setting environment variables, copying plugin files to $HIP/dso.
Any idea/suggestion about whats happening here?
Thank you!
Just recently i developed a ROP plugin for exporting Krakatoa PRT files from Houdini. After a successful compilation and installation via hcustom tool i'm using it without any problem. But if i submit a job from Deadline i get
Bad node type found: PRT_ROPDriver
warning thrown from hython. After this warning hython stopping process any thing related to my plugin.
Im submitting this job only on my machine. I tried setting environment variables, copying plugin files to $HIP/dso.
Any idea/suggestion about whats happening here?
Thank you!
Technical Discussion » Import Point Clouds To Houdini
- alinakipoglu
- 10 posts
- Offline
Hi,
Im using Openframeworks / Cinder to develop an application running with MS Kinect. I want to be able to process point clouds in Houdini. My plan is to export each frame and use them in Houdini geometry importer.
My workflow is very similar to this project, but they used Max afaik.
http://vimeo.com/38840688 [vimeo.com]
What would be the file format for this kind of process? Currently im able to export in Ply and Obj format.
Any suggestion to convert these point clouds into particles?
Thank you!
Im using Openframeworks / Cinder to develop an application running with MS Kinect. I want to be able to process point clouds in Houdini. My plan is to export each frame and use them in Houdini geometry importer.
My workflow is very similar to this project, but they used Max afaik.
http://vimeo.com/38840688 [vimeo.com]
What would be the file format for this kind of process? Currently im able to export in Ply and Obj format.
Any suggestion to convert these point clouds into particles?
Thank you!
-
- Quick Links