Author Topic: <Solved> Making an "optional" bitmap that replaces on in the substance  (Read 2393 times)

Let be start by saying this worked perfectly the first time I tried it.  Now it's driving me crazy.

GOAL:

I want my substance to have a certain bitmap image built in, but I also want the user to be able to replace it if desired.

WHAT I DID:

1) I imported a picture from a file.
2) I also added a "Color Image Input" node
3) Then I added a Blend node using "Copy" blending mode

I published it and opened it in Substance Player.

RESULT 1:

It worked perfectly.  I saw my "included" image, and I also had the option to load my own.
When I loaded my own "custom" image, it overlaid the "included" one, exactly as desired.

Wow, it worked on the first try!  Woo hoo!!!

RESULT 2:

When working on other parts of the substance, my bitmap image quit working.
Now I cannot duplicate my original result.

Maybe it was because I accidentally had two Substance Player sessions running, and they sort of cross-pollinated.

Now what happens is I do not see the included image in Substance Player when I open the substance.
1) Open substance in Substance Player... included image is NOT displayed
2) Add a custom image... I see the custom image
3) If my custom image has an alpha layer, now I see my included image

In another test, I also added an opacity control, and if I decrease the opacity, I could see the underlying included image, but only after adding a custom image.


PLEA FOR HELP:

What am I doing wrong?
How can I duplicate my original success?


IMAGES:

1) My nodes
2) Substance Player after loading my substance - included image not visible
3) Substance Player after applying my "custom" image - displays both layers, like a blend node should

Included Image = Pliers
Custom Image = Rope with alpha channel
Last Edit: November 11, 2015, 01:04:49 am
Hobbyist
----------
Common "Help" suggestions:
- LOG FILE tips - https://forum.allegorithmic.com/index.php/topic,22451.0.html
- LICENSING issues https://www.allegorithmic.com/contact
- ATTACH files and pictures to posts: https://forum.allegorithmic.com/index.php/topic,23670.0.html

included images are in a .resources folder at the same place as your .sbs, and there's also a Resources folder within the .sbs file in the explorer widget. Are those folders there for your problematic file?

Also, make sure the bitmap is there within those folders.

Finally, have you tried just importing the image again?

Hi,

I attached a version of creating a custom image that I use. The color image input uses an expression for the VisibleIf field so that if the custom image button is set to false, then you don't see the input option.

Cheers,

Wes

Integrations Product Manager / Training
wes.mcdermott@allegorithmic.com
Twitter: The3DNinja

Thanks, Wes.

I tweaked mine to follow the model you provided; basically adding the Boolean operator to control my visibility.

It seems to be working now (fingers crossed).

I'm thinking the way I built it, it "always" needs the input bitmap.  But it's still odd, because even now, if I turn "Use custom image" On, I don't get the watermark on my 3D cube like I expected to.

I may ponder this a bit more, and if I gain any additional insight, I'll share it here.

But the main point is, "Thank You."  :)
Hobbyist
----------
Common "Help" suggestions:
- LOG FILE tips - https://forum.allegorithmic.com/index.php/topic,22451.0.html
- LICENSING issues https://www.allegorithmic.com/contact
- ATTACH files and pictures to posts: https://forum.allegorithmic.com/index.php/topic,23670.0.html

Thanks, Wes.

I tweaked mine to follow the model you provided; basically adding the Boolean operator to control my visibility.

It seems to be working now (fingers crossed).

I'm thinking the way I built it, it "always" needs the input bitmap.  But it's still odd, because even now, if I turn "Use custom image" On, I don't get the watermark on my 3D cube like I expected to.

I may ponder this a bit more, and if I gain any additional insight, I'll share it here.

But the main point is, "Thank You."  :)

No problem : ) Very happy to help. Let me know about the watermark. I'm not sure why you would get a watermark.

Cheers,
Wes
Integrations Product Manager / Training
wes.mcdermott@allegorithmic.com
Twitter: The3DNinja

Let me know about the watermark. I'm not sure why you would get a watermark.

When I built it "wrong" I would get the "Add an image" (or something to that effect) watermark all over the cube in Substance Player.  I'm still not entirely sure why my "wrong" way behaved exactly the way it did, but I'm happy it's working fine following your example.  I forgot about that little mystery.  Maybe I'll research it some more (for my own understanding).  No promises, but if I do, I'll share my discoveries here.

BOTTOM LINE:  After re-building my logic following your example, it's working fine.

I have a few enhancements I plan to make, but here is the whiteboard...
https://share.allegorithmic.com/libraries/947

You pointed me in the right direction.
Thanks again for your assistance.
Last Edit: November 19, 2015, 06:21:33 pm
Hobbyist
----------
Common "Help" suggestions:
- LOG FILE tips - https://forum.allegorithmic.com/index.php/topic,22451.0.html
- LICENSING issues https://www.allegorithmic.com/contact
- ATTACH files and pictures to posts: https://forum.allegorithmic.com/index.php/topic,23670.0.html

Let me know about the watermark. I'm not sure why you would get a watermark.

When I built it "wrong" I would get the "Add an image" (or something to that effect) watermark all over the cube in Substance Player.  I'm still not entirely sure why my "wrong" way behaved exactly the way it did, but I'm happy it's working fine following your example.  I forgot about that little mystery.  Maybe I'll research it some more (for my own understanding).  No promises, but if I do, I'll share my discoveries here.

BOTTOM LINE:  After re-building my logic following your example, it's working fine.

I have a few enhancements I plan to make, but here is the whiteboard...
https://share.allegorithmic.com/libraries/947

You pointed me in the right direction.
Thanks again for your assistance.

Very nice work on the whiteboard : )

Cheers,
Wes
Integrations Product Manager / Training
wes.mcdermott@allegorithmic.com
Twitter: The3DNinja

Old topic, I know... but the setup you're demonstrating is very close to what I'm doing.
Here's my question though:

I have an optional custom bitmap just like your example. I understand how to change the sort order of the various tweaks that I expose. However, when one of those tweaks is a custom input, how can I make that tweak sort among the various other tweaks where I want it since I cannot drag/drop that tweak out of the 'Input Images' category and into the 'Input Parameters' category.

 


Looks like it's not currently possible. (I submitted a report about it.)

The only way I can get those Input Images tweaks to sort in the order I want is to edit the XML manually in a text editor.  :(