Jump to content
3DCoat Forums

Blender Applink


haikalle
 Share

Recommended Posts

  • Contributor

OMG, this is not a critic or trolling against Blender, it is a attempt to help you.

Maybe i missunderstand you.

Anyway, let me explain what i mean.

A little sculp

post-24378-0-23327100-1368621056_thumb.j

Now Baking in 2.49

post-24378-0-21474100-1368621119_thumb.j

Now Baking in 2.63 (did not have the actuall Blender here)

post-24378-0-28747000-1368621129_thumb.j

Did you see the difference? This is what i mean.

Since 2.5+ the normals are in the "wrong" direction.

And Blender now use that "wrong" direction to calculate it correctly.

And as far as i understand you, you get "wrong" normalmaps, because Blender did calculate it now different.

Every app that i know (Mudbox, ZBrush, Gimp, PS, CrazyBump...), bakes, calculates Normal in that way like 2.49 it do.

If you use one of that apps, you have to invert the Green Chanel, that you could use it correctly in Blender.

Did i missunderstand you?

Link to comment
Share on other sites

  • Advanced Member

Thanks, I know invert (not flip whatever some apps use to say) of green channel .

There're more. In blender, normal value has to be set in negative values (I'm confused because in 2.49 and 2.5 x many things changed). But under cycles now, positive again.

What I did asked was: How to setup 3dcoat for not needing Ps to invert green channel.

And, BTW, something irrelevant. Very new beta builds of blender introduced a new parameter under bumps node (cycles). we have height (as always) and distance. This last makes bumps working a little like normal maps. Great because bumps bon't suffer of some serious limitations of normal maps. And they look better in some hard surf cases. (not on characters, not so, but great for hi freq details, as an assist to displ+n_maps) . I doubt if we can have control of how to bake three maps on different subdivision levels in 3dcoat though. Blender or zbrush are friendly to such procedures. (multires)

Link to comment
Share on other sites

  • Member

Hello, I have 3D Coat 3.304, and Blender 2.67. When clicking TRANSFER from blender my model goes to 3D Coat without problems, once I am done in 3D Coat and click SEND OBJECT BACK which it sends the project back to the original application that brought it in, then when switching back to Blender I click UPDATE and nothing happens !

Is it a limitation for 3D COAT 3.3? Any thoughts?

Link to comment
Share on other sites

  • Member

Hi everyone. I have changed the applink script as it was before. This means that if you try to take Monkey object from blender to 3d-coat it rotates the object wrong in 3d-coat space but

it works with all other objects so this best situation for now.

Harris3D, Have you checked "viewport shading -> texture" in blender and do you see any textures in textures panel?

Yes my friend texture mode !, I am relatively new to 3DCOAT, however I have worked on Blender for around 6 years, The project is not updating at all when going back to Blender, I guess because I use 3D Coat 3.3? Does this applink need to be installed? or does it come by Default with 3D Coat?

Link to comment
Share on other sites

  • Contributor

@michalis

Yes, there are some changes. overall, there are good changes, but some things like that inverted normalmap calculation are not of my taste.

I am not a big fan of cycles, i mostly use Yafaray for my projects. And with that engine i dont have problems with the normalmaps from 3DCoat or Gimp.

Maybe Yafaray calculate it different as cycles do.

Anyway, but now i understand you.

I use for the normalmap export 3DMax, Lightwave, and you use Maya. And as far as i see, in 3.7 the Max and Maya export are different, in the same way as 2.49 and 2.5+

Have you tested it with 3.7 and or V4 of 3D Coat?

V3.7 works fine on my side, maybe V4 have a bug inside that Maya export.

@Bump and Nomalmap.

Nice to hear that.

But there is so cool stuff out there like parallax mapping or vector displacement, would love to see that in Blender or other apps and engines.

Edited by Malo
Link to comment
Share on other sites

  • Member

Hi Harris3D!

Only what you need to do is to enable applink in blender. You can watch this short tutorial how to do it. http://vimeo.com/30723894

Hope it helps you to get started with the applink.

*****When clicking TRANSFER from blender my model goes to 3D Coat without problems****** it clearly says my friend the AddOn within Blender is enabled :) The model goes from Blender to 3D Coat without problems but it wont go back from 3D Coat to Blender.

