Skip to content

Build a fluid block from a moving emitter #262

Answered by janbender
ssungho98 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

This won't work since "scene" just contains the data from the scene file. This is read once at the start of the simulator and then the simulation is initialized. Modifying this data afterwards has no effect.

You have to modify the emitter directly. Each FluidModel (you can get it from the Simulation) has an emitter system (fluidModel.getEmitterSystem()). Each emitter system has some emitters (getEmitters()). If you have the emitter, you can call setPosition().

See also:
https://github.com/InteractiveComputerGraphics/SPlisHSPlasH/blob/master/pySPlisHSPlasH/EmitterModule.cpp#L18

Hope that helps.

Replies: 4 comments 7 replies

Comment options

You must be logged in to vote
2 replies
@ssungho98
Comment options

@ssungho98
Comment options

Comment options

You must be logged in to vote
1 reply
@ssungho98
Comment options

Comment options

You must be logged in to vote
1 reply
@ssungho98
Comment options

Answer selected by ssungho98
Comment options

You must be logged in to vote
3 replies
@ssungho98
Comment options

@ssungho98
Comment options

@janbender
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants