Thu, Sep 19, 5:39 PM CDT

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Sep 19 4:23 pm)



Subject: OBJ Import problem


Tarkhis ( ) posted Wed, 19 June 2013 at 7:22 PM · edited Thu, 19 September 2024 at 5:33 PM

I'm having a very frustrating problem.  I've been modelling an old fashioned shaving kit in Blender and today finished the meshes.  Everything went well and it renders fine in Blender.  I scaled things down to a size appropriate for Poser figures and exported as an OBJ file.  I then switched over to Poser 6, imported the obj files at their default size (not percent of figure size) placed on floor.  Everything seemed fine.  I applied the MAT files in Poser I'd set up, including some textures I'd made, so far so good.  I then did a render and got a strange result.  The prop's shadows are square boxes, and the prop itself is black as if in shadows.  For the life of me I cannot figure out what is causing this and I'm at my wit's end with it.

My only clues are as follows.  If I scale the object back up some it renders okay.  It doesn't seem to matter if I do this in Poser or Blender, either before or after exporting.

If I go to my lights and set them all to raytracing, the prop again renders normally.  If I turn on depth shadows on just one light, that light throws a boxy shadow

If I add a larger prop or figure, it seems to render normally.

Any help would be appreciated, I'd like to start making props again but right now Blender is pretty much all I can use to make them and if I can't sort out what's causing this I may be stuck.  It seems to have something to do with scaling the problem but I'm not sure why that cause the problem.

Here are a couple of images of the Shaving Brush showing what I mean.


ockham ( ) posted Wed, 19 June 2013 at 7:24 PM · edited Wed, 19 June 2013 at 7:25 PM

This is a well-known peculiar problem in Poser.  For some reason a single small prop, all by itself, renders black.  (Maybe it indicates a dark and lonely mood.)

Put something else in the scene if you want to look at the prop with its correct small size.

My python page
My ShareCG freebies


TrekkieGrrrl ( ) posted Wed, 19 June 2013 at 7:48 PM

Odd. I've never seen this before. Poser sure is a quirky program from time to time L

Nice shaving brush btw. I have some foam and stuff, originally made for the (once free) Daz shaving set. I guess it'll fit this one, too :)

I thibk it's here in Free Stuff somewhere. And also on my site. (page 4 in the Static Props)

FREEBIES! | My Gallery | My Store | My FB | Tumblr |
You just can't put the words "Poserites" and "happy" in the same sentence - didn't you know that? LaurieA
  Using Poser since 2002. Currently at Version 11.1 - Win 10.



markschum ( ) posted Wed, 19 June 2013 at 7:49 PM

ockham is completely correct. I suspect your objects are tiny. Add a prop or figure and check the scale of the shaving kit.


Tarkhis ( ) posted Wed, 19 June 2013 at 7:59 PM

Correct, they render find as long as there's a larger prop or figure in the scene.  By themselves you get the odd effect.   So this is not considered an issue for freebies or marketplace items?   I'd like to resolve it completely, I seem to have some other small props that don't do this, I'm not sure why they don't.

Trekkie, I had intended to release this set as a freebie soon as I get things sorted.  The set includes the brush, a shaving mug, a round puck of soap and a straight razor that opens and closes.  I had wanted to include a few different textures / MATs and displacement maps with it for some variety.

But I'd really like to get this sorted first.  I may try going back and rebuilding a single one of the meshes, but starting much smaller in Blender and see if that helps any.  It does seem to have something to do with scaling and I have figured out that the scaling info from its original size to whatever size I exported it is stored in the OBJ file somewhere.  So I'm wondering if Poser just can't handle all that scaling.  If the prop was just black that would be one thing, but those odd shadows seems like maybe the geometry has gone wonky somehow.

Fortunately you guys can't hear me cussing like a sailor over this, its been very frustrating!  LOL


LaurieA ( ) posted Wed, 19 June 2013 at 8:10 PM · edited Wed, 19 June 2013 at 8:13 PM

I frequently create tiny props like rings and earrings and I've never run into this. I use Wings3D.

My suggestion would be export your object at 10x the original size and scale in Poser (or do the reverse in Blender). You could also try exporting that object out of Poser now that it's in and reimport and see if it's still black.

Laurie



Tarkhis ( ) posted Wed, 19 June 2013 at 8:40 PM

Laurie, exporting from Poser and then importing it back still has the same problem.  Also have tried exporting from Blender and Poser as 3DS format and then converting back to OBJ and reimporting, same problem.

