irajsb / UE4_Assimp

Assimp mesh importer for Unreal Engine
MIT License
136 stars 29 forks source link

The sample can not be implemented #22

Closed wjswxc closed 1 year ago

wjswxc commented 1 year ago

I can't implement asynchrony。

irajsb commented 1 year ago

Async was removed in recent updates. Probably will add it back when I find a more clean way to implement it .

wjswxc commented 1 year ago

Thanks!One more question。Why does the model I imported using the sample blueprint have no material?

wjswxc commented 1 year ago

Also, the imported model is scattered.

wjswxc commented 1 year ago
Snipaste_2022-11-18_14-14-02

Look!It's hard to tell it's a plane.

irajsb commented 1 year ago

can you provide the model so I can see what issue is ?

wjswxc commented 1 year ago

Sure!Thank you so much!

---- Replied Message ---- | From | iraj @.> | | Date | 11/18/2022 23:09 | | To | @.> | | Cc | @.**@.> | | Subject | Re: [irajsb/UE4_Assimp] The sample can not be implemented (Issue #22) |

can you provide the model so I can see what issue is ?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

wjswxc commented 1 year ago

https://github.com/wjswxc/Plane I just uploaded that model to my repository.

wjswxc commented 1 year ago

This is what he would normally look like.

1

However, this is what it looks like when imported using the following blueprint.(I removed the async.)

2 3 4 5
irajsb commented 1 year ago

Is it necessary to use fbx? or can you use other formats ? I recommend glb because its binary (easier to read ) and it also stores textures better . If you want to use fbx use this option so it corrects the transforms ( We've issues with converting transforms on some file formats automatically , hopefully someone good at math can fix it ) image

I've updated the code for colors . It required to multiply color value by 100 .will upload the updates soon

image

wjswxc commented 1 year ago

Thank you very much! Have you tried importing in other formats? Such as 3ds, obj, dae?

irajsb commented 1 year ago

https://github.com/irajsb/UE4_Assimp/releases/tag/v5.2.5

By the way seems like you are using older version of the code . You can find code for this version inside its level blueprint at project startup(Its much more efficient since it has support for static meshes ). Default sample material for imports is also included .

wjswxc commented 1 year ago

Sounds great!Thank you for your reminder.Love you.

irajsb commented 1 year ago

OBJ Result : image DAE Result: image

wjswxc commented 1 year ago

You are amazing!Thank you for your great help!

wjswxc commented 1 year ago

Dude, I'm sorry to report this to you. I found that the model material you imported may be correct for the first time when you use the modified project, but not necessarily the second time, and then the plane in fbx format is still scattered on my side. The gltf format cannot be imported. But the strange thing is that the 3ds format is intact, except that its texture is the default texture you set.

irajsb commented 1 year ago

for fbx use pretransform vertices(screenshot included few comments to the top of this page) . for textures I recommended glb (binary) .

wjswxc commented 1 year ago

https://youtu.be/36XDVLZ6TSE https://youtu.be/36XDVLZ6TSE

irajsb commented 1 year ago

https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Corset/glTF-Binary/Corset.glb Texture creation works on my side. Can you try this ? what unreal version are you using?

irajsb commented 1 year ago

The issue with plane model is it has some incorrect normal that you need to fix in modeling software image

wjswxc commented 1 year ago

Sure UE4.27

---- Replied Message ---- | From | iraj @.> | | Date | 11/21/2022 21:35 | | To | @.> | | Cc | @.**@.> | | Subject | Re: [irajsb/UE4_Assimp] The sample can not be implemented (Issue #22) |

https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Corset/glTF-Binary/Corset.glb Can you try this ?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

wjswxc commented 1 year ago

image It might work when there is only one texture. Sometimes some formats will report an error that the texture cannot be found. There are also times when the UV cannot be found. This confuses me.

wjswxc commented 1 year ago

I don't know if you've noticed, but the model you're testing with only creates one Static Mesh when imported into UE, while I have multiple.And it is possible for a Static Mesh to have more than one Material. Another problem is the lack of transparency in materials. What I mean is: if, I have a material that is black and white, and I only want the black to work, and the white to be transparent. It cannot be achieved. Of course, this problem is too complicated, and the number of times it is used is very small. Maybe we can first solve the problem that the material cannot be found when the model is imported into UE.

irajsb commented 1 year ago

If textures are not packed inside the file ( for example fbx files sometimes have a filepath to the texture ) then you have to import the texture manually . UV Coordinates have to be generated in modeling software as well. I think your problem is that you are not packing the textures correctly . You can also generate the missing UV using this option however doing it in modeling software is the standard way . image

wjswxc commented 1 year ago

Yes, I try to reduce errors this way. image

irajsb commented 1 year ago

image the output of the load image sync is not connected to anywhere which means it does nothing . correct way is if embeded texture is valid (is valid is a node) then set embedded texture to texture param value and if its not embedded then read from path . However I recommend using formats that have embedded texture such as glb ( not gltf like the ones you sent in the video)

wjswxc commented 1 year ago

Yes, a large part of the current problems lie in the model I am looking for.

wjswxc commented 1 year ago

Thanks for your answer. I wish you a happy life.