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

John Carlson yottzumm at gmail.com
Sun Apr 21 17:07:51 PDT 2024


I think the issue with the Sphere in the BoundedPhysicsModel in
view3dscene may actually be the Sphere in the ParticleSystem.  Try it and
see.

I've made a bit of progress in FreeWRL, at least using a Shape instead of a
Particle System works now.

Included are files that don't require local shaders or images.

If you flip the Particle System with a Shape tag, you can get an idea of
what's happening.

Remember to enable your own ComposedShader!

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/20240421/0a710ab6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fwparticleflowers.x3d
Type: application/octet-stream
Size: 4500 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20240421/0a710ab6/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: particleflowers.x3d
Type: application/octet-stream
Size: 6277 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20240421/0a710ab6/attachment-0003.obj>


More information about the x3d-public mailing list