Author Topic: I should re-think my life  (Read 716 times)

"I should re-think my life"

This past weekend I was having some fun with my hobby, when I leaned back in my chair and was struck by the insanity of what was on my monitor.  (See picture.)  Actually, that's only one monitor, and the other one wasn't much better.

I was hit by the profound realization that I must be crazy, and I thought to myself, "What am I doing?  I call this fun?"

We are strange people, are we not?

I remember a person posting about how he caught himself (at school or at the office) stopping and crouching down to look at the floor from different angles.  He looked up and realized someone was curiously watching him, probably thinking he has a mental deficiency.  Yeah, haven't we all found ourselves looking at some texture that catches our eye?

How does that connect with my profound moment?  I love Substance Designer and Painter, but I merely dabble with them and never get to use either enough to become what I consider proficient.  I use Blender even less, and until a few days ago I had never used Python.

I found it annoying that it took so many steps to get my exported Painter textures into Blender and applied to the mesh there.  So I thought automating that task would be a good way to learn some Python.  That's what I was working on when I leaned back in my chair, and I was suddenly struck by the insanity of what was on my monitor.

Yes, perhaps I should re-think my life.

But there is some hope.

Although I'm not done, I have had some success that I feel very good about.  I now have Blender Python code that can:
- Delete existing objects but leave the camera and light
- Import an OBJ file
- Import all the texture files (base color, metallic, roughness, normal)
- Ensure the Blender material is using nodes
- Clear out the two default nodes
- Create an output node
- Create a shader node ---> Using the new "Principled BSDF Shader" that is in the pre-released Blender 2.79
- Create "normal map node" that you need to "convert" the normal map before you plug it into the shader
- Create four texture nodes (base color, metallic, roughness, normal)
- Assign the loaded texture files to each of the for texture nodes
- Link all the nodes

I have a few things semi-hard-coded in my scripts, but it is now this easy:
1) Start a new Blender file
2) Run my script
3) Done... the imported object is ready to render in Cycles


I feel really good about what I accomplished in just a few evenings, barely knowing Blender and having never touched Python before.

I still have more to do:
- Be more accommodating of OBJ filename being different from the mesh name
- Loop through the code for multiple meshes
- Currently I "set variables" for the directory path, the OBJ filename, and the primary prefix for the texture files.  It does not prompt me for those things, I have to edit my script if I want to import a different file.  That will probably remain that way because I have other things I should be doing (hobby, chores at home, family time, etc.)
- Oops... I just realized while typing this post that I forgot to set all except Base Color nodes to be "non-color data"

Oh, and I think I actually found a BUG in Blender.  Seriously.  It is in the pre-released Principled Shader node.  Now to figure out how to report it.  I probably have to create yet another account on yet another forum, but I would like to report it.  Sigh, just more things to do, right?

BOTTOM LINE...  Is this fun?  Well, yeah, I think so.  What about you?

Last Edit: August 15, 2017, 05:23:45 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

Congratulations!  Nice piece of work, and it doesn't seem strange to me.
If nothing else, you're keeping your brain fit! :)

That's dope, I should be learning Python too. I'm a Blender user as well.

I'm sure everyone that uses designer takes a closer look to objects and props in our daily life. I love making tileable patterns.

Thanks.  I knew I wasn't the only one.   ;)


I should be learning Python too. I'm a Blender user as well.

This video is what got me started with Python.  When he showed how Blender exposes the Python script for you, I thought that would make Blender a great learning environment.  It's not the most beautifully produced video, but the content is good once he gets into the actual hand-on stuff.
https://www.youtube.com/watch?v=KNa5kJd2Epo
Last Edit: August 15, 2017, 05:44:13 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

Cool, thank you! I'm gonna be sure to start this week. Are you using filmic already? It massively improves your results with the new principle shader.

Are you using filmic [in Blender] already? It massively improves your results with the new principle shader.

No, but really just because I haven't done any rendering where it would matter.

This might sound strange, but I actively avoided using Blender for a long time because I knew I would love it.  I was afraid it would absorb all my time and I wouldn't get anything else done.  So I used my son to do most of my modeling for me.  However, I finally broke down and started learning some basics.

Even before I used Blender, I became a huge fan of Andrew Price (Blender Guru), and enjoyed watching his videos.  Here is the video were he lavishes praise on "Filmic."
https://www.youtube.com/watch?v=m9AT7H4GGrA
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

Brilliant post! love it!

My wife catches me staring at objects all the time and asks me what I'm doing. I'm wondering how to model this and texture that but I keep that to myself as she'd think I'm mental or something.

Well done on the Python stuff, that's something I've been meaning to learn too if I can ever find the time!

Yeah, it's amazing how Blender is giving a step forward against 3D professional software. So far I notice that I'm not going to be able to use Eeve, until I don't upgrade my equipment.

Material authoring is becoming a movement, I know see SD everywhere on Artstation.