PDA

View Full Version : 3d texture



Wilfrick
05-02-2018, 05:08 AM
Hello,
I have a normal png texture, with alpha channel.
The problem is that I need to make a thick object. The only way I know to get this, it is to build a "stack" of planes. This solution is good when you look the object maximun to 45°, maybe little more. But if you look at 80°, you see the planes. Ok, I can build more planes than the pixels of the rendering... but this is almost insane and the render time laugh on my face.
In the 2018, there is a way to make this texture a thick object avoid the stack of planes? I don't know, maybe a volumetric object?
Thankyou for help

fishhead
05-02-2018, 05:52 AM
hmm, couldnīt you use BW version of your image as a displacement texture? And in case you need to get rid of the undisplaced geometry remainders by using a grading as a clip map on the vertical axis?!?

RPSchmidt
05-02-2018, 07:33 AM
Perhaps you could provide an image of what you are trying to do for reference? I'm not sure what you are trying to achieve.

Perhaps just use Multiply > Thicken on your object? That would allow you to add thickness to your object without stacking planes.

Wilfrick
05-02-2018, 08:21 AM
Humm, yes fishhead, I can displace a very subdivided plane and delete the polys not displaced, and buld the flipped polygon to close the back too. There are some ways to build the extruded object that follow the alpha channel. I asked if there is a new fast way to build the object from a single plane or a cube and a texture. If not, the better solution is to create the polygon following the BW profile of the alpha channel, making a spline or using the "pen" and click click click some hundreds of times :D

RPSchmidt, think about a normal pic with alpha channel, as a tree (not my case but almost so complicated alpha channel).

MonroePoteet
05-02-2018, 09:28 AM
You could try using the new LW2018 Shape-type object, see if it meets your needs. Sample scene attached.

141482 This is a plain JPG, the TGA image in the attachment has the Alpha channel
141483 This is the produced Shape Object with a blue background

View from all sides: 141484

To set up the Shape Object, you add a Null, bring up its Properties panel and change the type from Mesh to Shape and the shape type to Plane. The "Radius" of the plane and the height of the displacement is provided below, and the Image / Alpha is set up in the Surface. I used a Standard surface rather than Principled BSDF. Note the Inverted Alpha and Smooth Step nodes feeding the Transparency channel. Without the Smooth Step node, the sides fade to transparent at the bottom (per the Pixel Blending of the Alpha channel), but the Smooth Step "clamps" it to between 0.99 and 1.0.

141481

The texturing of the sides of the Shape object will be problematic if you have specific requirements for how they are shaded. In the sample scene, the sides are produced because the Pixel Blending option is set on the Image, causing the Alpha channel to have a slight blur on the edges, resulting in a "falloff" which shades the sides using the Image node's Background Color as the base and fading the Color. If you turn off Pixel Blending, the sides become black and I haven't found a way to shade them (I'd have hoped the Background Color on the Image would work, but it doesn't).

Ideally, your image has an Alpha channel which drops off and texturing / shading that would be applied to the sides, but that'd be surprising to me.

If the Shape-type Object doesn't meet your needs, I'd recommend one of three approaches:


If you have access to an application (I use CorelDraw) which will "vectorize" your image, you can export a vectored EPS file and load it into Modeler and use Extrude to give it thickness
Do a manual version of (1) by bringing the image into the Backdrop in Modeler, use Add Points to draw its outline and then Extrude. I've done this numerous times and it goes faster than you might think except for a very detailed image.
Create a high-density flat Box, with (say) 100x100 segments. Bring that into Layout and use your image as a Displacement Map. Then use Save Transformed Object and clean it up in Modeler.


From your last post, it looks like you've already tried (3) and it sounds like your Alpha channel is complex enough to make (2) too cumbersome. If you can upload your Image, I could try running it through CorelDraw to see if the vectored EPS file is sufficient to your needs.

Volumetrics wouldn't work very well since a Volumetric object (or Hypervoxel) is always based upon a Sphere.

mTp

RPSchmidt
05-02-2018, 09:43 AM
RPSchmidt, think about a normal pic with alpha channel, as a tree (not my case but almost so complicated alpha channel).

Ah, I see what you are trying to do. I've tried that before but always ended up just creating the shape and UV mapping the image to it.

MonroePoteet's solution looks like it would work great, with the extra benefit that I learned something new today:)

raw-m
05-02-2018, 10:37 AM
Just to throw it out there, somewhat annoyingly, Photoshop can do this! Export OBJ when done.

https://www.youtube.com/watch?v=DOlhTKa1cGc

prometheus
05-02-2018, 11:43 AM
You could try using the new LW2018 Shape-type object, see if it meets your needs. Sample scene attached.

141482 This is a plain JPG, the TGA image in the attachment has the Alpha channel
141483 This is the produced Shape Object with a blue background

View from all sides: 141484

To set up the Shape Object, you add a Null, bring up its Properties panel and change the type from Mesh to Shape and the shape type to Plane. The "Radius" of the plane and the height of the displacement is provided below, and the Image / Alpha is set up in the Surface. I used a Standard surface rather than Principled BSDF. Note the Inverted Alpha and Smooth Step nodes feeding the Transparency channel. Without the Smooth Step node, the sides fade to transparent at the bottom (per the Pixel Blending of the Alpha channel), but the Smooth Step "clamps" it to between 0.99 and 1.0.