Tried exporting at 10x intended size, imported.  Renders okay until I scale it down to 10% (to make it appropriate size) and back to wonky shadows.

Even tried exporting in the original scale (no scaling) and then scaling down in Poser, no go.  BTW, original scale is giagantic in Poser, so I'm wondering if I just started way too big.  How much larger are your items in your modeling software vs final size?

Its got to be something to do with scaling, that seems to be the main variable.


LaurieA ( ) posted Wed, 19 June 2013 at 8:44 PM · edited Wed, 19 June 2013 at 8:44 PM

I've already scaled things to 2% of their enormous import size and still never got that black. If you have UVMPro, try looking to see if there are coplanars or flipped normals.

You did Merge and/or Remove doubles in Blender and Recalulate Normals before exporting I assume? :)

Laurie



Tarkhis ( ) posted Wed, 19 June 2013 at 9:53 PM

Normals okay.  No doubled vertices, etc.   So I went back and got the spline modifier used to lathe the brush.  Made a new bezier circle, scaled it down and applied the spline as a modifier and instant new brush at a much smaller size (and fewer polygons, just over 1k).  About 2x the intended size.  Converted to a mesh, exported from Blender, imported into Poser scaled down to 60% of imported size and.... same problem.  Put a prop next to it... proble goes away. 

o.O -_- O.-  Aaaaaaaaaaagh!

At moments like this I hate Poser.


markschum ( ) posted Wed, 19 June 2013 at 10:32 PM

