LDraw.org Discussion Forums
Looking a tutorial to make a custom part! - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: Models and Parts (https://forums.ldraw.org/forum-18.html)
+--- Forum: Parts Authoring (https://forums.ldraw.org/forum-19.html)
+--- Thread: Looking a tutorial to make a custom part! (/thread-23013.html)

Pages: 1 2 3 4


RE: Looking a tutorial to make a custom part! - Simone - 2019-10-24

(2019-10-24, 16:11)Philippe Hurbain Wrote: OK, I finally fired LPub3D, and see the same problem as you do, on this part or other texmapped ones (transparent). I guess you'll have to file in a bug report... https://github.com/trevorsandy/lpub3d/issues

Ok. Thanks for suggestion. Doing it now.


RE: Looking a tutorial to make a custom part! - Trevor Sandy - 2019-10-24

(2019-10-24, 16:22)Simone Wrote: Ok. Thanks for suggestion. Doing it now.

I am able to produce this behaviour with my installed instance of LDView, it is not a result of my modifications to the LPub3D instance of LDView.

The source seems to be in the LDView Snapshot module. You can validate this on your system by simply exporting a snapshot from the user interface or the command line:

Code:
"C:\Program Files\LDView\LDView64.exe" -ca0.01 -cg23,-45,3993775 -SaveWidth=1240 -SaveHeight=1753 -SaveSnapShot=C:\Users\Trevor\Desktop\LPub\Simone\customPart\3067_custom\LPub3D\3067_fork_36_1240_150_DPI_1_0.01_23_-45.png -LDrawDir=C:\Users\Trevor\LDraw -HaveStdOut=1 -vv C:\Users\Trevor\Desktop\LPub\Simone\customPart\3067_custom\test_3067pb02.ldr

[attachment=4118]


Cheers,


RE: Looking a tutorial to make a custom part! - Philippe Hurbain - 2019-10-25

Quote:The source seems to be in the LDView Snapshot module. You can validate this on your system by simply exporting a snapshot from the user interface
The snapshot above was created with snapshot export from user interface. Not perfect (no transparency) but different from yours. (Ldview 4.3 (x64) (2 Jan, 2017) )
Any plans to support texmap with native renderer?


RE: Looking a tutorial to make a custom part! - Travis Cobbs - 2019-10-25

(2019-10-25, 7:03)Philippe Hurbain Wrote: The snapshot above was created with snapshot export from user interface. Not perfect (no transparency) but different from yours. (Ldview 4.3 (x64) (2 Jan, 2017) )
Any plans to support texmap with native renderer?

LDView has the following option in its Primitives preferences:
  • Draw transparent textures last
I discovered after the fact that you must check this option if you want things to work right. It will be removed in a future version of LDView. To set this on the command line, use -TexturesAfterTransparent=1.


RE: Looking a tutorial to make a custom part! - Travis Cobbs - 2019-10-25

(2019-10-25, 18:17)Travis Cobbs Wrote: LDView has the following option in its Primitives preferences:
  • Draw transparent textures last
I discovered after the fact that you must check this option if you want things to work right. It will be removed in a future version of LDView. To set this on the command line, use -TexturesAfterTransparent=1.

One more thing. I think it was mentioned elsewhere in this thread, but in order for this to work right, you have to draw 3067a without the front face, and then add the textured quad with color 16. Alternatively, LDView will allow you to draw the textured quad with color 0x7000000 (invisible). If you do that, everything should look right in LDView, but it might not look right in LDCad.

Also, since you don't use 0 !: for the textured geometry, it will always be drawn. If textures are unsupported (or disabled in LDView), that will be drawn in addition to the fallback geometry. The reality is that you wouldn't want to do that. Instead, you should just get rid of the FALLBACK section.

If you update to use a subpart with everything except the front face, and then use the textured front face, you would continue use color 16 for that front face as you have it now, and wouldn't need any fallback. If you decide to use color 0x7000000 for the textured quad, it will just be invisible when texture mapping is disabled, but you definitely don't want the fallback geometry in that case either.


RE: Looking a tutorial to make a custom part! - Philippe Hurbain - 2019-10-25

(2019-10-25, 18:17)Travis Cobbs Wrote: LDView has the following option in its Primitives preferences:
  • Draw transparent textures last
I discovered after the fact that you must check this option if you want things to work right. It will be removed in a future version of LDView. To set this on the command line, use -TexturesAfterTransparent=1.
Ah - I remembered something like that, but couldn't find again that option.... I thought I had more or less the llast version ?


RE: Looking a tutorial to make a custom part! - Johann Eisner - 2019-10-25

(2019-10-25, 18:59)Philippe Hurbain Wrote: Ah - I remembered something like that, but couldn't find again that option.... I thought I had more or less the llast version ?

I am not sure if this helps, because I do not understand anything written here.

[attachment=4124]

[attachment=4125]


RE: Looking a tutorial to make a custom part! - Trevor Sandy - 2019-10-25

(2019-10-25, 18:17)Travis Cobbs Wrote: LDView has the following option in its Primitives preferences:
  • Draw transparent textures last
I discovered after the fact that you must check this option if you want things to work right. It will be removed in a future version of LDView. To set this on the command line, use -TexturesAfterTransparent=1.

Thank you Travis.

This flag is not automatically set in LPub3D. To do so you have 2 options.

1. Using LDView Preferences:

[attachment=4122]

2. Or local/global meta command set in the model file using the new "Add Renderer Arguments" dialogue:

[attachment=4123]

[attachment=4126]

Don't forget to reset the appropriate cache(s) and click the editor's update button:

[attachment=4127]

[attachment=4128]

Cheers,


RE: Looking a tutorial to make a custom part! - Trevor Sandy - 2019-10-25

(2019-10-25, 7:03)Philippe Hurbain Wrote: Any plans to support texmap with native renderer?

Actually I thought this was implemented but taking a look in the code I can see that I only address half of the texmap import routines. I'll add the remaining routines shortly but I'm not sure LeoCAD will correctly apply the texmap.

Cheers,


RE: Looking a tutorial to make a custom part! - Travis Cobbs - 2019-10-25

(2019-10-25, 18:59)Philippe Hurbain Wrote: Ah - I remembered something like that, but couldn't find again that option.... I thought I had more or less the llast version ?

Philo, I'm not sure what is up with your version. 4.3 was released at the end of January 2018, not the beginning of January 2017. I think you have a development version that I incorrectly labeled as 4.3. The official 4.3 version should have the "Draw transparent textures last" option in its Primitives preferences (as seen in Trevor's and Johann's screenshots).