How to get UV from points to vertices on imported obj?

   4356   6   1
User Avatar
Member
57 posts
Joined: April 2018
Online
Hi!

This should not be difficult but I haven't been able to find solution

I have an OBJ imported that has UVs and they work in Clarisse and Houdini so the problem is not there and this happens on any imported object. But in Houdini (imported with File node but same result with OBJ importer) the uv attribute is only on points, not vertices
I want to edit the existing uv (uv transform) without re-creating it and then export it back to OBJ and it kind of works but in Clarisse the UV is gone because Houdini put it in points, not vertices.
UV Flatten creates the vertex uv attributes but it also breaks the original uv (re-creates it?) so it cannot be used.
Simple Attribute Transfer from points to vertices does not work either.

I am new to Houdini so this may sound like stupid question but I really cannot figure this out, please help me

Thank you!

Antti
Edited by atnreg - Feb. 16, 2020 08:22:16
My system:
AMD Ryzen Threadripper 2990 (32-core),64GB RAM,NVIDIA RTX 3090,Win10
UE5.1,Houdini 19.5 Indie(always latest daily),Blender,Clarisse,Onyx,ZBrush...
Clarisse 2016-09, Houdini 2018-05 (seriously 2019-10)
I do all 3D for fun, no business
User Avatar
Member
9378 posts
Joined: July 2007
Offline
Use Attribute Promote SOP and promote uv from point to vertex
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
57 posts
Joined: April 2018
Online
Oh, I tried that but it didn't work but now that you told it is the correct way, I checked it again and noticed that I had another problem that was causing it to look like not working So it worked, thank you!

But can you or someone explain, why uv is in points by default as it obviously is vertex data? And when and how it can even be used in points? That would help me to understand the ‘wrong’ default place for uv data

Thank you!

Antti
My system:
AMD Ryzen Threadripper 2990 (32-core),64GB RAM,NVIDIA RTX 3090,Win10
UE5.1,Houdini 19.5 Indie(always latest daily),Blender,Clarisse,Onyx,ZBrush...
Clarisse 2016-09, Houdini 2018-05 (seriously 2019-10)
I do all 3D for fun, no business
User Avatar
Member
9378 posts
Joined: July 2007
Offline
atnreg
uv is in points by default as it obviously is vertex data? And when and how it can even be used in points?

uv is ultimately just an attribute like any other, Mantra can use it to sample textures whether it is vertex, point, prim or detail
prim or detail are usually not as useful for traditional uv usage
but point and vertex are commonly used
point uvs can be used when you don't require any uv seams
vertex uvs are required if you need uv seams

it seams like Houdini tries to be smart when importing .obj file and if it can represent all the uv values as point uvs it will do that, otherwise it will import them as vertex
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
57 posts
Joined: April 2018
Online
ok, thank you

So it is theoretically possible to generate uv coordinates as any float values and use any attribute name as long as that same name is used in uv-processing nodes? I mean there is nothing ‘special’ that needs to be done before such attribute works as uv?
That's cool

Antti
Edited by atnreg - Feb. 16, 2020 12:52:04
My system:
AMD Ryzen Threadripper 2990 (32-core),64GB RAM,NVIDIA RTX 3090,Win10
UE5.1,Houdini 19.5 Indie(always latest daily),Blender,Clarisse,Onyx,ZBrush...
Clarisse 2016-09, Houdini 2018-05 (seriously 2019-10)
I do all 3D for fun, no business
User Avatar
Member
9378 posts
Joined: July 2007
Offline
atnreg
I mean there is nothing ‘special’ that needs to be done before such attribute works as uv?
correct, there is nothing special, it's just an attribute that contains values, commonly in Houdini it's vector3, but vector2 or float or matrix, … attribute can easily be used as it's ultimately about the actual values of an attribute that you can convert to correct type and connect to whatever you want in the shader

you can however add qualifier or attribute type info (using Attrib Create SOP or addattrib() or setattribtypeinfo()) to your attribute to mark it “Texture Coordinate”
many common UV nodes in Houdini as well as UV viewport are using this hint to filter the list of uv attributes to only the ones marked this way
and while marking attribute as “Texture Coordinate” is not a requirement for Mantra, it's a good practice as some tools or exporters may use this hint
Edited by tamte - Feb. 16, 2020 13:04:40
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
57 posts
Joined: April 2018
Online
Thank you very much!

So if I am creating geometry for export to Clarisse or other software, can the attribute then be any name as long as it has the Texture Coordinate or is the ‘uv’ safest (or does it depend on software completely)? And if I have multiple uv attributes ('uv1', ‘uv2’ etc.), should the software understand them if there is that Texture Coordinate setting or do I need to do something else as well?

Antti
My system:
AMD Ryzen Threadripper 2990 (32-core),64GB RAM,NVIDIA RTX 3090,Win10
UE5.1,Houdini 19.5 Indie(always latest daily),Blender,Clarisse,Onyx,ZBrush...
Clarisse 2016-09, Houdini 2018-05 (seriously 2019-10)
I do all 3D for fun, no business
  • Quick Links