I made a small prop of similar shape.  It was about 50mm (2") tall. Same problem until I loaded the primitive sphere.

I dont know if trying ray traced shadows will fix it, or changing the shadow map size.

 

The larger object does not need o be visible in the render.


Tarkhis ( ) posted Wed, 19 June 2013 at 10:45 PM

As I noted above, if you go to your lights and set them to raytraced shadows instead of depth cued, the problem disappears and the props render normally.  I have no idea why this is.  Nor why having a second object in the scene fixes it.

My two biggest concerns are this becoming a problem in anything I might do to sell in the future (I've got two furniture sets in the works now I was going to put in the marketplace here as my first entries).   Also, I don't like doing freebies that don't function 100% correctly, which is what I intend the shaving kit to be, a nice freebie.

Plus, not understanding why this happens, what causes it, etc. just plain annoys me.  I hate it when I can't figure something out.  LOL  

This shouldn't be a problem for freebies since I doubt anyone is going to be rendering a shaving brush or a straight razor entirely by itself... but still... it tasks me, it tasks me...


ironsoul ( ) posted Thu, 20 June 2013 at 2:28 AM

What are you thoughts on this being a UV problem?   Have you tried to render the object with a very basic material with all texture maps removed.



Tarkhis ( ) posted Thu, 20 June 2013 at 12:01 PM

Tried that as well, did one with no mapped textures at all, just basic colors.  Same problem.


Tarkhis ( ) posted Thu, 20 June 2013 at 2:12 PM

I figured out a brilliant solution!  All I have to do now is convince everyone to scale up the default size of all their Poser content by 1000% and there we go.

Stop looking at me like that... ;-p

 

On a more serious note, I'm going to finish this shaving kit up and get it released soon, even with the odd rendering problem.  I'll include a note about it in the release so people who run into it will know what's going on and what to do about it.

I would still very much love to figure out what is really causing this.  What factors contribute to it so I'm hoping this thread will remain active.  As I have time I'll continue to experiment further.  I may also try other modelling software when possible just to see if this happens with any small OBJ regardless of what software created it or if some don't have that problem.   I think Laurie mentioned she'd never encountered it and uses Wings3D, so may investigate that (just bookmarked their webpage).

Laurie, could you tell me a little about the geometry of your meshes.  Specifically, how many vertices do they have on average, just a ballpark number.  How dense is the mesh?  I'm wondering if this might be caused by Poser not being able to handle too many vertices in a small geometry.  Just guessing really but since I can scale the very same object up in Poser and the problem suddenly stops it made me wonder about that.  What changes when you change the scale, the vertices move.  So that led me to wonder if too densely packed vertices in a small object might somehow cause it.

I also wondered about how the shadow resembled the bounding box / margin cage as its variously called.  So in Blender I experimented with resizing it.  I didn't expect that to eliminate the problem, but neither did it change the size of the shadow which I found odd.  Perhaps Poser redefines its own bounding box during import and sets the size?  Is there an error in the way it does that with small objects perhaps?  Not sure but just puzzling things out.  If I could pinpoint the cause it might be something SM could fix in a patch.


millighost ( ) posted Thu, 20 June 2013 at 2:22 PM

It is very unlikely that it has to do something with your model in particular. This effect is easily produced by using the one of the primitives that come with poser (at least on my computer). Take for example the low-poly cube, make it small enough and it becomes black...


LaurieA ( ) posted Thu, 20 June 2013 at 2:28 PM · edited Thu, 20 June 2013 at 2:29 PM

Quote - I figured out a brilliant solution!  All I have to do now is convince everyone to scale up the default size of all their Poser content by 1000% and there we go.

Stop looking at me like that... ;-p

 

On a more serious note, I'm going to finish this shaving kit up and get it released soon, even with the odd rendering problem.  I'll include a note about it in the release so people who run into it will know what's going on and what to do about it.

I would still very much love to figure out what is really causing this.  What factors contribute to it so I'm hoping this thread will remain active.  As I have time I'll continue to experiment further.  I may also try other modelling software when possible just to see if this happens with any small OBJ regardless of what software created it or if some don't have that problem.   I think Laurie mentioned she'd never encountered it and uses Wings3D, so may investigate that (just bookmarked their webpage).

Laurie, could you tell me a little about the geometry of your meshes.  Specifically, how many vertices do they have on average, just a ballpark number.  How dense is the mesh?  I'm wondering if this might be caused by Poser not being able to handle too many vertices in a small geometry.  Just guessing really but since I can scale the very same object up in Poser and the problem suddenly stops it made me wonder about that.  What changes when you change the scale, the vertices move.  So that led me to wonder if too densely packed vertices in a small object might somehow cause it.

I also wondered about how the shadow resembled the bounding box / margin cage as its variously called.  So in Blender I experimented with resizing it.  I didn't expect that to eliminate the problem, but neither did it change the size of the shadow which I found odd.  Perhaps Poser redefines its own bounding box during import and sets the size?  Is there an error in the way it does that with small objects perhaps?  Not sure but just puzzling things out.  If I could pinpoint the cause it might be something SM could fix in a patch.

My meshes normally tend to the medium to heavy poly side ;). Because I do mostly clothes and smart props that fit a certain figure, I use the figure to model around. When I work in Wings with a Poser figure, I normally work 20x Poser size, because Poser's scale is so ridiculously small. If I do it at Poser's size, I am unable to zoom in close enough without getting clipping no matter how I set the camera. When I export, I simply export at 0.05 and everything fits just fine in Poser. And no, I never have gotten a black mesh.

Laurie



ironsoul ( ) posted Thu, 20 June 2013 at 2:38 PM

I created a 3ft sphere in Carrara, scaled it by 0.01% and exported it to Poser. Scaled up the sphere so I could see it (until about the size of a football compared to V4) and rendered using a single depth mapped light and it came out black with a square shadow. Disabled shadow on the object and it rendered ok. Changed the material to use alt diffuse or ambient and it rendered ok. 



ironsoul ( ) posted Thu, 20 June 2013 at 3:10 PM

Tried it with a much larger sphere and the same behaviour. As soon as I inserted a poser object such as the ball all appears to work as normal so I go with ockham, props are gregarious and need more than one in a scene to work .



Tarkhis ( ) posted Thu, 20 June 2013 at 3:33 PM

Ironsoul, you might have hit on something.  I tried experimenting with using the alternate diffuse just now.  Here's what I did.

I applied the brush bristle texture map to both the diffuse and alternate diffuse nodes.  I reduced the strength of the basic diffuse down (this will need adjustment to balance the colors correctly but I was just experimenting here).

I left the handle its default basic color.  No maps used (just a simple MAT file with no extra nodes from Poser for a basic shiny green)

Then rendered.  Notice what has happened.  The brush portion has rendered somewhat correctly but lacks any shadowing, the handle is still in shadow.  However we still have the box shadow.  Also the after experimenting it seems the shadowing on the object isn't being applied so it comes out flat and almost monochromatic.

Not sure what this tells us other than Poser has difficulty rendering shadows for some small objects using depth shadows and normal diffuse textures, but not alternate diffuse.

I would really like to figure out why Laurie isn't having this problem.  Thanks for the info Laurie, sounds like we are both modeling in a simlar fashion (and for much the same reasons), with similar detail in vertices.  The above brush has 1002 vertices and 1020 quad polys.  The only place in the mesh that I would say is "dense" is on the handle where you see the sculpted bits, there are some loops of vertices there fairly close together for the detail.


ironsoul ( ) posted Thu, 20 June 2013 at 3:35 PM

Me again (have to back into work tonight so kicking heels at the moment)

The obj import is a red herring and also the more than one object idea. You can reproduce the problem by inserting the poser primative and shrink it done to 5% to get the same problem, you can duplicate the ball (i.e. two props) and the problem will still appear. If you insert another ball at 100% all three will render ok, as soon as you shrink the 3rd ball down to 5% the problem re-appears. 



lesbentley ( ) posted Thu, 20 June 2013 at 6:27 PM · edited Thu, 20 June 2013 at 6:28 PM

In P6 with a Poser box prop scaled to 10%, then imported as an obj, I found that if I had 'Auto Settings' selected in the Render settings, the box rendered black, but if I had 'Manual Settings' selected, the box rendered correctly. I have no idea what significance this may have, but thought it worth passing on. This may be why some people don't get the problem, they may be using 'Manual Settings'.


lesbentley ( ) posted Thu, 20 June 2013 at 6:49 PM

Two small boxes close together in the scene render black, but render normally if moved far apart. This makes me think that the shadow cameras may be implicated in some way.


Tarkhis ( ) posted Thu, 20 June 2013 at 6:54 PM

Les, just tried that but still got the weird shadows.  What Manual settings did you use?  Screen shot maybe?


lesbentley ( ) posted Thu, 20 June 2013 at 7:08 PM

file_495402.jpg

Here you are. I think these are the default settings.


Tarkhis ( ) posted Thu, 20 June 2013 at 7:21 PM

Okay, using those default settings it renders okay for me too.  However, soon as I check the Cast Shadows box, I'm back to the wonky shadows.

With Cast Shadows unchecked, options like Raytracing, Smooth polygons, etc seem to work okay.  Just can't have shadows.

Now the $64 question is, why can't the Firefly engine render shadows properly with small objects?  A small object is really just a bunch of vertices close together (that's what makes the object small) so my guess is something happens when the geometry / polygons are scaled down beyond a certain point and Firefly can't properly figure out the shadows.   But why that is the case I've no idea.

