Particle Info Node (for BI) is not working #46333

Closed
opened 2015-09-30 19:07:56 +02:00 by Thomas Beck · 21 comments
Member

Hi Alexander,

added you because you are the original author, @Psy-Fi because he committed it and reworked some parts (afaik)

System Information
Ubuntu 64, i7, 2* GTX 560 ti oc 2GB, 16GB RAM

Blender Version
Newest master (de360c4)

Short description of error
I tried the new "particle info node" out that is available for the BI renderer this release - but it's not working as intended. It seems as if it does not deliver the current particle age

Exact steps for others to reproduce the error
Open the attached file ( ParticleInfo_Bug.blend ) and Shift+Z, you should see some new born particles in black while the older ones get more and more white...

Greetings,
Thomas

Hi Alexander, added you because you are the original author, @Psy-Fi because he committed it and reworked some parts (afaik) **System Information** Ubuntu 64, i7, 2* GTX 560 ti oc 2GB, 16GB RAM **Blender Version** Newest master (de360c4) **Short description of error** I tried the new "particle info node" out that is available for the BI renderer this release - but it's not working as intended. It seems as if it does not deliver the current particle age **Exact steps for others to reproduce the error** Open the attached file ( [ParticleInfo_Bug.blend](https://archive.blender.org/developer/F241170/ParticleInfo_Bug.blend) ) and Shift+Z, you should see some new born particles in black while the older ones get more and more white... Greetings, Thomas
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Alexander Romanov was assigned by Thomas Beck 2015-09-30 19:07:56 +02:00
Author
Member

Added subscribers: @plasmasolutions, @Psy-Fi

Added subscribers: @plasmasolutions, @Psy-Fi

I tried on Intel HD4000. It seems to me that something happened with Material Node. I just tried to mute ("M") material node and saw rght result. Even if you remove all the nodes except the Output, and Material, all particles are black. Will try it tomorrow with nvidia.

I tried on Intel HD4000. It seems to me that something happened with Material Node. I just tried to mute ("M") material node and saw rght result. Even if you remove all the nodes except the Output, and Material, all particles are black. Will try it tomorrow with nvidia.

Confirm bug on nvidia, but the behavior different from what observed on intel HD4000.

Tested on Ubuntu 14.04

NVIDIA BI - 0
NVIDIA Viewport(GLSL) - 1
Intel Hd4000 BI - 1
Intel Hd4000 Viewport(GLSL) - 0

0 - ok, 1 - bad

Confirm bug on nvidia, but the behavior different from what observed on intel HD4000. Tested on Ubuntu 14.04 NVIDIA BI - 0 NVIDIA Viewport(GLSL) - 1 Intel Hd4000 BI - 1 Intel Hd4000 Viewport(GLSL) - 0 0 - ok, 1 - bad
Author
Member

Hi Alexander,
for me it's always "bad" - no matter if the viewport is rendering the scene or the rendering has been started via F12. Even if I delete the material node and only use a color ramp plugged directly into the output, the behaviour persists...

Hi Alexander, for me it's always "bad" - no matter if the viewport is rendering the scene or the rendering has been started via F12. Even if I delete the material node and only use a color ramp plugged directly into the output, the behaviour persists...

Added subscriber: @zeauro

Added subscriber: @zeauro

There is no lamp in .blend.
But a shadeless material is showiing something into 3D view with a material display.
It should be the same for render. But render stays black.

It looks like without nodes. Dupli option for mapping from parent is still working.
So, inability to render particles into different colors seems to be specific to the node.

There is no lamp in .blend. But a shadeless material is showiing something into 3D view with a material display. It should be the same for render. But render stays black. It looks like without nodes. Dupli option for mapping from parent is still working. So, inability to render particles into different colors seems to be specific to the node.
Author
Member

@zeauro Ronan, there does not need to be a lamp - the world is using "ambient occlusion" with "Add" - so that's our lamp.

@zeauro Ronan, there does not need to be a lamp - the world is using "ambient occlusion" with "Add" - so that's our lamp.

Added subscriber: @ideasman42

Added subscriber: @ideasman42

This issue partially related to fix for #46194. Git bisect led me to it. Fix for #46194 breaks BI render when use no Material node (linking directly to Output node). There was crash when obi->index was greater then psys->totpart. This condition means that the child particles are used. But psys->child is NULL. @ideasman42 could you help?

This issue partially related to fix for #46194. Git bisect led me to it. Fix for #46194 breaks BI render when use no Material node (linking directly to Output node). There was crash when obi->index was greater then psys->totpart. This condition means that the child particles are used. But psys->child is NULL. @ideasman42 could you help?

Well, you can't see anything in Material Viewport shading without an illumination from lamp or material.

Well, you can't see anything in Material Viewport shading without an illumination from lamp or material.
Author
Member

