[x3d-public] Your mission, should you choose to accept it. ComposedShader+ParticleSystem

John Carlson yottzumm at gmail.com
Mon Apr 22 13:40:31 PDT 2024


Woohoo!

$ npx sunrize
https://coderextreme.net/X3DJSONLD/src/main/data/particleflowers.x3d

Now to think about animating individual flowers! Here are the fields to the
Shader:

                  <field name='a' type='SFFloat' accessType='inputOutput'
value='2'></field>
                  <field name='b' type='SFFloat' accessType='inputOutput'
value='1'></field>
                  <field name='c' type='SFFloat' accessType='inputOutput'
value='5'></field>
                  <field name='d' type='SFFloat' accessType='inputOutput'
value='5'></field>
                  <field name='tdelta' type='SFFloat'
accessType='inputOutput' value='0'></field>
                  <field name='pdelta' type='SFFloat'
accessType='inputOutput' value='0'></field>

I want different values for each instance, and I want them animated over
time.

My guess is to do randomness in the shader (Thanks Holger!).

John

On Sun, Apr 21, 2024 at 12:32 PM John Carlson <yottzumm at gmail.com> wrote:

> Michalis, Holger, Doug, Don,
>
> On the tails of Holger's message about GPU instancing...
>
> It's easier to send email to you all rather than filing a report on your
> websites.
>
> I'd like to get a fairly simple Particle System working with a
> ComposedShader (different for each of you).
>
> I am attaching the .x3d file and the shaders.
>
> I've gotten the ComposedShader working for a single sphere for each of
> your systems, but getting it working with a Particle System and
> ComposedShader seems difficult.
>
> I've gotten the Particle System working in sunrize.
>
> There's a Problem with BoundedPhysicsModel geometry in view3dscene.
>
> Don,
>
> CommandLine doesn't validate the scene AFAICT.
>
> $ java -cp ~/Downloads/X3DJSAIL.4.0.full.jar
> org.web3d.x3d.jsail.CommandLine -validate `pwd`/particleflowers.x3d
> CommandLine parameter: "-validate" for model validation
> parameter: source file particleflowers.x3d filesize 6208 bytes
> Parsing using Document Object Model (DOM) based X3DLoaderDOM...
> [error] X3DLoaderDOM: Incorrectly handled X3DJSAIL object construction,
> current elementObject=BoundedPhysicsModel (BoundedPhysicsModel),
> child="Sphere", containerField="geometry", java.lang.ClassCastException:
> class org.web3d.x3d.jsail.ParticleSystems.BoundedPhysicsModel cannot be
> cast to class org.web3d.x3d.jsail.Shape.Shape
> (org.web3d.x3d.jsail.ParticleSystems.BoundedPhysicsModel and
> org.web3d.x3d.jsail.Shape.Shape are in unnamed module of loader 'app')
>     This error can be caused by incorrect parent-child node relationships
> or incorrect containerField values.
>     X3D node typing is strict, check or validate your scene graph!
>     This error can also be caused by X3DLoaderDOM DOM omissions in
> X3DJSAIL. Please report mysterious problems, thank you.
>
> java.lang.ClassCastException: class
> org.web3d.x3d.jsail.ParticleSystems.BoundedPhysicsModel cannot be cast to
> class org.web3d.x3d.jsail.Shape.Shape
> (org.web3d.x3d.jsail.ParticleSystems.BoundedPhysicsModel and
> org.web3d.x3d.jsail.Shape.Shape are in unnamed module of loader 'app')
>         at
> org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:972)
>         at
> org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:619)
>         at
> org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:619)
>         at
> org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:619)
>         at
> org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:619)
>         at
> org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:490)
>         at
> org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:453)
>         at
> org.web3d.x3d.jsail.X3DLoaderDOM.loadModelFromFileX3D(X3DLoaderDOM.java:247)
>         at
> org.web3d.x3d.jsail.X3DLoaderDOM.loadModelFromFileX3D(X3DLoaderDOM.java:231)
>         at
> org.web3d.x3d.jsail.X3DLoaderDOM.loadModelFromFileX3D(X3DLoaderDOM.java:205)
>         at org.web3d.x3d.jsail.CommandLine.run(CommandLine.java:922)
>         at org.web3d.x3d.jsail.CommandLine.main(CommandLine.java:242)
> [error] X3DLoaderDOM: Parent-child node relationship not found! (parent
> ParticleSystem, child BoundedPhysicsModel, containerField='physics') Please
> report this problem to brutzman at nps.edu
>
> Interesting challenge!
>
> Thanks,
>
> John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20240422/7ef450a6/attachment.html>


More information about the x3d-public mailing list