I'd be curious to know what render settings Laurie normally uses, if she's using the default manual settings, that would explain why she never had this happen.

Good catch Les, another clue!


lesbentley ( ) posted Thu, 20 June 2013 at 7:27 PM

I realized just after I posted, that I had shadows turned off in the manual settings. 😊


LaurieA ( ) posted Thu, 20 June 2013 at 7:28 PM

Nope, never use default settings. And always have cast shadows checked ;). It's not that.

Laurie



lesbentley ( ) posted Thu, 20 June 2013 at 8:02 PM

file_495403.png

With 3 infinite lights in the scene (and shadows turned on this time), I got the top render. I then set the zoom dial of each of the 3 shadow cameras to 10.0. The result is the bottom render. The shadows are still doing strange things, but at least the box is not black.


markschum ( ) posted Fri, 21 June 2013 at 10:50 AM

I have always assumed that this is an issue with the resolution of the shadow map and the area covered by the shadow camera. I never found a solution other than another prop in the scene. The primitive ball seems to be about the smallest object that renders normally.


Tarkhis ( ) posted Mon, 24 June 2013 at 11:28 PM

Unfortunately I was not able to download or experiment further over the weekend.  I've been pretty swamped with some other things that had to take priority.   I'm hoping next weekend to get back to it.

Mark, I agree, its probably an issue with the shadow map and small objects.  I'm still curious if I can duplicate Laurie's results with Wing's, that is, not having it happen.  If it works then I suspect there may be something different in the way Wings exports the obj format, I can't think what else it might be.  If it still happens then I wonder if it perhaps has something to do with hardware and OS (graphics card, Mac vs Windoze... I really wish I could switch to Linux, but that's another discussion entirely).

Doubt I'll solve it but I might at least zero in on what specifically the problem is.  My hope is that might be enough to get a patch out of SM fixing it.

But for now at least my shaving kit is complete and soon as I have time to do a few extra texture sets for it, I'll bundle it up and put it in free stuff.   So at least there's that.

Also this account is probably going to go inactive sometime this week.  I'm rebuilding my web site and will be setting up a new account here using the same name as the site and my twitter account just to keep things sorted.   The new username will be BardicHeart  (as in my avatar)


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.