Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting particle emitter color range makes particles black #902

Open
iche033 opened this issue Sep 8, 2023 · 1 comment
Open

Setting particle emitter color range makes particles black #902

iche033 opened this issue Sep 8, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@iche033
Copy link
Contributor

iche033 commented Sep 8, 2023

Environment

  • OS Version:
  • Source or binary build? source, garden

Description

  • Expected behavior: Setting color range for particles affect particle color
  • Actual behavior: Particles always appear black

The Ogre2ParticleEmitter::SetColorRange function is working fine in the ign-rendering6 branch which is on ogre2.2. The gz-rendering7 branch is on ogre2.3. Looking at the ogre-next code base, I don't see many changes in the particle system between v2-2 and v2-3 branches. There haven't been any related changes in the Ogre2ParticleEmitter.cc as well. The bug might be coming from other parts of gz-rendering when we upgraded from ogre 2.2 to 2.3.

Steps to reproduce

Modify the particle_demo and change the line from"

areaEmitter->SetColorRangeImage(RESOURCE_PATH + "/smokecolors.png");

to

areaEmitter->SetColorRange(math::Color(1, 0, 0), math::Color(0, 1, 0));

The particles flowing upward from below the duck appear black instead of turning color from red to green

Output

particle_color_affector_bug

@jrutgeer
Copy link

jrutgeer commented Oct 17, 2023

There also is a (related?) issue with marker colors, see this post.

I can confirm on Harmonic (source built) with

libogre-next-2.3-dev
Versions: 
2.3.1-9osrf~jammy

that issuing following command spawns white marker:

gz service -s /marker --reqtype gz.msgs.Marker --reptype gz.msgs.Empty --req 'action:ADD_MODIFY, type:SPHERE, id:9, scale: {x: 0.2, y: 0.4, z: 1.2}, pose: {position: {x: 0.0, y: 0.0, z: 0.0},orientation{x:0,y:0,z:0,w:1}},materials:{ambient:{r:1,g:0,b:0,a:1},diffuse:{r:1,g:0,b:0,a:1},specular:{r:1,g:0,b:0,a:1},emissive:{r:1,g:0,b:0,a:1}},visibility:ALL' --timeout 3000

(EDIT: I had initially copy-pasted a wrong command; above is corrected.)

Identical command but Gazebo started with Ogre1 renders in color.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To do
Development

No branches or pull requests

2 participants