Link to comment
Share on other sites

  • Advanced Member

vector displacement is on todo list of blender/cycles development. Under construction. We'll see.

BTW, cycles suports normal maps wonderfully, much better than BI.

Cycles is two years old, a very young app-renderer. Already very powerful. Patience. Renderers are not easy to do apps.

New commitments, two many, come every day. There're over 100 after 2.67 official release. Some wonderful modeling tools among them. And, a new optimization of multires sculpting.

Link to comment
Share on other sites

  • Applink Developer

Harris3D, that's interesting. After pressing update button. Do you see any error messages in console. You can see console in blender when you choose Window -> Toggle System Console

Link to comment
Share on other sites

  • Contributor

Thanks for the Infos.

Vector Displacement would be so cool, i know sculpting in Mudbox with verctor displacement is one of the best features i ever seen.

Yes Cycles is good and young, and i am happy that i have Nvidia so i could use GPU for rendering. But i find it sad, that as more features Blender and Cycles get, as slower it works.

The speed was fantastic on CPU and GPU in 2.62, but now in 2.67 i lost on my PC on GPU 50% of speed and on CPU 20%.

Not sure what the future brings, but if Blender and Cycles expand so quickly as it do right now, the complede speed is gone and we could render so slowly like LuxRender it do.

Sure SSS and particels take some time to calculate, but i still hope cycles get faster and faster in the future.

Did you have any infos about that?

Link to comment
Share on other sites

  • Member

Harris3D, that's interesting. After pressing update button. Do you see any error messages in console. You can see console in blender when you choose Window -> Toggle System Console

No my friend no errors shown in Blenders console. Everything goes well from Blender 2.67 to 3D Coat 3.3, but from 3D Coat back to blender it does nothing frown.gif

I guess the addOn does not work on 3D Coat 3.3, I have done many many tests with no results.

Link to comment
Share on other sites

  • Advanced Member

The speed was fantastic on CPU and GPU in 2.62, but now in 2.67 i lost on my PC on GPU 50% of speed and on CPU 20%.

On such issues you could ask in blenderartists forum.

This doesn't happen here. Still works the same speed. Maybe a not well compiled build?

If the view port preview speed is the case, yes, something may happens there. But, under f12 you should have the same or better speed.

Link to comment
Share on other sites

  • 2 weeks later...
  • Advanced Member

Just a warning. On recent cycles builds, they changed normal mapping coordinates. To make it compatible with Blender Internal.

It's a shame IMO, such ideas isolate blender from the whole 3d world, only confusion comes from this nonsense. Rebuild your projects accordingly, if you find how.

Link to comment
Share on other sites

  • Applink Developer

Hi everyone! I'm going to start coding cycles support for applink. I did some tests and it should be quite easy task to do but there is some issues that I would

like to solve before starting and I hope some feedback from blender users who knows cycles render very well.

1) Shader tree can be quite big. (with many different BSDF shaders and mix together) Where should applink add textures? Should textures be linked into first possible BSDF

or do you have better idea? Only easy one is displacement map because it is linked into "Material Output"

2) Where specular map should be linked??

Thanks a again for great support/testing for this applink.

Link to comment
Share on other sites

  • Member

Hi haikalle and thank you for your great work!

1) Well the situation can be very different of course. It depends on the kind of textures. Textures can be used pretty much for everything. First of all of course they can be used as color inputs for BSDFs. But in general when you have a black and white map you can use it for everything, so stating where they should be placed is quite hard. We should try to point out some more specific situation.

2) About the spec maps you can use them in 2 ways. You can plug them directly in a glossy BSDF color input and they will set the intensity of the reflections. Or you can plug them into a Fac input of a mix shader node and they will trim how much of the two shaders that you are mixing will come out from the output. Let's say you are mixing a diffuse and a glossy BSDF (diffuse in the first socket and glossy in the second). If you plug the spec map into the fac input the white areas of the map will return the glossy BSDF, while the black areas the Diffuse one. Of course all the greyscale in the middle will return mixed BSDF.

Hope I helped you a bit, if you have other questions just ask, I will try to answer as I can! :)

