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

Instances becomes transparent in geometry node #277

Open
HSDSZ opened this issue Mar 22, 2022 · 11 comments
Open

Instances becomes transparent in geometry node #277

HSDSZ opened this issue Mar 22, 2022 · 11 comments

Comments

@HSDSZ
Copy link

HSDSZ commented Mar 22, 2022

Malt version

Development-latest

Blender version

Blender 3.1

OS

Windows 11 64bits

Hardware info

Intel i5-9400F | 8 GB RAM | NVDIA GTX 1660 Ti

Issue description and reproduction steps

In eevee/cycles, the instances auto inherit the shader of original object
image

If I switch to Malt render engine, the instances become transparent even with set material node added

image

Can this be fixed from the MALT part?

Attachments

instances become transparent in geo node.zip

@pragma37
Copy link
Member

It's weird, because Blender reports the instances as instances of the Sphere object (which they are not) and the Sphere object mesh is empty.
I guess this is a bug on the Blender side? I'd need to take a more in-depth look.

In any case, you can workaround the issue with the Realize Instances node:
imagen

@HSDSZ
Copy link
Author

HSDSZ commented Mar 23, 2022

Realize instance works, but the number of triangles increases sharply. I found another work around by instance the whole collection instead of the object
image

@Kolupsy
Copy link
Collaborator

Kolupsy commented May 9, 2022

@pragma37 are you aware of the changes made to the API regarding geometry instancing in 3.0 + ? I dont quite understand it myself but in case you have not seen it already here is a link to the changes made in that area (scroll a bit down under 'Geometry Instancing') https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Python_API#Breaking_Changes

@pragma37
Copy link
Member

pragma37 commented May 10, 2022

@Kolupsy Seems likely related. Thank you, I'll take a look at it.

Edit: Nope, same issue. :(

@HSDSZ
Copy link
Author

HSDSZ commented May 26, 2022

With previous Malt version, instancing collection is still a workaround. If I use the latest development version, it does not work
image

image

Sample File.zip

@pragma37
Copy link
Member

🤦

I reverted the changes I made. Thank you for reporting.

@Kolupsy
Copy link
Collaborator

Kolupsy commented Jul 20, 2022

I reverted the changes I made. Thank you for reporting.

Instanced geometry is still not rendered by Malt. What is keeping this issue from being fixed?

@pragma37
Copy link
Member

I don't remember the details, but iirc there was no way to retrieve the actual mesh data.

The new API didn't fix that and actually introduced new issues.

@Kolupsy
Copy link
Collaborator

Kolupsy commented Jul 26, 2022

The text drawing is not getting positioned correctly for me, though.

Did you ask the Blender Developers about this? I think it would be pretty important to address this issue. I wanted to create a task on the Blender Dev Talk but I actually do not know all the details about this issue. Also I have come across another addon developer working on a custom render engine and they confirmed that they couldnt render instanced geometry in GN using their engine either

@pragma37
Copy link
Member

Did you ask the Blender Developers about this?

Not yet. I have to set a minimal reproduction script before that.

@Snowdaw
Copy link

Snowdaw commented Jul 20, 2024

In my test case the Circle object has geometry nodes that instances Cube.

In MaltRenderEngine.py around line 202

for instance in depsgraph.object_instances:
            if instance.instance_object:
                obj = instance.instance_object
                parent = instance.parent
                if is_f12 or (visible_display(obj) and visible_display(parent) and
                parent.visible_in_viewport_get(context.space_data)):
                    id = abs(instance.random_id) % (2**16)
                    add_object(instance.instance_object, instance.matrix_world, id)

When rendering Circle, the instance.instance_object is also Circle, when it should be Cube.

To fix this I added the object info node and checked the "As Instance" box which makes it behave correctly again.

Without:
image

With:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants