Custom Textured part does not render correct


Custom Textured part does not render correct
#1
Hi all,

I have made a custom textured part for a model.

.png   93606p12_25_1240_150_DPCM_1_23_-45.png (Size: 10.98 KB / Downloads: 137)
However it does not render correct in certain steps and orientation.
See attached PDF.

Does anyone have an idea why it does not render in step 2 and does in step 3 and 4?

Thanks.


Attached Files
.pdf   test.pdf (Size: 110.61 KB / Downloads: 11)
Jaco van der Molen
lpub.binarybricks.nl
Reply
RE: Custom Textured part does not render correct
#2
(2018-01-09, 10:29)Jaco van der Molen Wrote: Does anyone have an idea why it does not render in step 2 and does in step 3 and 4?
Weird. Can you share source files?
Reply
RE: Custom Textured part does not render correct
#3
(2018-01-09, 12:54)Philippe Hurbain Wrote:
(2018-01-09, 10:29)Jaco van der Molen Wrote: Does anyone have an idea why it does not render in step 2 and does in step 3 and 4?
Weird. Can you share source files?

Sure. Here they are.


Attached Files Thumbnail(s)
   

.dat   93606p12.dat (Size: 410 bytes / Downloads: 7)
Jaco van der Molen
lpub.binarybricks.nl
Reply
RE: Custom Textured part does not render correct
#4
(2018-01-09, 14:57)Jaco van der Molen Wrote:
(2018-01-09, 12:54)Philippe Hurbain Wrote: Weird. Can you share source files?

Sure. Here they are.

png? model file (at least the partial assembly you show in pdf)?
Reply
RE: Custom Textured part does not render correct
#5
(2018-01-09, 15:12)Philippe Hurbain Wrote:
(2018-01-09, 14:57)Jaco van der Molen Wrote: Sure. Here they are.

png? model file (at least the partial assembly you show in pdf)?

Oh, I attached the PNG but it got inlined.
I added a zip file now with PNG, LDR and PDF.
Thanks for looking in to it Philo!


Attached Files
.zip   12.zip (Size: 136.19 KB / Downloads: 5)
Jaco van der Molen
lpub.binarybricks.nl
Reply
RE: Custom Textured part does not render correct
#6
Quote:Oh, I attached the PNG but it got inlined.
...and I didn't notice because it was white on white background Wink

Completely puzzled by this one. I see the same kind of problem, but I find no problem in the part or model. I tried a gazillon of things and the problem remains the same (or worse!). I tried with another texmapped part (3960p0b) that works fine. And if I put 93606p12 and 3960p0b in the same file... 3960p0b is textured in all images and 93606p12 is never textured Sad
Reply
RE: Custom Textured part does not render correct
#7
(2018-01-09, 18:39)Jaco van der Molen Wrote:
(2018-01-09, 15:12)Philippe Hurbain Wrote: png? model file (at least the partial assembly you show in pdf)?

Oh, I attached the PNG but it got inlined.
I added a zip file now with PNG, LDR and PDF.
Thanks for looking in to it Philo!

Try copying 12.png to <LDraw Dir>/Unofficial/parts/textures.
Reply
RE: Custom Textured part does not render correct
#8
Quote:Try copying 12.png to <LDraw Dir>/Unofficial/parts/textures.
I was even more drastic and put everything in my official library in the right places, to no avail. And... how file location might explain that the texture appear in some images and not others?
Reply
RE: Custom Textured part does not render correct
#9
(2018-01-10, 8:32)Philippe Hurbain Wrote:
Quote:Try copying 12.png to <LDraw Dir>/Unofficial/parts/textures.
I was even more drastic and put everything in my official library in the right places, to no avail. And... how file location might explain that the texture appear in some images and not others?

Strange isn't it. No luck here either with trial and error problem solving. Sad
Even worse: I have the same problem with another part now.
This time the brick with bow 1x4.
Could it be a memory problem? Is it because the PNG is white and transparent?
I'll PM you the actual model

Travis Cobbs or Travor Sandy (if you read this) any idea?