141481

The texturing of the sides of the Shape object will be problematic if you have specific requirements for how they are shaded. In the sample scene, the sides are produced because the Pixel Blending option is set on the Image, causing the Alpha channel to have a slight blur on the edges, resulting in a "falloff" which shades the sides using the Image node's Background Color as the base and fading the Color. If you turn off Pixel Blending, the sides become black and I haven't found a way to shade them (I'd have hoped the Background Color on the Image would work, but it doesn't).

Ideally, your image has an Alpha channel which drops off and texturing / shading that would be applied to the sides, but that'd be surprising to me.

If the Shape-type Object doesn't meet your needs, I'd recommend one of three approaches:


If you have access to an application (I use CorelDraw) which will "vectorize" your image, you can export a vectored EPS file and load it into Modeler and use Extrude to give it thickness
Do a manual version of (1) by bringing the image into the Backdrop in Modeler, use Add Points to draw its outline and then Extrude. I've done this numerous times and it goes faster than you might think except for a very detailed image.
Create a high-density flat Box, with (say) 100x100 segments. Bring that into Layout and use your image as a Displacement Map. Then use Save Transformed Object and clean it up in Modeler.


From your last post, it looks like you've already tried (3) and it sounds like your Alpha channel is complex enough to make (2) too cumbersome. If you can upload your Image, I could try running it through CorelDraw to see if the vectored EPS file is sufficient to your needs.

Volumetrics wouldn't work very well since a Volumetric object (or Hypervoxel) is always based upon a Sphere.

mTp

Not quite right, the New (hypervoxels)..funny it is carries the old name with it) should be called something else I think,
The new volumetric system allows for cubic, cone and spherical shapes, but with the old system you could trick your way with gradients in dissolve channel for instance and the node editor.

http://forums.newtek.com/showthread.php?141094-Heart-of-hypervoxels-expanding-on-hypervoxel-shapes

MonroePoteet
05-02-2018, 01:32 PM
Not quite right, the New (hypervoxels)..funny it is carries the old name with it) should be called something else I think,
The new volumetric system allows for cubic, cone and spherical shapes, but with the old system you could trick your way with gradients in dissolve channel for instance and the node editor.

http://forums.newtek.com/showthread.php?141094-Heart-of-hypervoxels-expanding-on-hypervoxel-shapes

Yes, I'd noticed that in the Volumetric object properties but had forgotten. Works very well with an alpha-channel image...definitely potential for some nice effects!

141496

141497

141495

mTp

Wilfrick
05-02-2018, 05:13 PM
MonroePoteet: great solution, thank you.
Prometheus: WOW! thankyou.
With these 2 can get wonderful effects.

Raw-m: OOOOH! so simple to get a poly-object! I will follow this solution because I think it is the more fast in rendering and OGL show it. Thank you.

MonroePoteet
05-03-2018, 07:40 AM
Raw-m: OOOOH! so simple to get a poly-object! I will follow this solution because I think it is the more fast in rendering and OGL show it. Thank you.

Yes, this similar to the "vectorizing" I mentioned in (1) above. I do the same in CorelDraw, but I import the vector graphics (Logo outline) into Modeler from an EPS file and do the extrude in Modeler. If you have PhotoShop, looks easy! Here's the sample logo used in the referenced video:

141513

mTp

RPSchmidt
05-03-2018, 08:04 AM
Yes, this similar to the "vectorizing" I mentioned in (1) above. I do the same in CorelDraw, but I import the vector graphics (Logo outline) into Modeler from an EPS file and do the extrude in Modeler. If you have PhotoShop, looks easy! Here's the sample logo used in the referenced video:

141513

mTp

Yup, that is usually the way I do it, except I use Illustrator for the vectors. Same method and it works very well. You can create some pretty complex designs and import the vectors, and then UV map from there.

Revanto
05-03-2018, 07:46 PM
I use Illustrator OFTEN when creating references for models. Not just for creating shapes to extrude but also as a polyline or spline reference in the BG layer which is sometimes better than an image as you don't have to fiddle with the contrast.

The interesting thing in Illustrator is that you can actually create a flat polymesh in Illustrator (not just the outline of the shape you want to extrude) that has the polymesh topology that you want. It can be a slower process, though. It's more of a party trick than a good technique but someone would probably find it useful, methinks.

Revanto :p

jeric_synergy
05-04-2018, 12:56 PM
Just to throw it out there, somewhat annoyingly, Photoshop can do this! Export OBJ when done.

https://www.youtube.com/watch?v=DOlhTKa1cGc

:foreheads Rendering something now to see how well the gridification works... wish I hadn't hit "RENDER", it ain't fast. Is it necessary to RENDER in pshop before export? One of the vids I watched said that, but I believe it was an early version (CS6+). It'd be nice if one could export immediately, w/o rendering. I guess I'll know in.... 20 minutes.....


(AND, pshop doesn't like to minimize when rendering, AND M$ took away the ability to minimize a program from the task bar.....)

+++++++++(later)
OK, here's what it looks like:
141560
141561
This is the standard PShop fleur-de-lis shape. It doesn't get quadified, but that's no surprise.

What's odd is that although I changed the materials to various garish colors, it seemed to have zero effect on the LWM display. It might be because the LWM OBJ loader did not find the associated PShop files that go w/the materials.