View Full Version : New feature request
04-22-2008, 11:45 PM
This would solve soooooo many problems with rendering polygon objects where users want to hide polygons in the render: add a channel to the Material to act as a secondary 'Alpha' channel which responds to PolygonSelection tag(s).
3DSMax, Maya, Cinema 4D, and other 3D software suffer from this same deficiency. And there is no easy way to circumvent this situation (believe me!). In my case, there is a good possibility that the Alpha channel is already usurped for other purposes so it cannot be justified just to use it outright and drop whatever Alpha is already there. And I cannot assume that either/or Alpha/Transparency - both can be active for other reasons.
I get headaches thinking about the complexity here. A Generator plugin object may suffice to simulate this hiding of polygons - but it is a generator object and would be called EACH and EVERY time the editor view is changed or for every frame during animation. Can't do it once for the relevant changes, can we? Nah, that's too simple.
Basically what I'm saying is this: instead of me doing tons of frustrating work to implement something that may work with lots of work ;) why can't the developers who have ultimate control of everything in this app do the work (which would be much less I think)? I can't believe that I have to beg for such an obvious feature. If I must do it myself, you owe me big time - gold or 72 virgins may suffice! ;D
04-22-2008, 11:59 PM
Make a new material, set all channels off apart from transparency, apply to polygon selection, done.
04-23-2008, 12:30 AM
That's okay for a one-off. This is a plugin which can show/hide polygon selections either by the import settings or user whim (some users even want to, gulp, animate this visibility!). Can't do that simply by using an Alpha channel - especially if the Alpha channel has a texture map used to do material transparency otherwise. But this isn't just specific to materials. The polygon selections being hidden aren't specifically material selections but other selections. Now it gets COMPLICATED, eh? ;)
As I said emphatically - I cannot assume that the Alpha/Transparency channels are open to be changed willy-nilly. And since the polygon selections might not be material selections there is no easy way to accomplish the task without going bonkers.
Currently, I set the polygon vertex indices to '0' to simulate this and it works to a degree. It causes odd results under a HyperNURBS and there seem to be issues with animating this with NetRender (one reason that I'm looking for alternatives). And reasons not to delete the polygons permanently: they are used in bone deformations (so how do I avoid crashing and get them back when the user unhides them - etcetera and so forth?).
The best alternative is to add a generator plugin object which removes the polygons from the polygon array and (additionally) makes the necessary adjustments to the UVW tag array (constantly). This will be ....slooooooww.... in almost every situation.
04-23-2008, 12:47 AM
I said Transparency, not Alpha. I'm not sure I follow you then, because what I posted will work every time regardless of the alpha/transparency that's already there, and it can be animated on/off as needed, just animate the color/brightness in the transparency channel make sure that "Mix Textures" is enabled, you can even animate the tag's selection if you wanted. Have you tried this?
You explained it as something to have at rendertime, not during scene editing, in which case you simply hide selected (if that's what you need). If you really wanted to temporarily disable/enable the material from it's selection then you can select all tags the material is on (function->Select texture tags/objects) and swap it for a material with no channels active (provided you set "Mix Textures"), or you can drag & drop the aforesaid material if you want onto the tag, and then do the reverse as needed, you could even set up a simple xpresso tag, or coffee script to go through finding the material and turning it on/off by doing something similar if you wanted to get more technical, in all honesty the options I've given aren't going to be any harder than what you're suggesting to use. Of course I don't quite follow what you're asking for here though.
04-23-2008, 01:28 AM
Does it matter whether Alpha or Transparency (both can be already in use)?
Okay, here's an example. I have a polygon object with 100 'body parts' determined as PolygonSelections (which are then used to do deformations using a hierarchy of plugin bones) and 20 material PolygonSelections used to set the texturing. I want to hide one (or 90) of the body parts PolygonSelections in render. How do I do this? The 100 bodyparts and 20 materials have NO direct association (the materials don't follow the separation of the bodyparts and vice versa).
I've already done some experimenting with Mix Textures and it doesn't work under these circumstances. If I add a Material to a bodypart selection and set Mix Textures there are spurious results dependent upon order of material tags and so on. I could be dealing with 100 figures with body parts and various combinations of visibility between materials and body part selection tags and Alpha and transparency and ...
If you can actually prove this to work, I'll continue down this path. So far (after several years) I can't find a decent Alpha/Transparency solution for this.
04-23-2008, 02:01 AM
Here's a test. I selected one half (the right half) of this figure and created a Polygon Selection. I added a Material and set it to use that selection. I set only the Alpha for this new Material. I tried several variations of "Mix Textures": this material only, all other materials, both sets, neither set (that about covers every reasonable option). I tried the same using the Transparency channel only. Added: the new material before and after the others. Here are the results:
And here is the figure's material without the Alpha/Transparency (wow, that's right!):
Sorry, this doesn't work!! Thus my request/question/hope/query...
04-23-2008, 02:11 AM
Try what I said earlier, lets say you want to hide a polygon selection called "Arm" which is not used by any material selection thus far on your polygon object.
Create a new material with all channels disabled apart from the "Transparency" channel, leave that fully transparent and apply it to the polygon selection "Arm" on your object, you don't need to set "Mix Textures", provided that your new material is the furthest right you should now have a gaping hole in your mesh where the polygons are, even if the underlying materials have their own alpha/transparencies. If you wish to temporarily turn this off you can simply add any random character to the end of the "Selection" field in the texture tag (or go with the other options I suggested), this can be keyframed if desired. If you wish to slowly blend in/out then you have to enable "Mix Textures" and then you can either animate the materials own opacity for a global change, or simply create a new material with no channels enabled at all, and animate the "Material" link in the texture tag itself, which at rendertime will cause a smooth blend.
The only limitations with "Mix Materials" is there is a bug/limitation that means the specular of underlying materials can show through, for that reason and the other much more serious one that animating transparency results in not just the whole area fading out nicely, but backfaces showing through during the transition (limitation, because you'd expect to see what's through a transparent surface even if it's the object itself) I would recommend doing the transitions in post if you really want slow soft blends, plus you get a lot more control that way.
04-23-2008, 02:20 AM
Ah. That worked. :) Proof:
How might this work with multiple selections/materials trying to do the same thing - possibly overlapping?
04-23-2008, 02:30 AM
I've just seen your post, I'm sorry but I'm unable to recreate that effect here, as I said use Transparency, not Alpha.
edit, ok you posted again - For multiple materials see the attached showing selections and materials overlapping, it works no matter how many materials or selections, you will need one texture tag per selection though that you wish to apply the "transparent" material to (only room for one selection tag per texture tag, though i guess it would probably be possible to make something in xpresso or coffee that combined selection tags into one main selection tag as needed if you just wnated a single transparent material on per object).
04-23-2008, 02:32 AM
Just had to say a big "THANK YOU!", Per-Anders! :)
If all else fails, I can use a 'special' Polygon Selection tag as a repository for the polygons that are to be hidden so the need to consider multiples shouldn't enter into the equation. This might resolve all sorts of issues with HyperNURBS and NetRender visibility animation.
06-04-2008, 02:35 AM
An interesting development here. I've noticed that there are shadows or reflections from polygon selections using this end-of-list Transparency material - at least I'm seeing this when using GI/Sun (?). I can't seem to get rid of it.
Here's a render using the old 'set polygon indices to 0' method:
Here's a render using the material with Transparency (note that I've unchecked all Illumination options on this Material):
Note the differences, especially the hood locks at the front showing the shadow/reflection in the hood in the second image. Any suggestions on fully removing these polygons from render consideration?
06-04-2008, 02:35 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.