Link to comment
Share on other sites

  • Reputable Contributor

First thanks for coding for Cycles... :drinks:

Busy today but I will get back with a few screen shots of basic node setups to try to help you in figuring out what to code plus I will pm michalis to make sure he sees this latest post...

Link to comment
Share on other sites

  • Applink Developer

Thanks Bernardo. That info gives me greate staring point.

Thanks a lot digman. Yes couple screenshot about where you want applink to add nodes would be nice. I haven't used cycles so much so this is quite

new world to me. But I already checked that I can create nodes and link them to other nodes using python so now we just need to know where 3d artists

wants them :)

Yes, we need michalis guide here...

Link to comment
Share on other sites

  • Member

I made a super fast material, I hope it can help. Here I used procedural textures, but the thing works exactly the same for image textures.

We have the sum of a Diffuse and a Glossy BSDF. The color of the glossy can use a normal image texture. As for the Glossy BSDF as you can see it is using the bw output of the Noise texture. I used a color ramp to increase the contrast and better see the effect. Dark areas of the noise texture have lower reflections, while white areas return stronger ones.

Later we have a shader mix node. I used a wave texture to balance the mix. White areas of the texture will increase the influence of the second socket (in this case the transparent BSDF, while black areas will increase the influence of the upper socket (the sum of the Diffuse and Glossy).

Finally I used the voronoi texture as a bump. You can see that we have to use the right node to convert the bw image into good data for Cycles to apply the bump on the shaders. Right under the bump node I putted a normal map node, which of course is the one to use in case we have a normal map. On the far left part there is the texture coordinate node.

A last note. There is also the possibility to use the bump texture as displacement plugging the bw image directly into the displacement socket of the material output on the right, but this is still an incomplete function in Cycles.

post-15282-0-95175200-1370532009_thumb.p

I hope this can help you!

If you have any other question just ak :)

Edited by Bernardo
Link to comment
Share on other sites

  • Reputable Contributor

Ok, here is a very basic setup just using a diffuse texture (color) and the normal map texture.... This will give you something to work on that is very basic but usefull...

In the picture you can see clearly how the normal map node is connected to the "normal socket" of the diffuse BSDF node

The Image texture node for the normal map must be set to non-color data for the normal map to work correctly. (This information is from the official Blender manual Wiki)

The normal map node itself is under the ADD "vector heading"

You set the normal map node to "UVMap"

The default setting of the normal map node is "Tangent Space" The other two settings are world space and object space.

There is no need for the texture coordinate node in this case as the texture image nodes are setup my default to use the uv map of the model.

If I have time later, I will get a basic bump setup and displacement setup... I'm sure michalis will be around soon too... :D

Link for Cycles normal map node to verify about setting the image texture node to "non-color data' for the normal map.

http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More

post-518-0-57595400-1370533803_thumb.png

Link to comment
Share on other sites

  • Advanced Member

Here's a simple setup. Using diffuse, normal and specular maps.

Pay attention on the specular to glossy control via another mix shader. It's plugged to the second socket of the mix shader. If on the first, a color/invert should be added.

However, Haikalle, you should probably wait for the UberShader.

post-2454-0-22530300-1370547327_thumb.pn

Link to comment
Share on other sites

  • Advanced Member

Now, because cycles node system is unlimited (somehow)

How do you plan to use a AO map?

We will probably add it as a texture node, we'll mix it (color/mix) with diffuse (color/mix burn or multiply mode). But this isn't all. It could be used as a "filter" in glossy node/mix node to not allow glossy on AO dark areas.

Still not all, as a filter, same way, to control a mix of two diffuse maps.

IMO, we can export all the layers of 3dcoat as maps and mix them in cycles.

See my point? Endless possibilities. The only limit is our imagination.

Link to comment
Share on other sites

  • Reputable Contributor

Michalis, I noticed you used the texture coordinate node though it is not necessary in your case. Does the normal node work with choose uv map has shown in my example picture.

Now, because cycles node system is unlimited (somehow)

How do you plan to use a AO map?

We will probably add it as a texture node, we'll mix it (color/mix) with diffuse (color/mix burn or multiply mode). But this isn't all. It could be used as a "filter" in glossy node/mix node to not allow glossy on AO dark areas.

