Author Topic: Advice on Scan material pipeline  (Read 2439 times)

Hello everyone!

I'm a new artist and got my first gig working at a company that visualizes products for clients for web based visualization tools. 

This company hired me because they're starting to get into 3D visualizers with VR/AR applications and it's my job to recreate client products in SD for these demos.  It currently takes me about 1-6 hours to create a substance from scratch, based on its complexity, and they need me to create them faster and with more accuracy.

The scan processing in SD6 is a great candidate to help me do this but I'm running into a memory over head snag and haven't been able to figure out how get around it.  My question is, how can I develop a substance from scanned images without the huge memory overhead of the embedded source image files?

I am a new artist and not clear on workflows and nomenclature so if you need clarification please feel free to ask!  Thank you so much in advance, I really need the help!


Congratulations on the new job.  :)

What resolution are you using?  And what graphics card (how much VRAM) do you have?

Does SD crash, or simply get slow?  A log file will be useful for the SD support guys.

Here's an interesting thread that may interest you... https://forum.allegorithmic.com/index.php/topic,15710.0.html
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

Hi Viking and thanks for the congrats and the link!  When we figure out if scan processing is gonna be the way to go or not, it will definitely come in handy to create our own scanning system!

I think I should go into a bit more depth as to how we're using the substances -- I was attempting to avoid getting to lengthy in my post to help catch a few more comments. 

Using Unity, we're creating small environments requested by the clients and allowing the user to apply the client's products to certain surfaces; like the floors and backsplashes in kitchens and bathrooms.  Users can then visualize products in VR/AR setting and decide which of those products they want to purchase.  Currently its more of a gimmick to draw people to booths at trade shows and conventions, so we're building custom laptops to run a Vive with the Unity executable file.

The issue I'm running into isn't hardware related in regard to actually running SD -- my issue is how I can export a .sbsar file that does not have the overhead of embedded HDR source images.  Does that make sense?

I think I understand, at least in the general sense, what you're talking about.  Sadly, I can't even pretend to have any useful knowledge in that arena.  Hopefully someone else will chime in with some information or insightful questions.

It can be a tricky balance between having patience and bumping a thread too often, but don't be too shy if too much time passes without some help.  You're in sort of a specialized space with this topic, so it might take a bit longer than usual to catch the eye of the right person.

Good luck.
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 for taking the time to respond and help me clarify the important information!  Honestly it's probably something really simple and I'm either over thinking it or missed the fundamentals of SD as I went through tutorials.  Here's hoping someone can help!

Hey Seth,

Depending on how the textures are used you have a few options:

First of all: do you need to use substance in-engine? Are you using any exposed parameters? The main performance advantage of substance is that it takes up less memory since it's all procedural. But if it uses embedded images this is not really the case anymore. If you have the same number or more embedded images per material then you have outputs, you may be better of just exporting your textures as bitmaps (if you don't need to tweak parameters in-engine.)

If you do use substance: use photo editing software like photoshop to reduce the size of your hdr's. They only need to be as big as your final textures. If your final textures have, say, a 2048 by 2048 resolution, then you can reduce your image size to the same resolution. Same thing goes for bitdepth. If your substance produces 8 or 16 bit per channel textures, you don't need hdr source images.


Hi Eggfruit, thanks for your response and great name!

It mostly depends on the project as to whether I'll need to utilize exposed parameters -- the one I just finished up, for instance, I created 100 individual substances without any need to change anything in real time.  My concern with baking those out, however, is that I'm using 6 channels; albedo, normal, roughness, metallic, height and AO.  Baking out 100 substances at 2048 maps will increase memory overhead an awful lot.  Our scenes aren't particularly heavy on geo and everything else is baked, but if we do projects with say, 200 products or more, then the bitmap overhead will get reeeeally bad.

I also need to make sure that we have the option of using exposed parameters for future projects -- some clients have already requested that we build in some highlight color changing tools for some of their products and building individual substances for the 30+ possible combinations wouldn't be feasible either.

Is there any kind of software that will composite all of the HDR source maps and bake out the final version and use that single image in the SD process?  I'm hugely unfamiliar with any image processing workflow and I'm only now scratching the surface on scan processing...

You're welcome, and thanks :P

I agree that using substance in-engine is the best option here. Mostly because of the exposed parameters, but I can also see that memory becomes an issue here. Do keep in mind that bitmaps get compressed by the engine, so they take less space than you would expect. Also, at runtime a substance generates bitmaps as outputs. This means that once the substance is generated, it's textures act exactly like regular bitmaps. So, you're not going to safe ram with substance. Your application will take up much less disk space though.

I have very little experience with photo scanning myself to be honest, but I may know enough to help you out a little.
Are you using photo's of different light angles to produce your albedo and normals? This is something you should do separately. You can use substance designer to do this, but just export the outputs as bitmaps and use these instead of doing the whole proces in your main substance.

Could you maybe show how you currently have it set up?

Are you using photo's of different light angles to produce your albedo and normals? This is something you should do separately. You can use substance designer to do this, but just export the outputs as bitmaps and use these instead of doing the whole proces in your main substance.

That's a great point.
Let me rephrase it right, to see if I correctly understood what you're saying.

Break it into two major steps.
a) Do the photo-scan process to create your material textures.
Export the textures (or make a material from them, I haven't done it, so I don't remember the exact process.)
This will condense multiple high-res photographs, all in full color, to fewer texture maps, some in grayscale (less memory).
b) Now use the output from step "a" in your actual project.

Close enough?
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