Someone else? Huh
Jaco van der Molen
lpub.binarybricks.nl
Reply
RE: Custom Textured part does not render correct
#10
Quote:Could it be a memory problem? Is it because the PNG is white and transparent?
Could have been, easy try: I reduced image size by 7 (thus 50 times less pixels) and made an orange backgound. Same problem...
Reply
RE: Custom Textured part does not render correct
#11
(2018-01-11, 6:53)Jaco van der Molen Wrote: Travis Cobbs or Travor Sandy (if you read this) any idea?

This appears to be caused by a bug in LDView. For some reason, it seems like LDView is drawing the textured geometry twice: once with the texture, and once without. Sometimes the non-textured geometry covers the texture. Sometimes I see noise where the texture is partially covered. This noise is indicative of two things being drawn in nearly the same place. I deleted the fallback geometry in your part, and that didn't fix the problem. So LDView isn't messing that up and drawing the fallback geometry. Also, while this seems to be what is happening, I can't figure out why it would be drawing that geometry twice, so I am still investigating. Also, I can't make the problem happen when I load the part all by itself. It only happens in your test model.
Reply
RE: Custom Textured part does not render correct
#12
Hmm... I see that, more accurately, it happens in the LPub3D-generated file that is used to display the test model. LPub3D actually applies a rotation to everything in the model. And the numbers that it uses when doing that are rounded to 6 decimal places. I strongly suspect that this rounding is resulting in matrices that aren't quite right, and that factor is causing the texture mapping in LDView to not work.

Trevor, is there any chance you could produce a test LPub3D that uses something silly like 15 decimal places, so we could see if that makes the problem go away? If it does, perhaps that could be a setting in LPub3D.
Reply
RE: Custom Textured part does not render correct
#13
(2018-01-12, 5:04)Travis Cobbs Wrote: Hmm... I see that, more accurately, it happens in the LPub3D-generated file that is used to display the test model. LPub3D actually applies a rotation to everything in the model. And the numbers that it uses when doing that are rounded to 6 decimal places. I strongly suspect that this rounding is resulting in matrices that aren't quite right, and that factor is causing the texture mapping in LDView to not work.

Trevor, is there any chance you could produce a test LPub3D that uses something silly like 15 decimal places, so we could see if that makes the problem go away? If it does, perhaps that could be a setting in LPub3D.

Oh wow. This gets interesting :-)
I noted too that a rotation step sometimes "fixes" the problem.
Would it help to rotate the parts just a 0,1 degrees or something?

Thanks for looking into it guys!
Jaco van der Molen
lpub.binarybricks.nl
Reply
RE: Custom Textured part does not render correct
#14
(2018-01-12, 6:35)Jaco van der Molen Wrote: Oh wow. This gets interesting :-)
I noted too that a rotation step sometimes "fixes" the problem.
Would it help to rotate the parts just a 0,1 degrees or something?

Probably not. Open up the cli.ldr that LPub3D creates and leaves in a tmp directory underneath the original test.ldr and spin that cli.ldr around in LDView. You will see the texture appear and disappear, but it can disappear for relatively large angle differences. Same when you zoom in and zoom out.
Reply
RE: Custom Textured part does not render correct
#15
Turning off Primitive Substitution in LDView might make the problem go away. Turning off lighting will probably make the problem go away (but obviously change the results quite dramatically).

I also may be able to send you a test version of LDView that handles textures differently that also might make the problem go away. Do you have 64-bit Windows?
Reply
RE: Custom Textured part does not render correct
#16
Quote:Turning off Primitive Substitution in LDView might make the problem go away. Turning off lighting will probably make the problem go away (but obviously change the results quite dramatically).
Fortunately you were cautious in your terms... none of these solution seems to improve things here (no change in texture rendering).
...and I use Win7/64b Wink
Reply
RE: Custom Textured part does not render correct
#17
(2018-01-14, 7:11)Travis Cobbs Wrote: Turning off Primitive Substitution in LDView might make the problem go away. Turning off lighting will probably make the problem go away (but obviously change the results quite dramatically).

I also may be able to send you a test version of LDView that handles textures differently that also might make the problem go away. Do you have 64-bit Windows?

Ok thanks. I’ll try that.
I’d appriciate your test version to try too.
Might be a good test case too ?
Jaco van der Molen
lpub.binarybricks.nl
Reply
RE: Custom Textured part does not render correct
#18
(2018-01-14, 15:18)Jaco van der Molen Wrote: I’d appriciate your test version to try too.
64 bits Windows?
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)