Still not all, as a filter, same way, to control a mix of two diffuse maps.

IMO, we can export all the layers of 3dcoat as maps and mix them in cycles.

See my point? Endless possibilities. The only limit is our imagination.

Michalis, I noticed you used the texture coordinate node though it is not necessary in your case. Does the normal node work without choosing the Uvmap setting in the normal node as shown in my example picture.

Yes, indeed, you can get quite a deep node system going in cycles so we need the basic stuff to work first... diffuse, normal, spec, bump and displacement maps.

Diffuse, normal and bumps maps being the most straight forward. It will be interesting to see how haikalle tackles coding the applink for cycles...

Link to comment
Share on other sites

  • Advanced Member

@Digman

I have to put the tex coordinated node there.

If you don't, cycles uses the default coordinates, meaning the UVs. So, it will work.

But let me put it there, you never know. LOL.

For instance you may mix the baked 3dc diffuse map with a box mapped texture. (Tex coordinates/ object mode)

Cycles can handle multiple UV sets. Another interesting case.

Once again, we better wait the Ubershader. Though I'm not a fan of such solutions.

Link to comment
Share on other sites

  • Reputable Contributor

Smart play there michalis on using the tex coordinated node... :D

This is the most basic bump setup using the bump node under the ADD "Vector" heading.

Default strength of the node is .100

The bump node is hooked through the normal socket of the diffuse BSDF shader and not the displacement socket on the Material Output node.

Image texture node is again set up using non color data.

Haikalle, I know these are simple setups and ones you likely to know but just to be sure...

yeah, I push the bump pretty far in the picture just to show...

Edit: I added another picture that shows the old way of setting up your bump map before we got the bump node a few months ago. Under the Object data tab / Displacement heading, you would set it to just "Bump" to use the image only as a bump map. Again this is the old way.

post-518-0-19689500-1370608611_thumb.png

post-518-0-40173400-1370610173_thumb.png

Link to comment
Share on other sites

  • Advanced Member

@digman

Please download and use a blender 2.67b or later.

Some changes in the bump normal maps nodes.

Bump node has a second parameter "distance". This makes bumps to look a bit like normal maps. Beautiful.

Normal map node has a "normal input as well. Meaning, you can use a bump, plug it to normal socket of normalNode, then to the normal socket of a diffuse or other BSDF.

Very important. Recent builds from buildbot (r 57277 here) have changed the tangent normal mapping again. It is not compatible with the old BI. Meaning, not compatible with the blender output of 3dcoat. The decision was made after lot of complains in blender community. Obviously, they have to change the BI too. We had enough with this nonsense.

Link to comment
Share on other sites

  • Reputable Contributor

@digman

Please download and use a blender 2.67b or later.

Some changes in the bump normal maps nodes.

Bump node has a second parameter "distance". This makes bumps to look a bit like normal maps. Beautiful.

Normal map node has a "normal input as well. Meaning, you can use a bump, plug it to normal socket of normalNode, then to the normal socket of a diffuse or other BSDF.

Very important. Recent builds from buildbot (r 57277 here) have changed the tangent normal mapping again. It is not compatible with the old BI. Meaning, not compatible with the blender output of 3dcoat. The decision was made after lot of complains in blender community. Obviously, they have to change the BI too. We had enough with this nonsense.

Strange, I am using the Linux official 2.67b and distance is not there... Maybe in a newer build as I have been using the official builds because they are the ones I think haikalle uses to code for the applink but I could be mistaken as well...

I will check out a newer build to see what has changed in the normal maps...

Link to comment
Share on other sites

  • Applink Developer

Great info! This really gives clear picture to me about how nodes work in cycles.

What I try to code is this. If node tree is almost empty. Applink is trying to build complete node tree for you. Meaning you can see your textures right a way in cycles preview render.

But in situation where you already have quite many nodes in node tree applink is just bringing new texture (image nodes) into node tree and that's it. Not trying to connect them because

I'm afraid it only do more damage than trying to help. Because there is endless situation where user wants these 3d-coat textures so it's not good for applink to trying quess where to link them.

I try to update the script with these info trying to code first diffuse, specular, normal support. And let's move from there.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...