@zeauro, Please, this is no forum, we try to locate the bug here... your posts don't help in processing the bug and are irrelevant for actual problem. We're rendering here and are not previewing anything.
@AlexanderRomanov Let's wait for @ideasman42 then...

@zeauro, Please, this is no forum, we try to locate the bug here... your posts don't help in processing the bug and are irrelevant for actual problem. We're rendering here and are not previewing anything. @AlexanderRomanov Let's wait for @ideasman42 then...

Here is the patch that fixes BI when using Output node without Material node. It also prevents the crashes mentioned in #46194.
But it has the exceptional case which is not clear to me. if (psys->child)....

fix_T46194.patch

Here is the patch that fixes BI when using Output node without Material node. It also prevents the crashes mentioned in #46194. But it has the exceptional case which is not clear to me. `if (psys->child)...`. [fix_T46194.patch](https://archive.blender.org/developer/F241415/fix_T46194.patch)

@thomas-40 Beck. My comment was relevant.
Particle node is new for BI and BGE. Knowing that it is working for viewport and not render is a different info that a node which does not work at all.

@thomas-40 Beck. My comment was relevant. Particle node is new for BI and BGE. Knowing that it is working for viewport and not render is a different info that a node which does not work at all.

In #46333#338839, @AlexanderRomanov wrote:
Here is the patch that fixes BI when using Output node without Material node. It also prevents the crashes mentioned in #46194.
But it has the exceptional case which is not clear to me. if (psys->child)....

fix_T46194.patch

With the Material node the patch works too (checked on NVIDIA)

> In #46333#338839, @AlexanderRomanov wrote: > Here is the patch that fixes BI when using Output node without Material node. It also prevents the crashes mentioned in #46194. > But it has the exceptional case which is not clear to me. `if (psys->child)...`. > > [fix_T46194.patch](https://archive.blender.org/developer/F241415/fix_T46194.patch) With the Material node the patch works too (checked on NVIDIA)
Author
Member

Hi Alex, just checked the file on my machine with your patch. Everything seems to work fine.

Hi Alex, just checked the file on my machine with your patch. Everything seems to work fine.

Checked the patch and it restores old behavior and doesn't crash with #46194
but there are some confusing things going on here.

  • ObjectInstanceRen.psysindex starts at 1, where 0 means there is no particle system. So changing the code to start looking at 0 just makes duplis (any non particle duplicator) pick the first particle system.
  • if (obi->psysindex >= 0) { is a redundant nop check, normally harmless - but in this case misleading since it hints that -1 is used, when its not.
  • RE_addRenderInstance's psysindex arg, is an index from obi->ob->particlesystem, used to access a different list (obi->par->particlesystem).

From what I can tell this is working by accident, all duplis just pick the first particle system.

@AlexanderRomanov / @Psy-Fi, is this whats expected or am I missing something?


Note, a slightly modified fix with comments to avoid future confusion: fix_T46333_alt.diff

Checked the patch and it restores old behavior and doesn't crash with #46194 but there are some confusing things going on here. - `ObjectInstanceRen.psysindex` starts at 1, where 0 means there is no particle system. So changing the code to start looking at 0 just makes duplis (any non particle duplicator) pick the first particle system. - `if (obi->psysindex >= 0) {` is a redundant nop check, normally harmless - but in this case misleading since it hints that `-1` is used, when its not. - `RE_addRenderInstance`'s `psysindex` arg, is an index from `obi->ob->particlesystem`, used to access a different list (`obi->par->particlesystem`). From what I can tell this is working by accident, all duplis just pick the first particle system. @AlexanderRomanov / @Psy-Fi, is this whats expected or am I missing something? ---- Note, a slightly modified fix with comments to avoid future confusion: [fix_T46333_alt.diff](https://archive.blender.org/developer/F242220/fix_T46333_alt.diff)

it seems I was wrong in my understanding. I attach аnother patch where the particle system is taken from the DupliObject. Now multiple particle systems works for me. Check, please.
[EDITED] Patch updated: particle_info_bi_bugfix.diff

it seems I was wrong in my understanding. I attach аnother patch where the particle system is taken from the DupliObject. Now multiple particle systems works for me. Check, please. [EDITED] Patch updated: [particle_info_bi_bugfix.diff](https://archive.blender.org/developer/F242347/particle_info_bi_bugfix.diff)

This issue was referenced by 90b925f76d

This issue was referenced by 90b925f76d88760e6533611171db24e6a390faab

@AlexanderRomanov, thanks for investigating and finding the correct solution. Tested and works well here, on this report and #46194.

@AlexanderRomanov, thanks for investigating and finding the correct solution. Tested and works well here, on this report and #46194.

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
5 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blender/blender#46333
No description provided.